repo-memory
Skill1 starsChanged 7 months agoMITView on GitHub
Capture and maintain durable repository memory when working in a codebase. Use when starting implementation, debugging, review, or exploration work and you want the agent to first load and then update persistent notes about the tech stack, architecture decisions, build and test commands, domain context, user preferences, and recurring constraints. Trigger on requests like "remember this repo", "keep notes while you work", "record architecture decisions", "track user preferences", "maintain project memory", or when repeated work in the same repository would benefit from durable context.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- SubhoM/persistent-agent-contexttheir own version, first seen Aug 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- SubhoM/persistent-agent-context★ 0same name
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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- app-store-version-checkSkill
- cohosted-frontend-backendSkill
- dotnet-cpmSkill
- gitmojiSkill
- markdown-outputSkill
- oidc-integrationSkill
- skoruba-adminui-on-duendeSkill
- specflow-to-reqnrollSkill
- tddSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. About 0 are common, 28 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈28
Distinctive · estimate
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 16
Use this skill to keep a small, durable memory inside the repository so future work starts from the current technical and human context …
- Distinctive: line 20
If the user explicitly invokes this skill, treat that as permission to bootstrap the repository memory system in the current workspace.
- Distinctive: line 32
Keep user-specific preferences separate from repo facts
- Distinctive: line 38
Use this skill when:
- Distinctive: line 45
Do not use this skill to dump raw terminal output, secrets, or transient noise.
- Distinctive: line 51
If the repository already has an established memory area, prefer reusing it instead of creating a second system.
- Distinctive: line 58
If an existing convention is found, keep using that location.
- Very specific: line 61
Use only one project-wide agent instruction file.
- Distinctive: line 66
Create only the files that are justified by the current work.
- Distinctive: line 81
If the user explicitly triggers this skill, do all of the following unless the repository already has an equivalent setup:
- Distinctive: line 83
Create or update the project-wide instruction file so every future task loads repository memory before substantive work.
- Distinctive: line 85
Create the memory root and minimal starter files.
- Distinctive: line 88
Use copilot-instructions.md as the base template and memory templates for the starter files.
- Distinctive: line 94
Before broad exploration or code changes:
- Distinctive: line 95
Check whether the memory root already exists.
- Distinctive: line 96
If it exists, read the smallest set of relevant memory files first.
- Distinctive: line 97
If it does not exist, do a small amount of repo discovery, then bootstrap the minimal files needed for the current task.
- Distinctive: line 99
If the project-wide instruction file does not yet direct the agent to load repository memory first, add or update it.
- Distinctive: line 122
Write notes when the information is likely to matter again.
- Distinctive: line 140
When memory already exists:
- Distinctive: line 141
prefer editing the existing note over appending near-duplicates
- Distinctive: line 143
add a short source hint such as a file path, command, or date when useful
- Distinctive: line 146
If two notes conflict and the correct version is still unclear, record the uncertainty explicitly instead of pretending the conflict is …
- Distinctive: line 151
Before finishing substantial work:
- Distinctive: line 152
Update any memory files affected by new durable knowledge.
- Distinctive: line 153
Remove or rewrite notes invalidated by the change.
- Very specific: line 154
Make sure current-focus.md reflects the real next state, or clear it if done.
- Distinctive: line 155
If bootstrapping happened during this task, confirm the project-wide instruction points at the chosen memory root.
- Distinctive: line 168
Keep the spirit, not the branding.
- Distinctive: line 184
If the user says not to remember something, do not persist it.
- Very specific: line 185
If a preference appears task-local rather than durable, keep it out of user-preferences.md unless the user confirms it is stable.
- Very specific: line 187
If the repo is tiny or the task is one-off, bootstrap only repo-overview.md and skip the rest until needed.
- Very specific: line 189
If a note is useful across many tasks but specific to this repository, keep it in .ai/memory/, not a global memory store.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Memory
Use this skill to keep a small, durable memory inside the repository so future work starts from the current technical and human context instead of rebuilding it from scratch.
If the user explicitly invokes this skill, treat that as permission to bootstrap the repository memory system in the current workspace.
Outcome
This skill creates and maintains a repository-local memory root at .ai/memory/.
The memory is meant to be read before work starts and updated as durable facts
become clear.
Primary goals:
- Load high-value context before doing substantive work
- Persist stable repo knowledge discovered during the task
- Keep user-specific preferences separate from repo facts
- Revise or replace stale notes instead of stacking contradictions
- Install an always-on repository instruction so future sessions preload memory
When to Use
Use this skill when:
- You are starting or resuming work in an unfamiliar repository
- The user expects the agent to remember architecture, conventions, or commands
- The same repository is visited repeatedly across tasks
- The user has stable preferences worth carrying forward in this codebase
- You are making decisions that future work should inherit
Do not use this skill to dump raw terminal output, secrets, or transient noise.
Memory Root
Default location: .ai/memory/
If the repository already has an established memory area, prefer reusing it instead of creating a second system. Check for one of these before bootstrapping:
.ai/memory/.openclaw/memory/.claw/memory/- another clearly named repository memory directory already used by the team
If an existing convention is found, keep using that location.
The preferred paired instruction file is .github/copilot-instructions.md.
Use only one project-wide agent instruction file. If the repository already uses
AGENTS.md, update that instead of creating copilot-instructions.md.
File Layout
Create only the files that are justified by the current work. Start minimal.
Recommended files:
.ai/memory/repo-overview.mdfor stack, layout, entry points, build/test commands.ai/memory/architecture-decisions.mdfor ADR-style decisions and tradeoffs.ai/memory/user-preferences.mdfor stable user-specific preferences in this repo.ai/memory/domain-notes.mdfor glossary, business rules, invariants.ai/memory/current-focus.mdfor active task state that should survive handoffs
See memory-files.md for suggested contents.
Workflow
0. Explicit Invocation Bootstrap
If the user explicitly triggers this skill, do all of the following unless the repository already has an equivalent setup:
- Create or update the project-wide instruction file so every future task loads repository memory before substantive work.
- Create the memory root and minimal starter files.
- Seed
repo-overview.mdwith whatever has already been verified.
Use copilot-instructions.md as the base template and memory templates for the starter files.
1. Load Before Work
Before broad exploration or code changes:
- Check whether the memory root already exists.
- If it exists, read the smallest set of relevant memory files first.
- If it does not exist, do a small amount of repo discovery, then bootstrap the minimal files needed for the current task.
- If the project-wide instruction file does not yet direct the agent to load repository memory first, add or update it.
Prioritize loading in this order:
repo-overview.mdarchitecture-decisions.mduser-preferences.mdcurrent-focus.md- any task-specific or area-specific note directly relevant to the request
2. Separate Fact Types
Classify information before writing it down:
- Repo fact: tech stack, module ownership, test command, API boundaries
- Architecture decision: why one approach was chosen over another
- User preference: style, review expectations, collaboration patterns
- Task state: what is in progress, blocked, or validated
- Domain note: business vocabulary, invariants, workflow rules
Store each fact in the narrowest file that fits.
3. Record Only Durable Signals
Write notes when the information is likely to matter again.
Good examples:
- confirmed build or test commands
- canonical entry points and owning modules
- architectural boundaries and dependency direction
- naming conventions and repository-specific patterns
- user preferences repeated or stated explicitly
- decisions made during the task and the reason they were made
Avoid recording:
- raw logs or stack traces with no lasting value
- tentative guesses not yet checked
- secrets, tokens, credentials, or private data
- one-off scratch thoughts better kept in ephemeral chat context
4. Update In Place
When memory already exists:
- prefer editing the existing note over appending near-duplicates
- replace outdated facts when the new evidence is stronger
- add a short source hint such as a file path, command, or date when useful
- consolidate repeated bullets into one clearer statement
If two notes conflict and the correct version is still unclear, record the uncertainty explicitly instead of pretending the conflict is resolved.
5. Close the Loop
Before finishing substantial work:
- Update any memory files affected by new durable knowledge.
- Remove or rewrite notes invalidated by the change.
- Make sure
current-focus.mdreflects the real next state, or clear it if done. - If bootstrapping happened during this task, confirm the project-wide instruction points at the chosen memory root.
OpenClaw-Inspired Defaults
This skill intentionally borrows a few durable-memory ideas common in OpenClaw-style workflows:
- a repository-local memory root committed with the project
- a small number of typed note files instead of one giant journal
- explicit separation between stable repo facts and volatile task state
- updates in place rather than append-only logging
- a lightweight always-on instruction that tells the agent to read memory first
Keep the spirit, not the branding. Reuse the project's existing convention if it already has one.
Quality Bar
Memory is good only if it is cheap to reload and safe to trust.
Each note should be:
- specific rather than generic
- short enough to scan quickly
- separated by category
- written as a stable fact, decision, or clearly marked open question
- easy to revise later
Decision Rules
- If the user says not to remember something, do not persist it.
- If a preference appears task-local rather than durable, keep it out of
user-preferences.mdunless the user confirms it is stable. - If the repo is tiny or the task is one-off, bootstrap only
repo-overview.mdand skip the rest until needed. - If a note is useful across many tasks but specific to this repository, keep it
in
.ai/memory/, not a global memory store.
Completion Checks
This skill has been applied well when:
- the agent read repository memory before substantive work
- new durable facts discovered during the task were persisted
- repo facts, user traits, and active task state were kept separate
- stale notes were corrected rather than accumulated
Related Customization
This skill should normally pair with a project-wide instruction file so the
memory system stays active after the first bootstrap. Prefer
.github/copilot-instructions.md unless the repository already standardizes on
AGENTS.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.

