agentleFS
yeisonrestrepoyeisonrestrepo/code-conductor/skills/memory-first/SKILL.md

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

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
  1. Distinctive:

    Follow this lookup chain in strict order before reading any file, running any search, or spawning any tool.

    line 9
  2. Very specific:

    Check .claude/memory/project.md (project) and ~/.claude/memory/personal.md (global preferences).

    line 14
  3. Distinctive:

    Use the Grep tool on both files:

    line 16
  4. Distinctive:

    If Grep returns matches, use that information and stop.

    line 23
  5. Very specific:

    Always specify offset and limit.

    line 30

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 offset and limit.
  • 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.