memory-extractor

memory-extractor is an agent for Claude Code from XRenSiu/claude-code-forge. It costs 57 tokens per session (1,496 once invoked), scanned A, original, MIT.

A memory-extraction worker that turns redacted source material into dated, emotion-labelled memory entries for a chosen person or relationship type.

In plain words
What is it for?
It is for extracting personal memories, shared memories, and recurring emotional patterns from chat or article collections.
Why use it?
It gives a persona system specific memories it can cite instead of inventing details from a vague summary.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

Part of the persona-distill plugin — 5 skills, 16 agents shipped together

Good fit It is for extracting personal memories, shared memories, and recurring emotional patterns from chat or article collections.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/xrensiu/claude-code-forge/memory-extractor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install persona-distill, the plugin that ships this one along with the rest of its 5 skills, 16 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-extractor

README.md
[![agentmods](https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/memory-extractor/github.svg)](https://agentmods.dev/agents/xrensiu/claude-code-forge/memory-extractor)
Your own site
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/memory-extractor"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/memory-extractor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-extractor

Your own site · 80×15
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/memory-extractor"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/memory-extractor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01496
Opus 5.5 $0.00023 $0.00598
Sonnet 5.5 $0.00011 $0.00299
Haiku 4.5 $0.00006 $0.00150

Measured 1mo ago against content hash 140ee2214e47, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/persona-distill/skills/distill-meta/agents/memory-extractor.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Role

记忆提取器 — 为 self / loved-one / friend 三种 schema 把原始语料转换成可引用的、带情感赋值的、带因果链的记忆条目。

Where other Phase-2 agents produce structured beliefs (persona layers) or capabilities (work analyzer), this agent produces dated episodic anchors that downstream runtime can cite instead of hallucinate. The agent is schema-aware: one invocation emits one component file, tuned to that schema's pronoun discipline and density target.

Borrowed wholesale from notdog1998/yourself-skill (self-memory shape) and titanwings/ex-skill (shared-memories + emotional-patterns shape). We don't invent new memory types — we faithfully apply the component contracts the distill-meta references/components/ already defines.

Inputs

Input Source Required
schema distill-meta Phase-0.5 decision YES — one of self | loved-one | friend
redacted corpus root knowledge/chats/, knowledge/articles/ inside target skill dir YES
matching component spec references/components/{self-memory|shared-memories|emotional-patterns}.md YES — loaded progressively per schema
shared alias registry knowledge/alias-registry.json (if collector produced one) optional

The agent MUST NOT read un-redacted corpus. If it encounters an un-aliased name matching a PII regex, it halts and reports to distill-meta.

Procedure

  1. Branch on schema:
    • self → load self-memory.md component spec only.
    • loved-one → load shared-memories.md AND emotional-patterns.md; emit two files.
    • friend → load shared-memories.md only; emit memories.md without ## Unfinished.
  2. Walk corpus chronologically in ~200-message windows. Apply the component's Extraction Prompt verbatim — this agent does not reinvent extraction logic, it executes the prompt the component file defines.
  3. For self: emit dated first-person entries with emotional_valence, who_else_involved, causal_link, corpus_citation. Target 30-80 entries per dense year.
  4. For loved-one / friend: rewrite entries so we/us/our is the grammatical subject; drop any window where only one side speaks meaningfully. For loved-one, then run a second sweep to extract 5-12 emotional-pattern arcs with the four-stage template (trigger → response → regulation → outcome).
  5. Alias discipline — reuse aliases from the shared registry; never introduce a new alias for an already-seen person.
  6. Emit the component file(s) per each component's ## Output Format section, including the required H2 structure (## Timeline, ## Themes, ## Open Threads / ## Pattern Table, ## Arcs, ## Recognition Cues).

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 90 lines · 57 tokens per session scan A 140ee2214e47

Subscribe to this mod's changes

memory-extractor is an agent published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It adds 57 tokens to every session and 1,496 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other agents, from other repositories

context-finder

Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the code index and prior session memory first and greps last…

futuregerald/futuregerald-claude-plugin · 107 tokens

wiki-ingest

Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.

karlorz/llm-wiki · 64 tokens

data scientist

Ecosystem Data Scientist.

khalilbenaz/MDAN · 8 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens