memory-distill

memory-distill is a skill for Claude Code, Codex from Meari-Prototype/iftree-editor. It costs 95 tokens per session (1,867 once invoked), scanned A, original, Apache-2.0.

A memory-review tool that turns saved conversation records into proposed long-term notes, with references back to their original messages.

In plain words
What is it for?
Use it to review an event record, compare it with existing memory, and prepare additions, updates, or no change for a person to approve.
Why use it?
It helps find reusable facts without treating every conversation detail as permanent memory or writing changes without approval.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/meari-prototype/iftree-editor/memory-distill
Any agent
npx skills add Meari-Prototype/iftree-editor --skill memory-distill
Clone the repo
git clone --depth 1 https://github.com/Meari-Prototype/iftree-editor

Made for: Claude Code, Codex.

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-distill

README.md
[![agentmods](https://agentmods.dev/badge/skills/meari-prototype/iftree-editor/memory-distill.svg)](https://agentmods.dev/skills/meari-prototype/iftree-editor/memory-distill)
Your own site
<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="Measured on agentmods" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00095 $0.01867
Opus 5 $0.00048 $0.00933
Sonnet 5 $0.00019 $0.00373
Haiku 4.5 $0.00010 $0.00187

Measured 3d ago against content hash d1553ebabe64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 3d 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.

.iftree-llm-workspace/skills/memory-distill/SKILL.md · 88 lines

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,默认关)。

原则

  1. 提炼是复盘出提议、不是写入。 你产出一份 diff,受控事实只经人审批落地 (15-11-4/A5/8-3,记忆编辑无论是否冲突都人批)。不得直写当前事实层、 不得绕过审批把结论固化(18-8-3);走"提炼+人审"这条链本身就是记忆的合法来源。
  2. 先检索会撞车的旧记忆,再提议(硬步骤,不得跳过)。 只有把相关旧条目摆到 面前,才谈得上"合并进已有"而非新增近重复。逐洞见判:新增 / 更新旧条目 (删旧留最新 15-11-3)/ 跳过。陈旧检测就在这一步——新事件比对现有事实、 发现矛盾才提议更新(同主题冲突新者胜,时间戳只表新旧)。
  3. 强制回指出处(15-11-1)。 每条事实必须以引用(9)回指它来自哪个卷的 哪个节点;对话/卷里从未出现过的条目不准写,凭空生成判错。
  4. 可零产出。 一卷未必值得写一条核心记忆。没有该记的就不写——照样把卷标记 已提炼("看过了",不是"抽到了"),别为了凑产出硬写。
  5. 一卷多条、以引用互链(15-11-2)。 一个卷里几件互相独立的事,拆成几条 各自的事实、彼此以引用接上;引用是组织手段,不复用实体层(13)。

时机

  • 召回撞见(主时机):开工读核心记忆时,尾部若有程序写的"存在待提炼,请提示 用户处理会话"提示(15-11-5),就把它转达用户、经其确认后发起。
  • 用户明示:"提炼一下""复盘一下""记一下"——当场发起。
  • 范围与人共定:被点名的卷优先;积压多卷时跟用户商定优先级,别一次硬清。 一卷一复盘是默认粒度。

复盘程序

  1. 读卷——只读发言部分。read/tree 取目标卷的用户/助手正文; 非必要不读工具调用节点(省 token,要的是"发生过什么"的结论性内容,不是 每次 grep 的参数)。
  2. 读现有核心记忆。 目标是卷的 agent 身份对应的那一篇:library/memory/<身份>.md (按卷的 agent 路由,如 claude-code 卷 → library/memory/claude-code.md; 不存在则本次提炼新建)。核心记忆按身份一篇、跨工作区;区分项目靠条目自带的 工作区上下文与召回时的 workspace 过滤(15-12-8)。
  3. 读不动就停下问。 卷发言 + 现有核心记忆塞不进上下文时(核心记忆单篇合理上限 约模型窗口 10%,15-11-6),不要硬读半截就下结论——停下问用户:分段读, 还是缩范围 / 换策略。
  4. 和人复盘。 把你读出的"该记 / 该改 / 该删旧"对着用户讲一遍,确认有没有、 对不对、要不要拆条。这一步是记忆可靠的前提(可靠来自"对照已有记忆重新审视" 这一动作加人审,不来自你单方断言),不是走过场。
  5. 提 diff。 据复盘共识在核心记忆文档上开 edit branch(set_mode fulledit, owner=llm,不直接落主库),逐洞见做 新增 / 更新(删旧留最新)/ 跳过;拆多条就 ref.addNodeToNode 互链;每条以引用回指来源卷节点。
  6. 人审落地。 人在 merge 视图裁决(A5/8-3);合并了才成受控事实,写进 library/memory/<身份>.md。冲突或受阻一律等人,不自行解。
  7. 收尾。 卷标 mark_distilled(含零产出的卷);程序随之清掉核心记忆尾部那条 待提炼提示。提炼状态每卷独立,不设全局游标。

动词清单

  • 读:read / tree / find(卷与现有核心记忆)。
  • 提 diff:set_mode(切 full)/ edit(node.* 写动作)/ ref(互链、回指出处)/ draft(看草稿)/ diff(看暂存改动,--detail summary 出计数)。
  • 人审:merge(人在 UI 裁,agent 不自动解冲突)。
  • 收尾:memory_distill { docId: <卷> }
  • 命令行 db 外壳同名可用。

Read the full file on GitHub · 88 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. 3d ago First seen · 88 lines · 95 tokens per session scan A d1553ebabe64

Subscribe to this mod's changes

memory-distill is a skill published in the GitHub repository Meari-Prototype/iftree-editor (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,867 once invoked, about $0.0005 per session on Opus 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.

Related

Other skills, from other repositories

teak

Use when an agent needs to save, search, retrieve, update, favorite, delete, or sync Teak cards through the Teak CLI, public API, MCP server, or TypeScript SDK.

praveenjuge/teak · 43 tokens

synorive

检索用户本机的内容库 —— 文档、代码、图片里的文字、网页存档、视频台词,都能用中文语义搜。当用户提到"我之前存过""找一下我的""那个文件在哪""我记得看过"这类需要翻自己资料的请求时用它。也能把新文件加入索引、找相似内容、按时间看分布、看实体关系图。不要用于搜索公开网络信息(那是 WebSearch 的活)。.

Aevorine/Synorive · 111 tokens

shadcn

Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for…

praveenjuge/teak · 90 tokens

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or reviewing JS/TS code in a project that uses Ultracite — to…

praveenjuge/teak · 142 tokens

convex-create-component

Builds reusable Convex components with isolated tables and app-facing APIs. Use for new components, reusable backend modules, integrations, or component boundary work.

praveenjuge/teak · 35 tokens

convex-migration-helper

Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev/migrations. Use for breaking schema changes, backfills, table reshaping, or zero-downtime rollouts.

praveenjuge/teak · 48 tokens