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.
npx skills add Meari-Prototype/iftree-editor --skill memory-distillgit clone --depth 1 https://github.com/Meari-Prototype/iftree-editorWrote 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.
[](https://agentmods.dev/skills/meari-prototype/iftree-editor/memory-distill)<a href="https://agentmods.dev/skills/meari-prototype/iftree-editor/memory-distill"><img src="https://agentmods.dev/badge/skills/meari-prototype/iftree-editor/memory-distill/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.
<a href="https://agentmods.dev/skills/meari-prototype/iftree-editor/memory-distill"><img src="https://agentmods.dev/badge/skills/meari-prototype/iftree-editor/memory-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00095 | $0.01867 |
| Opus 5.5 | $0.00038 | $0.00747 |
| Sonnet 5.5 | $0.00019 | $0.00373 |
| Haiku 4.5 | $0.00010 | $0.00187 |
Grade A, and why
memory-distill 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.
How it starts
The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
长期核心记忆提炼 skill(projectneed 15-11)
把"发生过什么"(事件卷 15-10)复盘成"现在长什么样"(长期核心记忆 15-11)的提议。
本文写给执行提炼的 LLM——内置 agent、Claude Code、Codex 皆可:提炼对执行主体不设限,
门槛在审批、不在提炼(15-11-4)。前提是记忆子系统已启用(15-10-5,默认关)。
原则
- 提炼是复盘出提议、不是写入。 你产出一份 diff,受控事实只经人审批落地
(
15-11-4/A5/8-3,记忆编辑无论是否冲突都人批)。不得直写当前事实层、 不得绕过审批把结论固化(18-8-3);走"提炼+人审"这条链本身就是记忆的合法来源。 - 先检索会撞车的旧记忆,再提议(硬步骤,不得跳过)。 只有把相关旧条目摆到
面前,才谈得上"合并进已有"而非新增近重复。逐洞见判:新增 / 更新旧条目
(删旧留最新
15-11-3)/ 跳过。陈旧检测就在这一步——新事件比对现有事实、 发现矛盾才提议更新(同主题冲突新者胜,时间戳只表新旧)。 - 强制回指出处(
15-11-1)。 每条事实必须以引用(9)回指它来自哪个卷的 哪个节点;对话/卷里从未出现过的条目不准写,凭空生成判错。 - 可零产出。 一卷未必值得写一条核心记忆。没有该记的就不写——照样把卷标记 已提炼("看过了",不是"抽到了"),别为了凑产出硬写。
- 一卷多条、以引用互链(
15-11-2)。 一个卷里几件互相独立的事,拆成几条 各自的事实、彼此以引用接上;引用是组织手段,不复用实体层(13)。
时机
- 召回撞见(主时机):开工读核心记忆时,尾部若有程序写的"存在待提炼,请提示
用户处理会话"提示(
15-11-5),就把它转达用户、经其确认后发起。 - 用户明示:"提炼一下""复盘一下""记一下"——当场发起。
- 范围与人共定:被点名的卷优先;积压多卷时跟用户商定优先级,别一次硬清。 一卷一复盘是默认粒度。
复盘程序
- 读卷——只读发言部分。 用
read/tree取目标卷的用户/助手正文; 非必要不读工具调用节点(省 token,要的是"发生过什么"的结论性内容,不是 每次 grep 的参数)。 - 读现有核心记忆。 目标是卷的 agent 身份对应的那一篇:
library/memory/<身份>.md(按卷的agent路由,如 claude-code 卷 →library/memory/claude-code.md; 不存在则本次提炼新建)。核心记忆按身份一篇、跨工作区;区分项目靠条目自带的 工作区上下文与召回时的 workspace 过滤(15-12-8)。 - 读不动就停下问。 卷发言 + 现有核心记忆塞不进上下文时(核心记忆单篇合理上限
约模型窗口 10%,
15-11-6),不要硬读半截就下结论——停下问用户:分段读, 还是缩范围 / 换策略。 - 和人复盘。 把你读出的"该记 / 该改 / 该删旧"对着用户讲一遍,确认有没有、 对不对、要不要拆条。这一步是记忆可靠的前提(可靠来自"对照已有记忆重新审视" 这一动作加人审,不来自你单方断言),不是走过场。
- 提 diff。 据复盘共识在核心记忆文档上开 edit branch(
set_mode full→edit, owner=llm,不直接落主库),逐洞见做 新增 / 更新(删旧留最新)/ 跳过;拆多条就ref.addNodeToNode互链;每条以引用回指来源卷节点。 - 人审落地。 人在 merge 视图裁决(
A5/8-3);合并了才成受控事实,写进library/memory/<身份>.md。冲突或受阻一律等人,不自行解。 - 收尾。 卷标
mark_distilled(含零产出的卷);程序随之清掉核心记忆尾部那条 待提炼提示。提炼状态每卷独立,不设全局游标。
动词清单
- 读:
read/tree/find(卷与现有核心记忆)。 - 提 diff:
set_mode(切 full)/edit(node.* 写动作)/ref(互链、回指出处)/draft(看草稿)/diff(看暂存改动,--detail summary出计数)。 - 人审:
merge(人在 UI 裁,agent 不自动解冲突)。 - 收尾:
memory_distill { docId: <卷> }。 - 命令行 db 外壳同名可用。
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.
- 1mo ago First seen · 88 lines · 95 tokens per session scan A d1553ebabe64
memory-distill is a skill published in the GitHub repository Meari-Prototype/iftree-editor (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,867 once invoked, about $0.0004 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-08-31.
Other skills, from other repositories
link-memory
Use after important user-approved decisions, when durable context should be proposed or reviewed, and for explicit Link memory lifecycle work: remember, recall, review, update, archive, restore, forget, or explain local memories through the CLI without requiring MCP.
link-retrieve
Use before answering work that may depend on user memory, project history, source-backed notes, or prior decisions; retrieve compact Link context through the CLI without loading the whole wiki or requiring MCP.
link-ingest
Use when raw files are present, source pages look stale, or a user asks to ingest notes into Link; refresh source-backed wiki pages, propose memories, and validate updates through the CLI without MCP.
memory-management
Two-tier memory that makes the agent a true workplace collaborator. Decodes shorthand, acronyms, nicknames, and internal language so the agent understands requests like a colleague would. A small personal working-memory file for the hot cache, and the team's Hexis knowledge base (Glossary, People, Projects, How we…
karpathy-llm-wiki
Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.
kb-workflow
Use before starting any non-trivial task to search the knowledge base for context, and after completing work to capture findings. Teaches the token-efficient retrieval pattern and self-learning loop.