agentleFS
all-source-osall-source-os/all-source/.claude/skills/mammoth-memory/SKILL.md

mammoth-memory

Skill4 starsChanged yesterdayApache-2.0View on GitHub

Durable cross-session memory for this repo via AllSource Prime. Recall what was learned in past sessions and record salient new facts as you work — so the user never re-explains decisions, architecture, or task history twice. Use at the START of a session to orient (recall prior context before answering non-trivial questions), and DURING work to record decisions, gotchas, and outcomes worth remembering. Triggers on "what did we decide about X", "remember this", "why did we do Y", "recall", "have we discussed", "load context", or any question that depends on prior-session knowledge. Also use PROACTIVELY: recall before answering architecture/decision/history questions; record after a non-obvious decision is made. mammoth = the memory layer; caveman makes few token, mammoth never forget token.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Availability gate: only act if prime_* tools are present.

    line 18
  2. Very specific:

    Do this before answering any question that depends on prior-session knowledge — architecture choices, "why did we…", task history, …

    line 27
  3. Very specific:

    Orient (cheap): Call prime_stats to see if memory has anything at all.

    line 31
  4. Very specific:

    Hybrid recall: Call prime_context with the user's question as query (tier L2, the default — adds the compressed index + vectors + graph).

    line 33
  5. Distinctive:

    Use it, cite it: If recall returns relevant facts, fold them into your answer and tell the user this came from memory ("from an earlier …

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

mammoth-memory

Durable agent memory for this repo. Backed by the AllSource Prime MCP server (prime_* tools) running local-only against .prime/ — durable WAL + Parquet, no account, survives restarts. Generalized from the shipped pr-atom-reviewer recall/record pattern into a general-purpose memory loop.

Hard rule — provenance: record your own analysis (decisions, rationale, gotchas, outcomes, summaries). NEVER write raw proprietary source code, secrets, API keys, or full file contents into Prime nodes/embeddings unless the user explicitly says it's OK. Metadata, file paths, and your conclusions are fine.

Availability gate: only act if prime_* tools are present. If they are not, skip silently — do not announce "memory unavailable" unless the user asks. (The project .mcp.json wires the server; tools surface after the user approves the project MCP server on session start.)


When to RECALL (read memory)

Do this before answering any question that depends on prior-session knowledge — architecture choices, "why did we…", task history, who/what/when — and at the start of a fresh session for orientation.

  1. Orient (cheap). Call prime_stats to see if memory has anything at all. Cold/empty store → skip recall, proceed normally, don't fabricate context.
  2. Hybrid recall. Call prime_context with the user's question as query (tier L2, the default — adds the compressed index + vectors + graph). For a pure "what do I know about X" lookup, prime_recall with text = the query is enough. Ask for top_k 5.
  3. Use it, cite it. If recall returns relevant facts, fold them into your answer and tell the user this came from memory ("from an earlier session: …") so the recall is visible — that visibility IS the product's magic moment.
  4. Cold start is fine. Empty results on the first sessions of a repo are expected. Never invent prior context to fill the gap.

Tool params come from each tool's input schema — prime_context requires query; prime_recall takes text (server embeds in-process via fastembed) or a precomputed vector, plus optional depth (0 = vector-only, 1+ = graph expansion) and top_k. Don't guess names; the schemas are authoritative.


When to RECORD (write memory)

Record after something worth remembering happens. Best-effort: if a call fails, note it briefly and continue — recording never blocks the real work.

What counts as salient (default policy — owner may refine, chronis t-7cdc):

  • A decision and its rationale ("chose X over Y because Z").
  • A non-obvious gotcha / constraint discovered ("Core can't cross-compile to amd64 on Apple Silicon — QEMU fails on Erlang NIF").
  • A durable fact about the project not derivable from code (ownership, conventions, external dependencies, deadlines).
  • An outcome (what shipped, what was verified, what failed and why).

What is NOT salient (do not write — keeps the store signal-dense):

  • Restating what's already in the codebase, git history, or CLAUDE.md.
  • Transient state ("currently editing foo.rs"), chit-chat, or step narration.
  • Anything covered by an existing node — update it instead of duplicating.

Recording steps:

  1. Find or create the subject node. prime_search (by type) or prime_neighbors to check if a node already exists. Create with prime_add_node only if absent. Always include a domain property (e.g. "domain": "mammoth", "engineering", "architecture") — domains power the compressed index's cross-references. Pick a type from the tool's set: decision, insight, concept, project, event, person, metric.
  2. Embed it for semantic recall. prime_embed with text = your written fact/decision (NOT source code), keyed by the node's entity_id (the id prime_add_node returned). This is what makes it findable later.
  3. Connect it. prime_add_edge to link the new node to related ones (depends_on, causes, impacts, requires). Cross-domain edges are the highest-value: they make the index's cross-reference section useful.

The loop (proactive default)

  • Session start / new topic: prime_stats → if non-empty and the topic is non-trivial, prime_context to pull relevant prior knowledge before answering.
  • After a decision or discovery: record it (node + embed + edges).
  • On "remember this": record the user's note verbatim as an insight/ decision node + embed.
  • On "what did we decide / why / have we discussed": recall first, answer from memory, cite it.

--auto-inject is on in .mcp.json, so a compressed index is injected as the prime://auto-context resource each conversation — you often already have a high-level map before calling anything. Use prime_context/prime_recall to go from that map to specifics.


Verification checklist

  • Checked prime_* tools exist before acting (silent skip if not).
  • Recalled (via prime_context/prime_recall) before answering a prior-knowledge question; cited memory when used.
  • Recorded only salient, non-proprietary facts; updated rather than duplicated existing nodes.
  • Every recorded node has a domain; salient nodes are embedded so they're recallable.
  • No raw source code, secrets, or full file contents written to Prime.

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.