memory-first
Skill17 starsChanged 37 days agoMITView on GitHub
Lookup chain enforced before any file read or search: project and global memory, grep/glob, targeted read — stop at the first step that answers
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- global/CLAUDE.mdCLAUDE.md
- project-template/CLAUDE.mdCLAUDE.md
- agent-delegationSkill
- code-simplifierSkill
- critical-reviewSkill
- verbositySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Follow this lookup chain in strict order before reading any file, running any search, or spawning any tool.
- Very specific: line 14
Check .claude/memory/project.md (project) and ~/.claude/memory/personal.md (global preferences).
- Distinctive: line 16
Use the Grep tool on both files:
- Distinctive: line 23
If Grep returns matches, use that information and stop.
- Very specific: line 30
Always specify offset and limit.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Memory-First Protocol
Follow this lookup chain in strict order before reading any file, running any search, or spawning any tool. Stop at the first step that answers the question.
Chain
1. Memory
Check .claude/memory/project.md (project) and ~/.claude/memory/personal.md (global preferences).
Use the Grep tool on both files:
Grep pattern="<keyword>" path=".claude/memory/project.md"
Grep pattern="<keyword>" path="~/.claude/memory/personal.md"If Grep returns matches, use that information and stop. If no matches, proceed to step 2.
2. Grep / Glob
For pattern searches, use the Grep or Glob tools inline. Never read a full file to find a pattern.
3. Targeted Read
Last resort. Only when steps 1–2 cannot answer.
- Always specify
offsetandlimit. - Max 150 lines per call.
- Know approximately which lines to read before calling.
The pre-tool-use hook blocks Read calls on files >150 lines with no explicit limit. If blocked, return to step 1.
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.

