Skip to content

/memory-seed

Extract L1 memory atoms from Claude Code conversation history. Run manually via /memory-seed.

From plugin
tencentdb-agent-memory
128 skills1 agent2 commands5 hooks

Claude Code

$ npx -y skills add baodq97/tencentdb-agent-memory --skill memory-seed --agent claude-code

SKILL.md

memory-seed.SKILL.md
name: memory-seed
description: Extract L1 memory atoms from Claude Code conversation history. Run manually via /memory-seed.
disable-model-invocation: true

Memory Seeding

Read conversation transcripts from `~/.claude/projects/` and extract structured L1 memory atoms. You perform all extraction — no external LLM needed.

Workflow

1. Find pending sessions

tmem sessions

If no pending sessions, tell the user and stop.

2. For each pending session

Read the conversation:

tmem read-session SESSION_FILE_PATH

3. Extract memories

Read the extraction guide for detailed rules:

cat ${CLAUDE_PLUGIN_ROOT}/skills/memory-seed/references/extraction-guide.md

Analyze the conversation and produce a JSON array of memories. Each memory needs `content`, `type`, `priority`, `scene_name`, `source_message_ids`, `metadata`.

**Grounding (important):** populate `source_message_ids` with the actual transcript message `uuid`s the memory was drawn from. `tmem write-l1 --session` runs a deterministic grounding check — an atom whose `content` does not overlap its cited source messages is **dropped as confabulation**. Leaving `source_message_ids` empty skips the check (atom kept ungated), so cite real ids to get protection, and never invent facts absent from the source. Note: the check is lexical (shared words), so a heavily paraphrased/normalized atom (e.g. expanding an acronym the source never spelled out) can be dropped even when truthful — keep some of the source's own wording in `content`, or leave `source_message_ids` empty if you must paraphrase far.

**Three types with scope routing:**

  • **persona** (priority 50-100) → stored globally. Stable user attributes, preferences.
  • **episodic** (priority 60-100) → stored per-project. Events, decisions, plans.
  • **instruction** (priority 70-100) → stored globally. AI behavior rules.

**Filtering — skip these:**

  • Greetings, filler, one-time requests
  • AI tool outputs, error messages
  • Anything already covered by existing memories (check with `tmem search <keyword>` if unsure)

If a session has no extractable memories, mark it done and move to the next.

4. Write atoms

Write the JSON array to a temp file to avoid shell escaping issues, then pipe it:

cat <<'ATOMS_EOF' | tmem write-l1 --session SESSION_ID
[{"content": "...", "type": "persona", "priority": 80, "scene_name": "...", "source_message_ids": ["<real-uuid-from-transcript>"], "metadata": {}}]
ATOMS_EOF

5. Verify and hint

tmem status
tmem changelog --last 10

After seeding, tell the user: **Next: use the memory-consolidate skill** to group atoms into scenes and synthesize persona.

Read more
@baodq97
Ships withtencentdb-agent-memory

Four-layer long-term memory (L0 Conversation → L1 Atom → L2 Scene → L3 Persona) for Claude Code, inspired by Tencent/TencentDB-Agent-Memory. Fully local — no external Gateway, no paid API, no Python.

Stars on GitHub

Momentum

stars in total
12
Star history of baodq97/tencentdb-agent-memory on GitHub, a chart by star-history.com

Other skills on tencentdb-agent-memory.

memory-view
Auto-invoked

memory-view

Open the memory visualiser in the browser — a health check on the memory store: is it working, what is wrong, and what to run to…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about memory-seed.

Which coding agents can use memory-seed?
memory-seed installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.