distill

distill is a skill for Claude Code, Codex from wenlan-app/wenlan. It costs 51 tokens per session (3,781 once invoked), scanned B, original, Apache-2.0.

A workflow for turning saved Wenlan material into source-backed pages, or refreshing pages that have become outdated. It can process a selected target or run a deeper pass across the project context.

In plain words
What is it for?
Use it to synthesize pages, refresh stale pages, or rebuild one page when needed.
Why use it?
It organizes scattered project knowledge into pages that are easier to consult and keeps those pages aligned with their sources.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to synthesize pages, refresh stale pages, or rebuild one page when needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wenlan-app/wenlan/distill
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.

Any agent
npx skills add wenlan-app/wenlan --skill distill
Clone the repo
git clone --depth 1 https://github.com/wenlan-app/wenlan

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 distill

README.md
[![agentmods](https://agentmods.dev/badge/skills/wenlan-app/wenlan/distill/github.svg)](https://agentmods.dev/skills/wenlan-app/wenlan/distill)
Your own site
<a href="https://agentmods.dev/skills/wenlan-app/wenlan/distill"><img src="https://agentmods.dev/badge/skills/wenlan-app/wenlan/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.

agentmods 80×15 button for distill

Your own site · 80×15
<a href="https://agentmods.dev/skills/wenlan-app/wenlan/distill"><img src="https://agentmods.dev/badge/skills/wenlan-app/wenlan/distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,781 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00051 $0.03781
Opus 5.5 $0.00020 $0.01512
Sonnet 5.5 $0.00010 $0.00756
Haiku 4.5 $0.00005 $0.00378

Measured yesterday against content hash 2c954af24dbe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

distill scanned grade B with 1 finding 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 yesterday.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

resolver="$(find "$HOME/.codex/plugins/cache" -path '*/wenlan/*/bin/resolve-space.sh' 2>/dev/null | head -1)"
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • distill — 89% identical, 440 lines differ
plugin-codex/skills/distill/SKILL.md · 418 lines

How it starts

The opening of the file, as written. The whole thing — 418 lines — stays where its author put it; the contents beside it link to each section on 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.

Resolve the active space

The /distill skill accepts one optional inline token of the form space:<name> anywhere in the argument string. The bundled resolver strips it and returns the rest as the target. It prints the resolved Space line itself:

raw_args="<the full argument string passed to /distill>"
# The resolver ships inside the installed plugin; the relative path only
# exists in a wenlan checkout.
resolver="$(find "$HOME/.codex/plugins/cache" -path '*/wenlan/*/bin/resolve-space.sh' 2>/dev/null | head -1)"
resolved="$("${resolver:-plugin-codex/bin/resolve-space.sh}" --cwd "$PWD" --args "$raw_args")"
space="$(printf '%s\n' "$resolved" | cut -f1)"
source_layer="$(printf '%s\n' "$resolved" | cut -f2)"
target="$(printf '%s\n' "$resolved" | cut -f3-)"

Read the full file on GitHub · 418 lines

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. yesterday Changed · +3 lines 2c954af24dbe
  2. 3d ago Changed · +257 lines · +12 tokens per session 2e217ff2dfe3
  3. 4d ago First seen · 158 lines · 39 tokens per session scan B df098e61e6e9

Subscribe to this mod's changes

distill is a skill published in the GitHub repository wenlan-app/wenlan (82 stars, last pushed yesterday), licensed Apache-2.0. It adds 51 tokens to every session and 3,781 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-11.