distill-tools
Skill4 starsChanged 8 days agoApache-2.0View on GitHub
Audit recent session work and git history to turn repetitive or token-heavy workflows into lean scripts or Skills, and prune stale ones. Invoke via /distill-tools or when asked to save repeated actions as reusable tools.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- contributeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Apply the ROI filter: Keep a candidate ONLY if it meets at least one criterion:
- Distinctive: line 25
Trigger: When to use it.
- Very specific: line 29
Scripts (
scripts/agent/): Use set -euo pipefail (for bash), chmod +x, 1-line success output, filtered errors only on non-zero exit. - Very specific: line 30
Skills (
.claude/skills/<name>/SKILL.md): Keep YAML description to max 2 sharp trigger sentences.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Distill Tools
Convert repetitive, deterministic, or noisy workflows into minimal-context reusable assets. Act autonomously: do not wait for approval. Only ask first when a change would delete or rewrite a tool the user wrote by hand.
1. Read-Only Audit
- Inventory existing assets: Inspect
scripts/agent/(andscripts/agent/README.md),.claude/skills/, andpackage.json(or Makefile) to avoid duplicates and spot broken/stale tools. - Scan recent work: Review the current session for repeated multi-step commands (3+ times), verbose outputs (tests, builds, linters, typechecks, migrations) that burned tokens, or fragile verification loops. Unless scoped to session-only, also run
git log -n 15 --stat. - Apply the ROI filter: Keep a candidate ONLY if it meets at least one criterion:
- Deterministic sequence repeated 3+ times (or weekly).
- Wraps noisy output into a 1-line
OKon pass and errors-only (no ANSI noise) on fail. - Prevents a multi-step mistake that burns debugging tokens.
- Skip one-offs, trivial 1-line aliases, and MCP servers where a local script suffices.
- Pick the leanest format:
scripts/agent/<name>.sh(or.mjs) for deterministic execution and output filtering..claude/skills/<name>/SKILL.mdonly when judgment, domain rules, or multi-step orchestration is needed.Prunefor obsolete or duplicated tools.
2. Select
Take at most 3 items ranked by token ROI. For each, settle internally:
- Trigger: When to use it.
- Contract: Inputs and exact compact stdout/stderr behavior.
3. Implement (no approval needed)
- Scripts (
scripts/agent/): Useset -euo pipefail(for bash),chmod +x, 1-line success output, filtered errors only on non-zero exit. Add a single-line entry toscripts/agent/README.md. - Skills (
.claude/skills/<name>/SKILL.md): Keep YAMLdescriptionto max 2 sharp trigger sentences; delegate shell work toscripts/agent/. - Verify: Smoke-test each created script once for clean exit codes and compact output, then report the result in 3 lines or fewer, as a compact table:
| Action | Path | Token Saving |
| Created / Pruned | path/to/file | 1-sentence reason |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

