agentleFS
yairbarak22yairbarak22/TutorAI/.claude/skills/distill-tools/SKILL.md

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.

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
  1. Distinctive:

    Apply the ROI filter: Keep a candidate ONLY if it meets at least one criterion:

    line 13
  2. Distinctive:

    Trigger: When to use it.

    line 25
  3. Very specific:

    Scripts (scripts/agent/): Use set -euo pipefail (for bash), chmod +x, 1-line success output, filtered errors only on non-zero exit.

    line 29
  4. Very specific:

    Skills (.claude/skills/<name>/SKILL.md): Keep YAML description to max 2 sharp trigger sentences.

    line 30

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Inventory existing assets: Inspect scripts/agent/ (and scripts/agent/README.md), .claude/skills/, and package.json (or Makefile) to avoid duplicates and spot broken/stale tools.
  2. 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.
  3. 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 OK on 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.
  4. Pick the leanest format:
    • scripts/agent/<name>.sh (or .mjs) for deterministic execution and output filtering.
    • .claude/skills/<name>/SKILL.md only when judgment, domain rules, or multi-step orchestration is needed.
    • Prune for 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/): Use set -euo pipefail (for bash), chmod +x, 1-line success output, filtered errors only on non-zero exit. Add a single-line entry to scripts/agent/README.md.
  • Skills (.claude/skills/<name>/SKILL.md): Keep YAML description to max 2 sharp trigger sentences; delegate shell work to scripts/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:
ActionPathToken Saving
Created / Prunedpath/to/file1-sentence reason

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.