distill

distill is a skill for Claude Code, Codex from 7xuanlu/wenlan. It costs 39 tokens per session (1,465 once invoked), scanned B, a copy of distill, Apache-2.0.

A command for creating or refreshing source-backed Wenlan pages from groups of related material.

In plain words
What is it for?
It runs a distillation pass for a selected target or resolved workspace, including normal, deep, and rebuild modes.
Why use it?
It helps identify pages that need synthesis or updating and handles cases where the background service cannot finish the work itself.

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 It runs a distillation pass for a selected target or resolved workspace, including normal, deep, and rebuild modes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/7xuanlu/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 7xuanlu/wenlan --skill distill
Clone the repo
git clone --depth 1 https://github.com/7xuanlu/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/7xuanlu/wenlan/distill/github.svg)](https://agentmods.dev/skills/7xuanlu/wenlan/distill)
Your own site
<a href="https://agentmods.dev/skills/7xuanlu/wenlan/distill"><img src="https://agentmods.dev/badge/skills/7xuanlu/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/7xuanlu/wenlan/distill"><img src="https://agentmods.dev/badge/skills/7xuanlu/wenlan/distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,465 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Agent Snooping · line 31
    Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
    Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
  • medium Rogue Agent · line 116
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin 89% copy Near-identical to another mod 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.00039 $0.01465
Opus 5.5 $0.00016 $0.00586
Sonnet 5.5 $0.00008 $0.00293
Haiku 4.5 $0.00004 $0.00146

Measured 3mo ago against content hash 46ffc32b27fc, 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 3mo 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.

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

This is a copy

89% identical to distill — 431 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugin-codex/skills/distill/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/distill

Run a deliberate Wenlan distillation pass. The daemon finds clusters and stale pages; Codex synthesizes any pending clusters the daemon cannot finish.

Argument parsing

Accept one optional space:<name> token:

raw_args="<the full argument string passed to /distill>"
space_arg="$(printf '%s\n' "$raw_args" | grep -oE 'space:[A-Za-z0-9_-]+' | head -1 | cut -d: -f2)"
target="$(printf '%s\n' "$raw_args" | sed -E 's/[[:space:]]*space:[A-Za-z0-9_-]+[[:space:]]*/ /g' | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')"

Resolve space:

# 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" ${space_arg:+--arg "$space_arg"} 2>/dev/null)"
space="$(printf '%s\n' "$resolved" | cut -f1)"
source_layer="$(printf '%s\n' "$resolved" | cut -f2)"

Use an explicit target first. For bare /distill, use the resolved space as the target only when space is non-empty. If the resolver returns unscoped, omit the target.

Scope rules

  • rebuild <page-id>: destructive single-page rebuild.
  • deep: global pass; no target.
  • <target>: pass the target as supplied.
  • bare command with resolved space: pass the resolved space as target.
  • bare command without resolved space: omit target.

Destructive rebuild confirmation

rebuild <page-id> calls:

mcp__wenlan__distill(target="<page-id>", force=true)

This is destructive: user-edited page prose is wiped and regenerated from source memories. Require explicit same-turn confirmation before calling the tool unless the user already wrote an unambiguous rebuild command with the exact id.

If the id is missing or ambiguous, ask for this exact shape:

rebuild <page-id>

A bare page id is not confirmation.

Call the daemon

For non-rebuild flows, call:

mcp__wenlan__distill(target="<scope when present>")

Read the full file on GitHub · 178 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. 3mo ago First seen · 178 lines · 39 tokens per session scan B 46ffc32b27fc

Subscribe to this mod's changes

distill is a skill published in the GitHub repository 7xuanlu/wenlan (79 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 1,465 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). It is 89% identical to distill, differing in 431 lines, and is treated as a copy.

Related

distill compared with skills from other repositories

distill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
distill7xuanlu/wenlanSkill791mo agoApache-2.0B39Claude Code, Codex
run-wenlan-appwenlan-app/wenlanSkill502todayApache-2.0A71Claude Code
wenlan-capturewenlan-app/wenlanSkill502todayApache-2.0A66Claude Code, Codex
curatewenlan-app/wenlanSkill502todayApache-2.0A122Claude Code
wenlan-handoffwenlan-app/wenlanSkill502todayApache-2.0A46Claude Code, Codex
wenlan-recallwenlan-app/wenlanSkill502todayApache-2.0A54Claude Code, Codex
themewenlan-app/wenlanSkill502todayApache-2.0A93Claude Code