using-agentcairn-memory — Claude Code skill: memory across sessions
Tells the agent to search past memory before a task and store durable facts after it. Useful when the same problems keep coming back.
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a claude-codeWhat using-agentcairn-memory does
The skill sets a working order for AgentCairn memory, a Markdown vault the user owns. Before designing, debugging or re-deriving something non-trivial, the agent runs recall with a narrow query and opens a promising hit through build_context. Search spans every project but favours the current one; hits from elsewhere carry a [from: <project>] marker, and --scope project keeps a query inside one repo.
Once a decision, a non-obvious fix or a gotcha lands, the agent calls remember with one short self-contained fact. Trivial things are skipped, since the SessionEnd hook already captures the session in bulk — remember is for what deserves pinning on purpose. Notes get cited by permalink.
The skill only applies when AgentCairn's MCP tools are loaded. With recall and remember missing, the agent must not fake tool calls or claim it installed the runtime, MCP server, plugin or hooks. It says the integration is absent, points to $agentcairn-setup or the native install steps, and halts the memory workflow until the host restarts.
What it helps with
- find how the auth token refresh was fixed last time
- recover the migration order already agreed on
- pin a non-obvious fix so it is not re-derived
- keep a stated user preference about merge style
- pull a solution from another repo facing a similar task
Example prompts for the agent
- Search memory for how we fixed the auth token refresh
- Remember this: we rotate jwt-secret on deploy via X
- Limit the memory query to this project and find the note about migration order
How to install using-agentcairn-memory
1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a claude-code2Manually: put the files in place
~/.claude/skills/using-agentcairn-memory/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/using-agentcairn-memory/
1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a codex2Manually: put the files in place
.agents/skills/using-agentcairn-memory/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a cursor2Manually: put the files in place
.cursor/skills/using-agentcairn-memory/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ccf/agentcairn using-agentcairn-memory2Manually: put the files in place
.github/skills/using-agentcairn-memory/SKILL.md1Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a gemini-cli2Platform CLI
gemini skills install https://github.com/ccf/agentcairn --path plugin/skills/using-agentcairn-memoryManually: put the files in place
.devin/skills/using-agentcairn-memory/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ccf/agentcairn --skill using-agentcairn-memory -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about using-agentcairn-memory
How do I install using-agentcairn-memory in Claude Code?
Run npx skills add ccf/agentcairn --skill using-agentcairn-memory -a claude-code. The skill lands at ~/.claude/skills/using-agentcairn-memory/SKILL.md.
What does using-agentcairn-memory do?
It gives the agent two habits: query past solutions with recall before a non-trivial task, and store a durable fact with remember after a decision or fix.
What does the skill need to work?
AgentCairn's MCP tools must be loaded. Without recall and remember available, the agent stops the memory workflow and points to $agentcairn-setup or the native install plus a host restart.
Source text
SKILL.md · Apache-2.0
--- name: using-agentcairn-memory description: Use when AgentCairn memory tools are loaded and starting a non-trivial task or finishing a decision/fix — recall prior memory before working, and remember durable facts worth carrying across sessions. metadata: internal: true --- # Using agentcairn memory You have a persistent memory backed by agentcairn (a Markdown vault the user owns). Use it. ## Require the full integration This skill assumes AgentCairn's MCP tools are already loaded. Before following the memory workflow, confirm that `recall` and `remember` are available. If the tools are missing: - Do not invent tool calls or imply that this behavior skill installed the AgentCairn runtime, MCP server, plugin, or hooks. - Explain that the full AgentCairn integration is not loaded. - Invoke `$agentcairn-setup` if available, or direct the user to the native AgentCairn installation instructions. - Stop the memory workflow until installation is complete and the host has been restarted. ## Recall before you work Before designing, debugging, or re-deriving something non-trivial, **search memory first**: - Use the `recall` tool (hybrid search) with a focused query — "how did we fix the auth token refresh?", "what did we decide about the migration order?". - Expand a promising hit with `build_context` to read the full note. - Recall is cross-project: prior solutions in *any* repo can help. Cite notes by permalink. - Recall automatically prefers your current project's memories while still surfacing relevant cross-project ones (marked `[from: <project>]`); pass a project to target another repo, or `--scope project` to limit a query to just this one. ## Remember durable facts After a decision, a non-obvious fix, a gotcha, or a stated user preference, **persist it** with the `remember` tool — a short, self-contained fact. Good memories: "We rotate jwt-secret on deploy via X.", "User prefers rebase-merges.", "DuckDB TIMESTAMP stores naive-UTC — bind accordingly." Skip the trivial — the SessionEnd hook already captures the session in bulk; `remember` is for the high-value things worth pinning deliberately. The vault is plain Markdown the user can read and edit; treat it as shared, durable knowledge.
© ccf · Apache-2.0 · ccf/agentcairn