conversation-distiller

conversation-distiller is a skill for Claude Code, Codex from cloud99277/KitClaw. It costs 57 tokens per session (829 once invoked), scanned A, original, MIT.

A conversation-to-notes tool that turns a finished agent conversation into a structured Markdown document. Markdown is plain text with simple formatting marks.

In plain words
What is it for?
Use it to distil a solved problem into reusable project knowledge and add it to a configured knowledge base.
Why use it?
It preserves conclusions, troubleshooting steps, and solutions without saving the entire chat. Saved notes can be indexed for later searching.

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/cloud99277/kitclaw/conversation-distiller
Any agent
npx skills add cloud99277/KitClaw --skill conversation-distiller
Clone the repo
git clone --depth 1 https://github.com/cloud99277/KitClaw

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 conversation-distiller

README.md
[![agentmods](https://agentmods.dev/badge/skills/cloud99277/kitclaw/conversation-distiller.svg)](https://agentmods.dev/skills/cloud99277/kitclaw/conversation-distiller)
Your own site
<a href="https://agentmods.dev/skills/cloud99277/kitclaw/conversation-distiller"><img src="https://agentmods.dev/badge/skills/cloud99277/kitclaw/conversation-distiller.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 829 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.1 $0.00057 $0.00829
Opus 5 $0.00028 $0.00415
Sonnet 5 $0.00011 $0.00166
Haiku 4.5 $0.00006 $0.00083

Measured 5d ago against content hash 060201a84170, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

conversation-distiller 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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/save_note.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

core-skills/conversation-distiller/SKILL.md · 101 lines

What it actually says

Conversation Distiller

将当前对话提炼为一份结构化 Markdown 笔记,并把它写入 L3 知识库。

它的职责不是保存完整聊天记录,而是把可复用的结论、排查过程和最终方案沉淀为长期知识。

什么时候用

  • 用户说“保存这段对话”“提炼一下并保存”“把刚才的问答整理成笔记”
  • 当前问题已经解决,值得作为 L3 文档长期保留
  • 你希望这次对话能被后续的 knowledge-search 检索到

快速开始

推荐始终使用 JSON mode,避免 shell 转义问题:

cat >/tmp/distill.json <<'JSON'
{
  "title": "[Dev] 端口冲突排查",
  "content": "## 背景与起因\n...\n\n## 排查过程\n1. ...\n\n## 最终方案\n...",
  "base_dir": "~/knowledge-base/40_Agent_Notes/distilled-conversations"
}
JSON

python3 ~/.ai-skills/conversation-distiller/scripts/save_note.py \
  --json /tmp/distill.json \
  --print-json

如果不提供 base_dir,默认行为是:

  1. 读取 ~/.ai-memory/config.json
  2. 取其中第一个 l3_paths 作为知识根目录
  3. 写入 <knowledge-root>/40_Agent_Notes/distilled-conversations/

建议的提炼结构

## 背景与起因
[具体问题、错误、环境]

## 排查/探索过程
1. [步骤]
2. [步骤]

## 关键转折
[哪一步揭示了问题本质]

## 最终方案
[最终做法 + 原理]

## 延伸知识点
- [可选]

自动入库行为

当输出目录位于已配置的 L3 路径下时,脚本会自动:

  1. 运行 ensure-knowledge-frontmatter.py
  2. 运行 rag-engine/knowledge_index.py --update

这样新保存的笔记会尽快进入 L3 检索链路。

环境变量

可选环境变量:

  • CONVERSATION_DISTILLER_BASE_DIR:覆盖默认输出目录
  • CONVERSATION_DISTILLER_KNOWLEDGE_ROOT:覆盖自动识别的知识根目录
  • CONVERSATION_DISTILLER_DB_PATH:覆盖 LanceDB 索引路径
  • CONVERSATION_DISTILLER_AUTO_INGEST:设为 false 可关闭自动入库
  • CONVERSATION_DISTILLER_INDEXER_PYTHON:覆盖 indexer 的 Python 解释器

设计约束

  • 脚本本身零外部依赖(stdlib only)
  • 默认只处理“当前对话”的提炼,不负责历史对话检索
  • 自动入库依赖 KitClaw 自带的 memory-managerrag-engine
  • 对话正文建议通过 JSON 文件传递,不建议用 positional args
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 101 lines · 57 tokens per session scan A 060201a84170

Subscribe to this mod's changes

conversation-distiller is a skill published in the GitHub repository cloud99277/KitClaw (5 stars, last pushed 4mo ago), licensed MIT. It adds 57 tokens to every session and 829 once invoked, about $0.0003 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

llm-wiki

The foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources…

Ar9av/obsidian-wiki · 113 tokens

wiki-status

Show the current state of the wiki — what's been ingested, what's pending, and the delta between sources and wiki content. Use this skill when the user asks "what's the status", "how much is ingested", "what's left to process", "show me the delta", "what changed since last ingest", "wiki dashboard", or wants an…

Ar9av/obsidian-wiki · 210 tokens

wiki-import

Import a wiki knowledge graph into the current vault — either from a graph.json export file (stubs) or from an OKF (Open Knowledge Format) markdown bundle (full page bodies). Use this skill when the user says "import wiki", "import from export", "load graph.json", "import vault", "import OKF bundle", "import OKF"…

Ar9av/obsidian-wiki · 108 tokens

wiki-digest

Generate a periodic knowledge digest — a human-readable newsletter-style summary of what was learned, updated, and connected in your wiki over a specified period (day/week/month). Use when the user says "what did I learn this week", "give me a digest", "weekly summary", "knowledge report", "what's new in my wiki"…

Ar9av/obsidian-wiki · 121 tokens

wiki-research

Autonomously research a topic via multi-round web search, synthesize findings, and file structured results into the Obsidian wiki. Use this skill when the user says "/wiki-research [topic]", "research X", "find everything about Y", "do a deep dive on Z", "autonomous research on X", or wants comprehensive, web-sourced…

Ar9av/obsidian-wiki · 87 tokens

hermes-history-ingest

Ingest Hermes agent history into the Obsidian wiki. Use this skill when the user wants to mine their past Hermes sessions for knowledge, import their /.hermes folder, extract insights from previous Hermes conversations, or says things like "process my Hermes history", "add my Hermes memories to the wiki", "ingest…

Ar9av/obsidian-wiki · 108 tokens