agentleFS
Rishabh-ChoudhryRishabh-Choudhry/anchor-memory/skills/memory-init/SKILL.md

memory-init

Skill0 starsChanged 5 months agoMITView on GitHub

Use to bootstrap Anchor in a project — scaffolds AGENTS.md/CLAUDE.md/GEMINI.md, the memory ledger, anchor.config.json, and wires the integrity hooks. Idempotent.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Interview (minimal): Ask only:

    line 17
  2. Very specific:

    Add .anchor/session-state.md to the project .gitignore (the live auto-saved state is local-only.

    line 39
  3. Very specific:

    Verify: Run python3 <linter> --root .

    line 41
  4. Distinctive:

    Never delete existing memory.

    line 46
  5. Very specific:

    All substitutions are literal string replacements of the {{...}} tokens.

    line 47

“Common” is measured: kept by at least 6 in 10 of the 7 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.

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

memory-init

Scaffold the Anchor memory system into the current project. Safe to re-run (never overwrites an existing file without showing a diff and asking).

Steps

  1. Detect context. Confirm you are at the repo root (git rev-parse --show-toplevel). Detect if Anchor is installed as a plugin ($CLAUDE_PLUGIN_ROOT set) or being used template-style (files copied into the repo).
  2. Interview (minimal). Ask only:
    • Project name (default: repo directory name).
    • Primary build/test command (default: leave the {{BUILD_CMD}} placeholder). Everything else uses defaults and is editable later in anchor.config.json.
  3. Resolve template source. Templates live at ${CLAUDE_PLUGIN_ROOT}/templates (plugin mode) or ./templates (template mode). Abort with a clear message if neither exists.
  4. Write files (skip+report any that already exist; offer to diff/overwrite):
    • AGENTS.md, CLAUDE.md, GEMINI.md ← templates, with {{PROJECT_NAME}}, {{MEMORY_DIR}}, {{BUILD_CMD}}, {{DATE}} substituted.
    • memory/FACTS.md, memory/decisions.md, memory/status.md, memory/README.md, memory/HANDOFF.md.
    • anchor.config.json ← template with substitutions.
  5. Wire hooks.
    • Plugin mode: hooks are already active via the plugin's hooks/hooks.json. Tell the user no settings change is needed.
    • Template mode: copy templates/../hooks/ into .anchor/hooks/, copy scripts/memory_lint.py into .anchor/scripts/, then merge templates/settings.fragment.json into .claude/settings.json (create the file if absent; merge arrays, don't clobber existing hooks).
    • Add .anchor/session-state.md to the project .gitignore (the live auto-saved state is local-only; the vendored .anchor/ engine stays tracked).
  6. Verify. Run python3 <linter> --root . and report the result. Then print a 3-line "what changed + next steps" summary (edit AGENTS.md project sections; record your first decision with /capture-decision).

Guardrails

  • Never delete existing memory. Never overwrite without explicit confirmation.
  • All substitutions are literal string replacements of the {{...}} tokens.

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.