agent-memory
Skill146 starsChanged 3 months agoMITView on GitHub
Long-term and session memory across sessions.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- aditya-deokar/software-factorytheir own version, first seen Sep 29, 2026
- komluk/scaffoldingtheir own version, first seen Sep 28, 2026
- t4sh/skills4shtheir own version, first seen Sep 28, 2026
- yogvidwankhede/vishwakarmatheir own version, first seen Sep 26, 2026
- brianschroeder/simple-agent-memorytheir own version, first seen Sep 18, 2026
- spscream/ai-floppytheir own version, first seen Sep 13, 2026
Used with
Projects with it also use skill-authoring and pdf.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkillskill-authoring
Write Agent Skills that comply with the agentskills.io specification. WHEN: "create a skill", "new skill", "write a skill", "skill template", "skill structure", "review skill", "skill PR", "skill compliance", "SKILL.md format", "skill frontmatter", "skill best practices". DO NOT USE FOR: general documentation. INVOKES: vally CLI.
Also in 3 projects that use this
AnthropicSkillpdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- tigerless-labs/agent-memory★ 2.4ksame name
- databricks/app-templates★ 208same name
- JKHeadley/instar★ 81same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- VoDaiLocz/kilo-kit-mcp★ 27same name
- komluk/scaffolding★ 15same name
- dzianisv/skills★ 4same name
- GPTtang/skill-atlas★ 4same name
- t4sh/skills4sh★ 4same name
- mattstruble/skills★ 2same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-decisionSkill
- architect-design-treeSkill
- architect-impl-groundingSkill
- bootSkill
- browser-inspectSkill
- code-coherence-reviewSkill
- code-quality-reviewSkill
- coder-self-reviewSkill
- code-sec-reviewSkill
- context-maintenanceSkill
- contextualizer-self-reviewSkill
- dispatchSkill
- grillSkill
- loop-recoverySkill
- plan-managementSkill
- reviewer-architect-adversarialSkill
- reviewer-handoffSkill
- reviewer-self-reviewSkill
- review-loopSkill
- task-trackingSkill
- web-searchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 8 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Check for the memory directory: Look for .memory/ at the project root.
- Very specific: line 23
Read long-term memory: Read .memory/long-term.md.
- Distinctive: line 32
Update session memory on every interaction: After each meaningful interaction — user request, sub-agent dispatch, sub-agent handoff, user …
- Very specific: line 34
Timestamp: Run date '+%Y-%m-%d %H:%M' — never guess or reuse prior values.
- Very specific: line 35
Active Todo: When a sub-agent creates a todo (uses: skills/task-tracking/SKILL.md), set the field to the todo file path.
- Distinctive: line 37
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 …
- Distinctive: line 44
Write insight, not inventory.
- Very specific: line 48
Mark session complete or paused: After distillation (or if the session ends mid-work), set the status in the current session file to done …
- Distinctive: line 93
Every entry must answer: "Will this actually help a future session?" If not, it does not belong.
- Distinctive: line 94
Prefer updating an existing entry over adding a new one when they cover the same concern.
- Distinctive: line 161
When resuming a session, keep the existing log and continue appending.
- Very specific: line 162
When status is set to done, the file will be deleted at the next session start (step 2).
- Distinctive: line 166
Never write from weak signals alone.
- Very specific: line 167
Never leave a stale session file.
- Distinctive: line 168
Never store sensitive data (credentials, tokens, secrets) in either memory file.
- Very specific: line 169
Never let sub-agents write directly to .memory/ — except for to-do files managed through the task-tracking skill, review progress files …
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Check for the memory directory. Look for
.memory/at the project root. If it does not exist, create it withlong-term.md(initialized with the six section headers from the long-term schema below) and subdirectories:session/,plan/,todo/,reviews/(all empty). - Read session memory at session start. List all files in
.memory/session/. For each file with statuspausedorin-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
doneare stale — delete them silently.
- Read long-term memory. Read
.memory/long-term.md. This step is read-only — do not modify long-term memory here. 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.- 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-%dfor theLast Activefield and the full%Y-%m-%d %H:%Mfor 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.
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:
- Corrections — Did the user change or reject sub-agent output? Extract the preference or rule behind the correction.
- 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.
- Decisions — Were structural or architectural choices made during planning or implementation? Record them as project notes.
- 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.
- 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.
- Mark session complete or paused. After distillation (or if the session ends mid-work), set the status in the current session file to
doneorpausedrespectively. The next session start will pick it up in step 2.
Schemas
Long-term memory (long-term.md)
## 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)
## 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):
## 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, ordone. - 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 topaused. 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

