Agent skill

Agent Memory

by ntorga in ntorga/agent-starter-kit

Long-term and session memory across sessions. An agent skill from ntorga/agent-starter-kit.

MITAuto-check passedAgent Workflows

Install Agent Memory

skills CLI
$ npx skills add ntorga/agent-starter-kit --skill agent-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ntorga/agent-starter-kit agent-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ntorga/agent-starter-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent-memory .claude/skills/agent-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-memory
GitHub stars
146
Token cost
~2.7k tokens
SKILL.md length
1,279 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Long-term and session memory across sessions. An agent skill from ntorga/agent-starter-kit.

  • Works in 7 steps: Check for the memory directory. Look for… → Read session memory at session start.… → Read long-term memory. Read… → …
  • Tasks that involve Agent memory
  • SKILL.md covers Purpose, Procedure, Schemas and Guardrails
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agent Memory is an agent skill from ntorga/agent-starter-kit. Long-term and session memory across sessions.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent memory. The repository describes itself as: The scaffold for your multi-model, personalized Natural Language AI Harness (NLAH) . The licence is MIT.

When your agent uses it

  • Tasks that involve Agent memory

Example prompts

  • “/agent-memory”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Check for the memory directory. Look for .memory/ at the project root. If it does not exist, create it with long-term.md (initialized with…
  2. Read session memory at session start. List all files in .memory/session/. For each file with status paused or in-progress, read its…
  3. Read long-term memory. Read .memory/long-term.md. This step is read-only — do not modify long-term memory here.
  4. Record lessons as they surface. Watch for learning signals throughout the session — do not wait for the user to explicitly frame something…
  5. Update session memory on every interaction. After each meaningful interaction — user request, sub-agent dispatch, sub-agent handoff, user…
  6. Distill session into long-term memory before closing. When all work for the session is done, run a structured scan of the session log — do…
  7. Mark session complete or paused. After distillation (or if the session ends mid-work), set the status in the current session file to done…

What it can do on your machine

Read from SKILL.md and the folder at commit 851e942. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Memory loads about 2.7k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 1,279 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ntorga/agent-starter-kit at commit 851e942, republished under its MIT licence (© ntorga). 1,279 words, ~2,694 tokens.

Download SKILL.mdSave it as .claude/skills/agent-memory/SKILL.md (or your agent's skills folder).
name
agent-memory
description
Long-term and session memory across sessions.
usedBy
maestro
version
0.4.0
lastUpdated
2026-09-12

Purpose

Agents start cold every session — lessons, preferences, and interrupted work vanish when the conversation ends. This skill defines a file-based memory with two layers: long-term memory (project knowledge that feeds every dispatch) and session memory (an interaction log that lets the next session resume with full context). Together they form a loop: feedback given once stays, and interrupted work resumes with its full trail.

Procedure

  1. Check for the memory directory. Look for .memory/ at the project root. If it does not exist, create it with long-term.md (initialized with the six section headers from the long-term schema below) and subdirectories: session/, plan/, todo/, reviews/ (all empty).

  2. Read session memory at session start. List all files in .memory/session/. For each file with status paused or in-progress, read its Current Task and last 5 log entries. Present the list to the user and ask which action to take:

    • Resume a paused session — that session becomes the current session. If it has an Active Todo, read the todo and include its unchecked items in the summary.
    • Start new — create a new session file in .memory/session/ (naming convention below). Any existing paused sessions remain on disk for later.
    • Switch mid-conversation — pause the current session and resume or start a different one. The user may request this at any point, not just at session start.
    • Files with status done are stale — delete them silently.
  3. Read long-term memory. Read .memory/long-term.md. This step is read-only — do not modify long-term memory here.

  4. Record lessons as they surface. Watch for learning signals throughout the session — do not wait for the user to explicitly frame something as "feedback." Three signal tiers govern when to write:

    • Strong signal — explicit statement. The user says "I prefer X," "always do Y," "never do Z." Record immediately.
    • Medium signal — correction. The user modifies, rejects, or overrides a sub-agent's output. Extract the underlying preference or rule. Before you record a code-related observation, read the relevant files to verify it. Do not record raw claims without checking.
    • Weak signal — implicit pattern. The user consistently does X across multiple interactions but has never stated it. Do not record yet — wait for a strong or medium signal to confirm.

    Write mechanics: one line per entry, optional context tag (a short bracketed label that scopes the entry to a domain, e.g. [auth], [UI], [refactor]). Before appending, scan the section for duplicates or contradictions. Two entries contradict only if they share the same context tag (or both have no tag). If they contradict, replace the old entry with the new one. If the tags differ, both entries coexist — they represent different contexts.

  5. Update session memory on every interaction. After each meaningful interaction — user request, sub-agent dispatch, sub-agent handoff, user feedback, or decision — update the current session file:

    • Log entry: Append a one-line summary prefixed with timestamp and actor to the Log section.
    • Timestamp: Run date '+%Y-%m-%d %H:%M' — never guess or reuse prior values. Use %Y-%m-%d for the Last Active field and the full %Y-%m-%d %H:%M for the log entry prefix.
    • Active Todo: When a sub-agent creates a todo (uses: skills/task-tracking/SKILL.md), set the field to the todo file path. When the todo is closed, clear the field. This ensures a paused session always points to outstanding work.
  6. Distill session into long-term memory before closing. When all work for the session is done, run a structured scan of the session log — do not free-associate:

    1. Corrections — Did the user change or reject sub-agent output? Extract the preference or rule behind the correction.
    2. Struggles — Were there repeated dispatches to the same area, failed approaches, or stuck loops? Record what did not work and why as a learned rule.
    3. Decisions — Were structural or architectural choices made during planning or implementation? Record them as project notes.
    4. Preferences — Did the user state "I want...", "don't ever...", "I prefer..."? Verify these were captured during step 4. If any were missed, capture them now.
    5. Prune — Scan existing entries for anything superseded by today's work, contradicted by the current codebase, or no longer relevant. Remove or replace stale entries.

    Write insight, not inventory. "User prefers small focused PRs" is a lesson. "User asked for a small PR on 2026-03-18" is a log entry — it belongs in session memory, not long-term.

    Append new entries using the same deduplication and tagging rules as step 5.

  7. Mark session complete or paused. After distillation (or if the session ends mid-work), set the status in the current session file to done or paused respectively. The next session start will pick it up in step 2.

Schemas

Show full SKILL.md (516 more words)Show less
Long-term memory (long-term.md)
markdown
## Preferences

- [tag] <one preference per line>

## Feedback

- [tag] <one feedback entry per line>

## Learned Rules

- [tag] <one rule per line>

## Discovered Issues

- [tag] <one issue per line — pre-existing bugs, tech debt, or code smells found during work but outside the current task's scope>

## Observations

- [tag] <one observation per line — opinions, concerns, patterns, or suggestions from persona handoffs that fall outside the deliverable but may matter later>

## Project Notes

- [tag] <one note per line>

The six sections above are the defaults. Maestro may create additional sections when an entry does not fit any existing one — for example ## Architecture Decisions or ## Technical Debt. New sections follow the same entry format and rules.

Context tags are optional. They scope an entry to a domain so that entries with different tags never contradict each other. Examples: [auth], [UI], [API], [testing]. Omit the tag when the entry is project-wide.

Schema notes:

  • Entries are plain text, one line each. No nested lists, no multi-line blocks.
  • Deduplication and contradiction replacement happen at write time (step 4), scoped by context tag.
  • The user may prune or reorganize manually at any time.

Size discipline:

  • Target: under 80 entries total across all sections. When approaching this threshold, prune aggressively during distillation (step 6).
  • Every entry must answer: "Will this actually help a future session?" If not, it does not belong.
  • Prefer updating an existing entry over adding a new one when they cover the same concern.
Session memory (.memory/session/<slug>.md)
markdown
## Status

<in-progress | paused | done>

## Last Active

YYYY-MM-DD

## Current Task

<brief description of what is being worked on>

## Active Todo

<path to the active todo file, e.g. `.memory/todo/2026-02-18-feat-user-auth.md` — omit section if no todo exists>

## Log

- `YYYY-MM-DD HH:MM` **[actor]** <what happened>
- `YYYY-MM-DD HH:MM` **[actor]** <what happened>

Naming convention: Each session file is .memory/session/<slug>.md, where <slug> is a short kebab-case summary of the task (e.g., refactor-auth-module.md, feat-user-auth.md). Multiple session files can coexist — one per task.

Actor values: user, or the persona name with provider, model, and effort level — e.g. maestro (deepseek/deepseek-v4-flash, high), architect (anthropic/claude-opus-4, max), coder (opencode-go/deepseek-v4-flash, high). This records which provider, model, and effort level ran each persona so the next session knows what produced each result.

Example (.memory/session/refactor-auth-module.md):

markdown
## Status

paused

## Last Active

2026-02-18

## Current Task

Refactor auth module into a separate package.

## Active Todo

.memory/todo/2026-02-18-refactor-auth-module.md

## Log

- `2026-02-18 14:02` **[user]** Asked to refactor the auth module into a separate package.
- `2026-02-18 14:02` **[maestro (deepseek/deepseek-v4-flash, high)]** Dispatched architect to draft a refactor plan.
- `2026-02-18 14:10` **[architect (anthropic/claude-opus-4, max)]** Returned a plan: extract auth into `pkg/auth`, update imports, add tests.
- `2026-02-18 14:11` **[user]** Approved the plan but asked to skip tests for now.
- `2026-02-18 14:11` **[maestro (deepseek/deepseek-v4-flash, high)]** Noted preference (skip tests). Dispatched coder with the approved plan.
- `2026-02-18 14:25` **[coder (opencode-go/deepseek-v4-flash, high)]** Completed phase 1. 8 files changed. Phase 2 pending.
- `2026-02-18 14:26` **[maestro (deepseek/deepseek-v4-flash, high)]** Session paused — user stepping away. Phase 2 remains.

Schema notes:

  • Status is in-progress, paused, or done.
  • Active Todo records the path to the current todo file (uses: skills/task-tracking/SKILL.md). When resuming a paused session, the Maestro must read this file and relay its unchecked items to the sub-agent so work picks up where it stopped. Omit the section entirely when no todo exists. Clear it when the todo is closed.
  • Log is append-only within a session. Each entry is a single line.
  • Keep entries concise. Record only what matters for resuming: what the user requested, what the agent dispatched, what it delivered, and what it decided. Skip chatter, acknowledgements, and details the code or commit history already hold. The log is a trail, not a transcript.
  • When resuming a session, keep the existing log and continue appending.
  • When status is set to done, the file will be deleted at the next session start (step 2).

Guardrails

  • Never write from weak signals alone. Record explicit statements and corrections (strong and medium signals). Do not record implicit patterns until confirmed by a stronger signal. When recording observations about code, verify by reading the relevant files first — do not record raw claims.
  • Never leave a stale session file. If work is complete, set status to done. If the session ends mid-work, set status to paused. Either way the log must reflect the last thing that happened.
  • Never store sensitive data (credentials, tokens, secrets) in either memory file.
  • Never let sub-agents write directly to .memory/ — except for to-do files managed through the task-tracking skill, review progress files under .memory/reviews/, and plan artifacts under .memory/plan/. Memory writes are Maestro's responsibility — sub-agents return output, Maestro decides what to remember.

© ntorga, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/agent-memory of ntorga/agent-starter-kit.

Open the folder on GitHubat commit 851e942

Compare with similar skills

Agent Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Memory this skillntorga/agent-starter-kit146—~2.7kAutomated safety check: PassMIT
Coding Agent Session Findercode-yeongyu/oh-my-openagent70k1 repos~2.8kAutomated safety check: PassCustom licence
Claude-Mem Cloud Syncthedotmack/claude-mem98k1 repos~1kAutomated safety check: NotesApache-2.0
Cognee CLI Memory Commandstopoteretes/cognee32k1 repos~2.2kAutomated safety check: NotesApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Claude-Mem Searchthedotmack/claude-mem98k1 repos~511Automated safety check: PassApache-2.0

Similar skills

  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub starsUsed in 1 repo~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude-Mem Cloud Sync

    thedotmack/claude-mem

    Checks claude-mem cloud sync status and guides you through connecting a cmem.ai Pro account without the sync token ever passing through the chat.

    98k GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check: notes
  • Cognee CLI Memory Commands

    topoteretes/cognee

    Drives cognee from the terminal with remember, recall, forget and improve memory commands, dataset and config management and database migrations.

    32k GitHub starsUsed in 1 repo~2.2k tokens
    Agent WorkflowsAuto-check: notes
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed
  • Claude-Mem Search

    thedotmack/claude-mem

    Searches the user's persistent cross-session memory for timestamped observations synthesized from past agent sessions on cmem.ai.

    98k GitHub starsUsed in 1 repo~511 tokens
    Agent WorkflowsAuto-check passed
  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from ntorga/agent-starter-kit

All 21 skills in this repo
  • Agent Decision

    ntorga/agent-starter-kit

    Deterministic self-evaluation rubric for decision escalations — scored every run using the FRAME framework.

    146 GitHub stars~1.7k tokensUpdated 25 days ago
    Auto-check passed
  • Architect Design Tree

    ntorga/agent-starter-kit

    Builds the design tree for the grill — decisions mapped as nodes with dependencies, recommendations, and impact, pruned by path.

    146 GitHub stars~1.2k tokensUpdated 25 days ago
    Auto-check passed
  • Architect Impl Grounding

    ntorga/agent-starter-kit

    Grounds the grill's settled decisions in the codebase — annotates impl.md with file paths, signatures, reference files, test specs, and LOC; re-grounds the next epic after each landing.

    146 GitHub stars~944 tokensUpdated 25 days ago
    Auto-check passed
  • Boot

    ntorga/agent-starter-kit

    Session startup — gitignore, auto-update, memory, rules, context, CLI config, and greet.

    146 GitHub stars~937 tokensUpdated 25 days ago
    Auto-check passed
  • Browser Inspect

    ntorga/agent-starter-kit

    Browser inspection and interaction for verifying rendered web UI during development.

    146 GitHub stars~2k tokensUpdated 25 days ago
    Auto-check passed
  • Code Coherence Review

    ntorga/agent-starter-kit

    Reviews code and plans for logic coherence, correctness, and structural integrity.

    146 GitHub stars~2.8k tokensUpdated 25 days ago
    Auto-check passed

Categories

Questions about Agent Memory

What does Agent Memory do?

Long-term and session memory across sessions. An agent skill from ntorga/agent-starter-kit. Agent Memory is an agent skill from ntorga/agent-starter-kit. Long-term and session memory across sessions.

When should I use Agent Memory?

Agent Memory fits situations like: tasks that involve Agent memory.

How do I install Agent Memory in Claude Code?

Run `npx skills add ntorga/agent-starter-kit --skill agent-memory -a claude-code`. Or copy the skill folder (skills/agent-memory in ntorga/agent-starter-kit) into .claude/skills/agent-memory in your project. Claude Code loads it when a task matches its description.

How do I install Agent Memory in Codex?

Run `npx skills add ntorga/agent-starter-kit --skill agent-memory -a codex`. Or copy the skill folder (skills/agent-memory in ntorga/agent-starter-kit) into .agents/skills/agent-memory in your project. Codex loads it when a task matches its description.

Can I use Agent Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ntorga/agent-starter-kit --skill agent-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-memory, .gemini/skills/agent-memory, .github/skills/agent-memory and .opencode/skills/agent-memory in your project.

What does Agent Memory need to run?

SKILL.md names no scripts, command-line tools or credentials: Agent Memory is instructions for the agent only.

Does Agent Memory access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Memory use?

Agent Memory is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Memory use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Memory?

Skills that share tags, products or a category with Agent Memory: Coding Agent Session Finder (code-yeongyu/oh-my-openagent, 70k stars), Claude-Mem Cloud Sync (thedotmack/claude-mem, 98k stars), Cognee CLI Memory Commands (topoteretes/cognee, 32k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Memory?

ntorga (a GitHub user) maintains it in ntorga/agent-starter-kit, which has 146 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on September 12, 2026.

Source: ntorga/agent-starter-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.