memory-capture — Claude Code skill: save a thread's outcome to Basic
Turns the current state of a working thread into one Basic Memory note. Useful mid-thread or at the end, once decisions and context are worth keeping.
npx skills add basicmachines-co/basic-memory --skill memory-capture -a claude-codeWhat memory-capture does
The skill reads where a conversation has landed and writes it up as a single Basic Memory note. Not a transcript — the decisions made, the insights surfaced, the trade-off that got settled. Because the note should read top-to-bottom as one document, a second capture in the same thread rewrites it in place rather than appending.
Re-capture needs a stable key to find the same note. If your agent exposes a session or thread id, it goes into thread_id in the frontmatter, and the lookup runs through bm_search with filters rather than query — full-text search does not reliably match custom YAML fields. Without an id, the skill matches by topic and keeps a consistent title. The overwrite goes through bm_write with overwrite=True and expected_checksum; if another session edited the note in between, you get REVISION_CONFLICT and have to read it again.
All of this runs on the Basic Memory MCP server, so bm_search, bm_read and bm_write need somewhere to go. The note layout is fixed: context, topical sections, an observations block tagged [decision], [tradeoff] and similar, plus relations via relates_to. There is no changelog section at the bottom — revisions sit in the prose where they matter. Ask for a separate note explicitly and the skill skips the thread lookup and creates a fresh one without thread_id.
What it helps with
- keep decisions from evaporating when a thread closes
- condense a design discussion into one note
- rewrite a previous capture instead of duplicating it
- record which option was chosen and why
- summarize a session at the end
Example prompts for the agent
- Capture the current state of this thread into Basic Memory
- Save the decisions and insights from this session as one note
- Update the note for this thread with the latest changes
How to install memory-capture
1Skills CLI (Vercel)
npx skills add basicmachines-co/basic-memory --skill memory-capture -a claude-code2Manually: put the files in place
~/.claude/skills/memory-capture/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/memory-capture/
1Skills CLI (Vercel)
npx skills add basicmachines-co/basic-memory --skill memory-capture -a codex2Manually: put the files in place
.agents/skills/memory-capture/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add basicmachines-co/basic-memory --skill memory-capture -a cursor2Manually: put the files in place
.cursor/skills/memory-capture/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install basicmachines-co/basic-memory memory-capture2Manually: put the files in place
.github/skills/memory-capture/SKILL.md1Skills CLI (Vercel)
npx skills add basicmachines-co/basic-memory --skill memory-capture -a gemini-cli2Platform CLI
gemini skills install https://github.com/basicmachines-co/basic-memory --path skills/memory-captureManually: put the files in place
.devin/skills/memory-capture/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add basicmachines-co/basic-memory --skill memory-capture -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 memory-capture
How do I install memory-capture in Claude?
Run npx skills add basicmachines-co/basic-memory --skill memory-capture -a claude-code. The skill lands at ~/.claude/skills/memory-capture/SKILL.md.
What does memory-capture do?
It captures the decisions, insights and context of a working thread into one Basic Memory note. Invoke it again in the same thread and it rewrites that note so the document stays coherent.
What does memory-capture need to work?
The Basic Memory MCP server, since the skill calls bm_search, bm_read and bm_write. Rewriting in place also needs a stable thread id or a matching note title.