Agent skill

Memory Capture

by basicmachines-co in basicmachines-co/basic-memory

Capture the current state of a working thread or conversation into a single coherent Basic Memory note — synthesize where it landed, don't append a log.

AGPL-3.0Auto-check passed

Install Memory Capture

skills CLI
$ npx skills add basicmachines-co/basic-memory --skill memory-capture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install basicmachines-co/basic-memory memory-capture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/basicmachines-co/basic-memory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/memory-capture .claude/skills/memory-capture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-capture
GitHub stars
4.1k
Token cost
~2.8k tokens
SKILL.md length
1,044 words
Files
1
Skills in repo
49
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Capture the current state of a working thread or conversation into a single coherent Basic Memory note — synthesize where it landed, don't append a log.

  • Works in 4 steps: Determine the thread key. Use a stable… → Search Basic Memory for the existing… → If a match is found → …
  • SKILL.md covers Purpose, When to Use, Same-Thread Detection and Decision Flow, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Memory Capture is an agent skill from basicmachines-co/basic-memory. Capture the current state of a working thread or conversation into a single coherent Basic Memory note — synthesize where it landed, don't append a log. On re-capture, rewrite the same note in place instead of duplicating. Use mid-thread or end-of-thread when decisions, insights, or context are worth preserving.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: AI conversations that actually remember. Never re-explain your project to your AI again. Join our Discord: https://discord.gg/tyvKNccgqN. The licence is AGPL-3.0.

Example prompts

  • “/memory-capture”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Determine the thread key. Use a stable session/thread id if your agent exposes one; otherwise plan to match by title/topic.
  2. Search Basic Memory for the existing thread note.
  3. If a match is found
  4. If no match is found

What it can do on your machine

Read from SKILL.md and the folder at commit 6982cfc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Capture loads about 2.8k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 1,044 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~82
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from basicmachines-co/basic-memory at commit 6982cfc, republished under its AGPL-3.0 licence (© basicmachines-co). 1,044 words, ~2,848 tokens.

Download SKILL.mdSave it as .claude/skills/memory-capture/SKILL.md (or your agent's skills folder).
name
memory-capture
description
Capture the current state of a working thread or conversation into a single coherent Basic Memory note — synthesize where it landed, don't append a log. On re-capture, rewrite the same note in place instead of duplicating. Use mid-thread or end-of-thread when decisions, insights, or context are worth preserving.

Memory Capture

Capture the gist of a working thread — the decisions made, insights surfaced, and context built — into a single coherent Basic Memory note that reflects where the thread has landed.

Purpose

A thread has a beginning, middle, and end. Things change as the conversation progresses: an early decision gets revised, a problem looks different in light of new information, a trade-off is settled differently than it first seemed. When this skill is invoked, capture the current state of understanding, not the history of how it got there.

If the skill is invoked more than once in the same thread, the same note is rewritten so it stays coherent — not appended to. The result should read top-to-bottom as a single document about the thread's outcome, with brief prose where a meaningful change is worth acknowledging.

When to Use

Typical timing is mid-thread or end-of-thread, after enough has been settled to be worth preserving.

Use this skill when:

  • Key decisions have been made and shouldn't evaporate when the thread closes
  • A design, debugging, or planning discussion has produced something concrete
  • The user explicitly asks to capture, save, or remember what's been discussed
  • Toward the end of a session, to summarize the outcome

It is fine — and expected — to invoke this skill multiple times in the same thread as the conversation evolves.

Same-Thread Detection

To rewrite the same note on re-capture instead of duplicating, key the note to a stable thread_id in its frontmatter.

If your agent exposes a stable session or thread id, store it as thread_id so subsequent captures within the same thread find and rewrite the same note. Any value that stays constant for the duration of the thread works — a session UUID, a conversation id, a ticket number the work is scoped to.

Example (hosts with a JSONL transcript): some agents write a per-session transcript whose filename is a stable session UUID. If yours does, you can derive the id from the most-recently-modified transcript file and use it as thread_id. This is optional — only do it if your host actually exposes such a transcript.

If no stable id is available, match the existing note by title/topic instead: search for a note covering the same thread (search_notes(query="<topic>")), and if you find the one this thread already produced, rewrite it. Omit thread_id and rely on a consistent title.

Decision Flow

  1. Determine the thread key. Use a stable session/thread id if your agent exposes one; otherwise plan to match by title/topic.
  2. Search Basic Memory for the existing thread note.
    • With a thread id, use metadata_filters (not query) — full-text query doesn't reliably match YAML frontmatter custom fields:
      python
      search_notes(
          metadata_filters={"thread_id": "<thread-id>"},
          project="<project>"
      )
    • Without one, search by topic and identify the note this thread already produced:
      python
      search_notes(query="<thread topic>", project="<project>")
  3. If a match is found:
    • Read the existing note (use the full permalink returned by search)
    • Synthesize a new version that integrates the latest understanding from the conversation
    • Overwrite via write_note with overwrite=True (same title, same thread_id if used, same directory)
  4. If no match is found:
    • Synthesize the note from the conversation
    • If you have a thread id, pass metadata={"thread_id": "<thread-id>"} to write_note (it surfaces as a custom frontmatter field)
    • Save it

Synthesis Rules

When updating an existing thread note, synthesize, don't append:

  • Decisions that are still current → keep, possibly refined
  • Decisions that have been superseded → replaced inline (the new one goes where the old one was)
  • Significant revisions that deserve explanation → a sentence woven into the relevant section, not an appended changelog
  • Outdated context → removed

Goal: the note reads top-to-bottom as a single coherent document. A reader who never saw the conversation should still understand the outcome from the note alone. There is no ## Changes section at the bottom; revisions live in the prose where they're relevant.

Show full SKILL.md (415 more words)Show less

Escape Hatch

If the user explicitly asks for a separate note (e.g., "capture this as a new note, don't merge with the existing thread note"), skip the same-thread lookup and create a fresh note without setting thread_id. This is rare; the default is to update.

Note Structure

markdown
---
title: <descriptive title for the thread>
type: note
thread_id: <thread-id, if your agent exposes one>
tags:
- relevant
- tags
---

# <Title>

## Context

What this thread is about — the situation, problem, or topic being explored.

## <One or more topical sections>

The actual content. Could be decisions, a design rationale, an investigation summary, etc.

## Observations

- [decision] What was decided #tag
- [insight] Key understanding gained #tag
- [tradeoff] Option A chosen over B because... #tag

## Relations

- relates_to [[Related Concept]]
- implements [[Parent Spec]]

Common Observation Categories

  • [decision] — choices made
  • [insight] — understanding gained
  • [pattern] — reusable approaches
  • [learning] — lessons learned
  • [tradeoff] — options weighed
  • [problem] — issues identified
  • [solution] — fixes applied

Title

The title should reflect the thread's topic. On update, the title can be refined if the topic has clarified — but it should still describe the same thread. Don't drift to a wholly new topic; if that's needed, use the escape hatch and create a new note.

MCP Tools Used

python
# Find existing thread note by thread id (use metadata_filters, not query)
search_notes(
    metadata_filters={"thread_id": "<thread-id>"},
    project="<project>"
)

# Or, without a thread id, find it by topic
search_notes(query="<thread topic>", project="<project>")

# Read existing thread note (use the full permalink from search results)
read_note(
    identifier="<full-permalink>",
    project="<project>"
)

# Create
write_note(
    title="<title>",
    content="<markdown body — frontmatter is generated from title/tags/metadata>",
    directory="<folder>",
    tags=["..."],
    metadata={"thread_id": "<thread-id>"},  # omit if no stable id
    project="<project>"
)

# Overwrite an existing note (same path)
write_note(
    title="<same title>",
    content="<new content>",
    directory="<same folder>",
    tags=["..."],
    metadata={"thread_id": "<same thread-id>"},  # omit if no stable id
    overwrite=True,
    project="<project>"
)

Examples

Example 1 — First capture during a brand design conversation

Preceding conversation: The user has been working through visual identity decisions for a new product. They settled on a deep navy primary (#2B3651), explored accent options and chose orange (#F26B3A) for warmth, and picked Inter as the body font with Helvetica Neue as the display font.

User asks to capture.

Result — note created:

markdown
---
title: Visual identity — initial decisions
type: note
thread_id: 7c1d4a2e-3b5f-4d8a-9e1c-2f6b8a4d7c39
tags:
- branding
- design
---

# Visual identity — initial decisions

## Context

Working through the visual identity for the new product. This thread covers the initial palette and typography pass — a starting point that will likely be refined.

## Color palette

- Primary: deep navy `#2B3651` — calm and professional
- Accent: warm orange `#F26B3A` — energy and warmth as a complement to the navy

## Typography

- Body: Inter — neutral, readable at small sizes
- Display: Helvetica Neue — strong presence for headings without being heavy

## Observations

- [decision] Primary color is navy `#2B3651` #branding
- [decision] Accent color is orange `#F26B3A` #branding
- [decision] Inter for body, Helvetica Neue for display #typography
- [tradeoff] Considered teal as accent; orange tested better for warmth #branding

## Relations

- relates_to [[Brand Strategy]]
Example 2 — Update capture later in the same thread

Preceding conversation (continued): After the initial decisions above, the conversation continued. The orange accent felt too aggressive in mock-ups, so we tested a coral (#E89B7A) which read warmer and more refined. The body font also shifted: Geist felt slightly tighter and more modern than Inter. Helvetica Neue for display stayed.

User asks to capture again — same thread.

Result — same note rewritten (note the same thread_id):

markdown
---
title: Visual identity — initial decisions
type: note
thread_id: 7c1d4a2e-3b5f-4d8a-9e1c-2f6b8a4d7c39
tags:
- branding
- design
---

# Visual identity — initial decisions

## Context

Working through the visual identity for the new product. This thread settled on a navy + coral palette and a Geist/Helvetica typography pairing after a round of refinement.

## Color palette

- Primary: deep navy `#2B3651` — calm and professional
- Accent: coral `#E89B7A` — warm and refined

The accent went through a round of revision: an initial orange (`#F26B3A`) felt too aggressive in mock-ups, so we shifted to a coral that reads warmer and more refined while keeping the energy.

## Typography

- Body: Geist — slightly tighter and more modern than Inter, which we tried first
- Display: Helvetica Neue — strong presence for headings without being heavy

## Observations

- [decision] Primary color is navy `#2B3651` #branding
- [decision] Accent color is coral `#E89B7A` — warmer and more refined than the originally-chosen orange #branding
- [decision] Geist for body, Helvetica Neue for display #typography
- [tradeoff] Inter felt neutral but Geist edged it for spacing and modernity #typography
- [tradeoff] Orange accent rejected as too aggressive; coral preferred #branding

## Relations

- relates_to [[Brand Strategy]]

Notice that:

  • The orange and Inter decisions are no longer the primary content — they're acknowledged in prose ("which we tried first," "originally-chosen orange") and in tradeoff observations
  • There is no "Changes" section at the bottom — revisions are integrated where they belong
  • The note still reads top-to-bottom as a single coherent document
  • The thread_id is unchanged, so the note was updated in place rather than duplicated

Best Practices

  1. Capture the current state, not the history. The note represents where the thread has landed.
  2. Synthesize, don't log. Each invocation produces a coherent document, not an accumulating record.
  3. Brief prose for revisions. A sentence in the section that changed is enough — don't add a changelog.
  4. Always run the same-thread lookup before deciding to create or update.
  5. Use observations for the structured layer. Decisions, insights, tradeoffs go in ## Observations so they're searchable.
  6. Link relations liberally. Notes the user might want to reach from this one.

© basicmachines-co, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/memory-capture of basicmachines-co/basic-memory.

Open the folder on GitHubat commit 6982cfc

Compare with similar skills

Memory Capture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Capture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Capture this skillbasicmachines-co/basic-memory4.1k—~2.8kAutomated safety check: PassAGPL-3.0
Capturealirezarezvani/claude-skills28k1 repos~2.8kAutomated safety check: PassMIT
Cost Conversationruvnet/ruflo74k—~407Automated safety check: NotesMIT
Conversation Memorydavila7/claude-code-templates32k4 repos~440Automated safety check: PassMIT
Conversation Archivegarrytan/gbrain31k—~5.5kAutomated safety check: PassMIT
Landing Page Conversion Auditgithub/awesome-copilot40k1 repos~1.8kAutomated safety check: PassMIT

Similar skills

  • Capture

    alirezarezvani/claude-skills

    Captures and organizes chaotic brain dumps into a structured, actionable system with zero information loss.

    28k GitHub starsUsed in 1 repo~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Cost Conversation

    ruvnet/ruflo

    Per-conversation cost view — list every session in cost-tracking with started-at, message count, top model, and total cost

    74k GitHub stars~407 tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Conversation Memory

    davila7/claude-code-templates

    Persistent memory systems for LLM conversations including short-term, long-term, and entity-based memory Use when: conversation memory, remember, memory persistence, long-term memory, chat history.

    32k GitHub starsUsed in 4 repos~440 tokens
    Agent WorkflowsAuto-check passed
  • Conversation Archive

    garrytan/gbrain

    Import AI-assistant chat exports (ChatGPT, Claude, Perplexity) and agent session transcripts into the brain as one dated page per conversation under conversations/, validate each page against the…

    31k GitHub stars~5.5k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Landing Page Conversion Audit

    github/awesome-copilot

    Official

    Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact.

    40k GitHub starsUsed in 1 repo~1.8k tokens
    Frontend & DesignAuto-check passed
  • Turn This Into A Thread

    sickn33/agentic-awesome-skills

    Turn a long idea, transcript, article or draft into a Twitter/X thread where every tweet stands alone.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    Writing & ContentAuto-check passed

More from basicmachines-co/basic-memory

All 49 skills in this repo
  • cmux Settings Editor

    basicmachines-co/basic-memory

    Views, sets, unsets and validates cmux settings in ~/.config/cmux/cmux.json with a helper script that checks keys against the schema.

    4.1k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • cmux Window and Pane Control

    basicmachines-co/basic-memory

    End-user control of cmux topology and routing (windows, workspaces, panes/surfaces, focus, moves, reorder, identify, trigger flash). Use when automation needs…

    4.1k GitHub starsUsed in 2 repos~842 tokens
    Auto-check passed
  • Cmux Markdown Viewer Panel

    basicmachines-co/basic-memory

    Opens markdown files in a formatted cmux panel beside the terminal that re-renders on every change, handy for plans and task lists.

    4.1k GitHub starsUsed in 2 repos~527 tokens
    Auto-check passed
  • cmux Workspace Scoping

    basicmachines-co/basic-memory

    Keeps agent actions scoped to the cmux workspace and terminal that invoked it, and lays out pane and surface commands that avoid disrupting the user's own focus.

    4.1k GitHub starsUsed in 2 repos~1.7k tokens
    Auto-check passed
  • Basic Memory Repo Images

    basicmachines-co/basic-memory

    Produces PR, changelog and two-week retro images for the Basic Memory repository from evidence in PR bodies, saved to fixed paths under docs/assets/infographics.

    4.1k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Logfire Instrumentation

    basicmachines-co/basic-memory

    Adds Pydantic Logfire tracing, logging and metrics to Python, JavaScript or TypeScript and Rust projects, with the correct setup order and library extras.

    4.1k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Questions about Memory Capture

What does Memory Capture do?

Capture the current state of a working thread or conversation into a single coherent Basic Memory note — synthesize where it landed, don't append a log. Memory Capture is an agent skill from basicmachines-co/basic-memory. Capture the current state of a working thread or conversation into a single coherent Basic Memory note — synthesize where it landed, don't append a log.

How do I install Memory Capture in Claude Code?

Run `npx skills add basicmachines-co/basic-memory --skill memory-capture -a claude-code`. Or copy the skill folder (skills/memory-capture in basicmachines-co/basic-memory) into .claude/skills/memory-capture in your project. Claude Code loads it when a task matches its description.

How do I install Memory Capture in Codex?

Run `npx skills add basicmachines-co/basic-memory --skill memory-capture -a codex`. Or copy the skill folder (skills/memory-capture in basicmachines-co/basic-memory) into .agents/skills/memory-capture in your project. Codex loads it when a task matches its description.

Can I use Memory Capture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add basicmachines-co/basic-memory --skill memory-capture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-capture, .gemini/skills/memory-capture, .github/skills/memory-capture and .opencode/skills/memory-capture in your project.

What does Memory Capture need to run?

SKILL.md names no scripts, command-line tools or credentials: Memory Capture is instructions for the agent only. Our summary lists: Python 3.

Does Memory Capture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Memory Capture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Memory Capture use?

Memory Capture is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Capture use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory Capture?

Skills that share tags, products or a category with Memory Capture: Capture (alirezarezvani/claude-skills, 28k stars), Cost Conversation (ruvnet/ruflo, 74k stars), Conversation Memory (davila7/claude-code-templates, 32k stars) and Conversation Archive (garrytan/gbrain, 31k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Capture?

basicmachines-co (a GitHub organization) maintains it in basicmachines-co/basic-memory, which has 4,107 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

Source: basicmachines-co/basic-memory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.