distill
БесплатноБез исполняемых скриптовНе проверенSynthesize wiki pages from related memories. One endpoint, one flow: daemon clusters and synthesizes what it can; agent finishes whatever the daemon couldn't…
от davepoon★ 3 815 звёзд на GitHubОб этом скилле
/distill
Force a distillation pass now. The daemon's background distill cycles run
on its own clock; /distill is the explicit user-triggered pass.
Mental model
Distillation is four operations bundled into one flow:
- emerge — cluster new memories into new pages
- absorb — assign orphan memories to existing pages, propose new pages from topics that 2+ existing pages link to but no page is named for
- refresh — regenerate stale pages from their source memories (only when the user has not edited the page; pages you have touched stay locked)
- merge — combine duplicate pages flagged by the daemon's global review
The default flow runs all four. The rebuild verb is a destructive opt-in
that overrides the lock on a single page.
Single flow
One POST to the daemon. Response splits into:
pages_created/created_ids: pages the daemon synthesized itself (only when daemon has an LLM).pending: clusters the daemon couldn't finish. The agent synthesizes each in this session and POSTs them back to/api/pages.
Trigger timing is the only thing that differs between background distill cycles and this skill. Code path is the same; daemon hands back clusters when it can't synthesize; whoever called fills in the rest.
Flow
1. Pick the scope
For bare /distill, infer a target from cwd:
Bash: top=$(git -C "$PWD" rev-parse --show-toplevel 2>/dev/null); \
common=$(git -C "$PWD" rev-parse --git-common-dir 2>/dev/null); \
if [ -n "$common" ]; then \
case "$common" in /*) root=$(dirname "$common");; *) root=$(cd "$top" && cd "$(dirname "$common")" && pwd);; esac; \
basename "$root"; \
fi
- Output → use it (e.g.
origin). - Not a git repo → fall back to
basename "$PWD". - Reserved keyword
deep→ no scope (global pass). - Reserved keyword sequence
rebuild <page-id>→ calldistill(target=<page-id>, force=true). Confirms "Rebuild page? Your edits will be wiped, page regenerates from sources." before proceeding. Skip the rest of this skill — single-page rebuild does not produce pendingclusters; the daemon's response shape is{"status": "ok", "force": true, "page_id": ..., "updated": true}. Report verbatim.
For /distill <arg> → forward <arg> to target.
2. Call the MCP tool
distill(target="<scope>")
The tool returns the daemon's full JSON payload as text. Parse it as JSON. Possible shapes:
{
"pages_created": 0,
"scoped": true,
"created_ids": [],
"pending": [
{ "source_ids": [...], "contents": [...], "entity_id": ...,
"entity_name": ..., "space": ..., "estimated_tokens": ... },
...
],
"stale_pages": [
{ "page_id": ..., "title": ..., "summary": ...,
"source_memory_ids": [...], "stale_reason": "source_updated",
"user_edited": false, "sources_updated_count": 3 },
...
],
"stale_truncated": false,
"orphan_topics": [
{ "label": "Topic Z", "count": 3 },
...
]
}
The route never invokes the daemon LLM. created_ids is always empty
when called from this skill; pending carries every cluster the
daemon found. The agent synthesizes them in this session — that's why
the LLM choice is consistent with how the user invoked the skill.
unresolved + hint: relay to user verbatim and stop.
3. Synthesize each pending cluster
The daemon route filters out clusters fully covered by an existing page (subset or Jaccard ≥ 0.8). What remains is either:
- A brand-new cluster (no existing page) → create a new page.
- A refresh candidate (
existing_page_idis set) → the cluster has new memories beyond what's in the matched page. The agent has LLM access, so the right move is to refresh the existing page in the same pass.
Cluster shape:
pending: [
{
source_ids, contents, entity_id, entity_name, space,
estimated_tokens,
existing_page_id?, existing_page_title?, new_memory_count?
},
...
]
For each cluster, first run a coherence check before synthesizing:
- Skim every memory in
cluster.contents. - If the cluster has ≥ ~4 memories and the topics scatter (entity
shared but the memories cover unrelated sub-topics — e.g. all tagged
Originbut spanning RwLock bugs, schema choices, onboarding UI, migrations, and CSS), the cluster is incoherent. Skip synthesizing it. Record it for the report under "Skipped (low coherence)" with the existing page title (if refresh) or a short topic hint (if new). - Coherent cluster (memories share an actual topic, not just an entity tag) → proceed to synthesis.
The coherence judgement is something only the agent can do — it needs to read the prose. Daemon clustering is heuristic; agent is the final filter against producing a grab-bag page.
For each coherent cluster:
- Title: short noun phrase. Use
existing_page_titlewhen refreshing unless the new memories materially change the topic. For new clusters:cluster.entity_nameif s
Установить distill в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
mcp__plugin_origin_origin__recallmcp__plugin_origin_origin__distillmcp__plugin_origin_origin__create_pagemcp__plugin_origin_origin__update_pagemcp__plugin_origin_origin__delete_pagemcp__plugin_origin_origin__get_page_sourcesBashFAQ
Что делает скилл distill?
Synthesize wiki pages from related memories. One endpoint, one flow: daemon clusters and synthesizes what it can; agent finishes whatever the daemon couldn't (no LLM or cluster too big). Invoked as `/distill [target]`.
Как установить скилл distill?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл distill запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic