Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Borda/AI-Rig/plugin install foundryWrote 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.
[](https://agentmods.dev/skills/borda/ai-rig/distill)<a href="https://agentmods.dev/skills/borda/ai-rig/distill"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/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.
<a href="https://agentmods.dev/skills/borda/ai-rig/distill"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.05707 |
| Opus 5.5 | $0.00028 | $0.02283 |
| Sonnet 5.5 | $0.00014 | $0.01141 |
| Haiku 4.5 | $0.00007 | $0.00571 |
Grade A, and why
distill scanned grade A 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 10d 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 directorieslowAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find "$HOME/.claude/plugins/cache" -mindepth 2 -maxdepth 2 -type d 2>/dev/null | while IFS= read -r p; do Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze how Claude Code is used, surface concrete improvements — new agents/skills to reduce repetition, or consolidate lessons into governance files (rules, agent instructions, skill updates) — without duplicating what exists.
NOT for single-file edits or quality checks — use /foundry:audit for config quality checks. NOT for audit-only scan for extraction candidates (use /foundry:audit --efficiency instead of distill executables for detection-only).
- $ARGUMENTS: optional. Modes:
- Omitted: analyze existing patterns and agents; generate suggestions proactively.
prune [--eager]— evaluate project memory file for stale, redundant, or verbose entries. Default: advisory diff + apply prompt.--eager: score every entry (Usage likelihood × Impact → Tier P0/P1/P2), print full scored table with#column, let user select by tier or item numbers, delegate edits tofoundry:curator.memory [--eager]— read.notes/lessons.md, memory feedback files and recurring transcript tool failures (bin/mine_transcript_failures.py), distill recurring patterns into proposed rule files, agent instruction updates, skill workflow changes.--eager: include Pattern count, Strength, Tier columns in proposal table; let user select clusters to promote by tier or item numbers; delegate writes tofoundry:curator.external <source> [--eager]— analyse external plugin, skill, or agentic resource, produce structured adoption proposal.<source>is URL, file path, or local directory.--eager: lower adoption bar — recommend partial adoption even for single useful components.executables [--eager] [<run-dir-or-report-path>]— perform bin/ extraction from/foundry:audit --efficiencyCheck 33 candidates. Auto-detects latest run dir under.reports/audit/; pass optional path to target specific run dir or report file. Runs inline Check 33 scan when no report exists. Default gates on HIGH/MEDIUM verdict.--eager: also surface LOW verdict clusters as extraction candidates. Spawnsfoundry:sw-engineerper cluster. Skip to Mode: Executables Extraction below.[--eager] <recurring task description>— use description as context when generating suggestions.--eager: lower frequency threshold from 3+ to 2+ occurrences; single high-effort occurrence also qualifies.--project— inpruneandmemorymodes, show interactive project picker: enumerate all slugs under~/.claude/projects/*/memory/with MEMORY.md size in tokens, let user select which project(s) to operate on. Omit to operate on the current project's memory only (the working directory's memory dir, resolved byresolve_memory_dir.py) — other projects are never touched without the picker. No effect on other modes.
Task hygiene — task tools may be deferred; load before first use: ToolSearch(query="select:TaskList,TaskCreate,TaskUpdate,TaskGet", max_results=4). Call TaskList first and triage each task it returns: completed if work clearly done, deleted if orphaned, keep in_progress only if genuinely continuing. Never spend a turn on bookkeeping alone — every TaskCreate/TaskUpdate ships in the same response as the next substantive tool call; one exception, TaskUpdate(completed) immediately before a long output block (rules/task-lifecycle.md).
PLUGIN_ROOT=$(python "${CLAUDE_PLUGIN_ROOT}/bin/resolve_plugin_root.py" --plugin-name foundry) || exit $?; export PLUGIN_ROOT
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
python "$PLUGIN_ROOT/bin/parse-skill-flags.py" --flags eager,project --keep-state distill-state --out-file "${TMPDIR:-/tmp}/distill-state-${CSID}/keep-items" -- "$ARGUMENTS" >/dev/null # timeout: 5000 — no eval; distill-state-<flag>-${CSID} sentinels, keep-items into the state dir it makes, clears stale contract
IFS= read -r EAGER < "${TMPDIR:-/tmp}/distill-state-eager-${CSID}" 2>/dev/null || EAGER=false
IFS= read -r PROJECT_FLAG < "${TMPDIR:-/tmp}/distill-state-project-${CSID}" 2>/dev/null || PROJECT_FLAG=false
IFS= read -r CLEAN_ARGS < "${TMPDIR:-/tmp}/distill-state-clean-args-${CSID}" 2>/dev/null || CLEAN_ARGS=""
echo "EAGER=$EAGER" # shell vars don't persist across Bash calls — read from stdout
echo "PROJECT_FLAG=$PROJECT_FLAG"
echo "ARGUMENTS_FINAL=$CLEAN_ARGS"
What ships with it
4 files 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.
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.
- 10d ago Changed · +37 lines 952fced0b70a
- 12d ago Changed 44c421a6919a
- 18d ago Changed · +9 lines · +3 tokens per session f5890de16ac1
- 28d ago Changed 8bc35fab3c64
- 1mo ago Changed · -5 lines a9c1e9231c6d
- 1mo ago Changed dd5003ce12ba
- 1mo ago Changed · +1 lines ba25890e2b96
- 2mo ago Changed · -4 lines 6ba02e7c4e60
- 2mo ago Changed · +2 lines 929cc2df8577
- 2mo ago First seen · 269 lines · 68 tokens per session scan A e7907e74f809
distill is a skill published in the GitHub repository Borda/AI-Rig (31 stars, last pushed yesterday), licensed Apache-2.0. It adds 71 tokens to every session and 5,707 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
distill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| distillBorda/AI-Rig | Skill | 31 | yesterday | Apache-2.0 | A | 71 | Claude Code |
| memory-reviewhoangsonww/Claude-Code-Agent-Monitor | Skill | 1.2k | yesterday | MIT | A | 93 | Claude Code, Codex |
| context-optimizerhuangwb8/skills | Skill | 51 | 2d ago | MIT | A | 48 | Claude Code, Codex |
| context-engineeringitsmostafa/llm-engineering-skills | Skill | 26 | 6mo ago | MIT | A | 42 | Claude Code |
| handoverisvlasov/rageatc-oss | Skill | 10 | 4mo ago | MIT | A | 45 | Claude Code |
| learnisvlasov/rageatc-oss | Skill | 10 | 4mo ago | MIT | A | 32 | Claude Code |
| review-memorystuartshields/claude-setup | Skill | 2 | 6mo ago | MIT | A | 35 | Claude Code |