agent-memory
Skill1 starsChanged 2 months agoMITView on GitHub
Set up repo-level agent memory: create an `agent-memory.md` learnings log at the repository root and wire up `CLAUDE.md` so agents read it when stuck and append durable learnings as they work. Use this whenever the user wants to add, set up, bootstrap, install, enable, or repair "agent memory," a "learnings file," a persistent notes/gotchas log for agents, or wants to make Claude Code carry lessons across sessions within a repo — even if they don't say the word "skill." Also use it to re-apply the pattern to a new repo.
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
- spscream/ai-floppytheir own version, first seen Sep 13, 2026
- ntorga/agent-starter-kittheir own version, first seen Sep 12, 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
- ntorga/agent-starter-kit★ 146same 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
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.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Do this directly with your own file tools — read the bundled templates below, then create or edit the files in the target repo.
- Very specific: line 40
If ./agent-memory.md already exists, leave it untouched.
- Very specific: line 42
If it does not exist, create it with the exact contents of assets/agent-memory.template.md.
- Very specific: line 46
Read ./CLAUDE.md (create it if it doesn't exist).
- Very specific: line 47
If it already contains the marker <!-- agent-memory:start -->, leave it as-is so the block isn't duplicated.
- Very specific: line 64
Different filename: if the user wants a different name (e.g.
“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
Agent Memory (repo-level)
This skill installs a lightweight, git-tracked memory pattern into a repository so that learnings survive across fresh agent sessions. It sets up two things:
agent-memory.mdat the repo root — a curated, high-signal log of learnings that a cold-start agent would have wanted to know (setup quirks, non-obvious invocations, resolved root causes, dead ends, repo conventions).- A block in
CLAUDE.mdinstructing agents to readagent-memory.mdat the start of non-trivial work and when stuck, and to append to it when they learn something durable — checking for and resolving duplicate or contradicting entries first, rather than stacking near-identical notes.
The division of labor matters: CLAUDE.md holds the always-loaded behavior (when to
read and write), and agent-memory.md holds the accumulated content, read on demand.
Setting it up
Do this directly with your own file tools — read the bundled templates below, then create
or edit the files in the target repo. No script is needed; you create the files yourself.
Work at the repository root (the top of the project — confirm with
git rev-parse --show-toplevel if git is available, otherwise use the project's top
directory).
Both steps are deliberately non-destructive — check before you write:
- Create
agent-memory.mdat the repo root — only if it's missing.- If
./agent-memory.mdalready exists, leave it untouched. It holds accumulated learnings, and overwriting it would throw them away. - If it does not exist, create it with the exact contents of
assets/agent-memory.template.md.
- If
- Add the instruction block to
CLAUDE.md— exactly once.- Read
./CLAUDE.md(create it if it doesn't exist). - If it already contains the marker
<!-- agent-memory:start -->, leave it as-is so the block isn't duplicated. - Otherwise, append the full contents of
assets/claude-md-block.md, preceded by a blank line if the file already has content.
- Read
Then report what changed (created the log? added the block? already present?) and remind the user to commit both files.
Manual example
For a fresh repo with no CLAUDE.md yet, the result is simply the two files at the root:
agent-memory.md (a copy of the template) and CLAUDE.md (containing the marker-wrapped
block). For a repo that already has a CLAUDE.md, the block is appended to the end of the
existing file and nothing else is touched.
Customization notes
- Different filename: if the user wants a different name (e.g.
LEARNINGS.md), rename the created file and update the path references inside theCLAUDE.mdblock to match. - Monorepos / per-package memory: the pattern can be applied per subdirectory. A
subdirectory
CLAUDE.mdloads on demand when an agent works in that directory, so a package-localagent-memory.md+ a package-localCLAUDE.mdblock scopes memory to that package. - On-demand vs. always-loaded: the default wires the file for on-demand reading. Do
not switch to an
@agent-memory.mdimport unless the log is small and always relevant — imports load the whole file into context at every session start and grow the baseline cost as the log grows. - Relationship to Claude Code's native auto memory: native auto memory is per-user and
lives outside the repo (not shared, not reviewed). This committed
agent-memory.mdis the shared, versioned, review-gated layer. They complement each other; this skill sets up the shared one.
Bundled resources
assets/agent-memory.template.md— the starter log, including the embedded rules for what/when to write and read, and the entry format. This is the substance of the pattern; copy it verbatim to create the log.assets/claude-md-block.md— the marker-wrapped block to append toCLAUDE.md.
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.

