agentleFS
oliverweissloliverweissl/context-garden/skills/pruner/SKILL.md

pruner

Skill4 starsChanged 16 days agoMITView on GitHub

Pick the smallest set of file:line ranges relevant to a concrete task (bug, compiler error, failing test, change) in a large Python or C/C++ repository, instead of grep-exploring or reading whole files. Skip when the task or traceback already names the file.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If you have an error, always pass --error.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

pruner

!"${CLAUDE_SKILL_DIR}/bin/pruner" mode --banner

Agents that do not expand the line above (e.g. Codex): run <this-skill-dir>/bin/pruner mode --banner first and follow it.

Offline indexer + lexical/structural relevance scorer (keyword overlap, call graph, error-stack membership, test relationships; no embeddings, no LLM). How scores work: references/scoring.md.

pruner is not on PATH: run <this-skill-dir>/bin/pruner.

  1. Select a slice:
    <this-skill-dir>/bin/pruner select --task "<what you're doing>" --budget <N> \
      [--error "<traceback>" | --error-file <path>] [--changed <files...> | --auto-changed]
    If you have an error, always pass --error; error-stack membership is the strongest relevance signal. First run builds a SQLite index under .pruner/; later runs re-parse only changed files. Output lists required_context, supporting_context, relevant_tests, relevant_config as exact file:start-end ranges with a reason each. Read those ranges, not whole files.
  2. The slice is a starting point, not a fence. If confidence is low/medium (a hint: line is printed) or the slice doesn't explain the behavior, fall back to targeted grep and reads.
  3. Missing a dependency? Don't re-run select from scratch or fall back to open-ended exploration: check omitted_candidates, then bin/pruner expand <slice_id> --add <id or file:start-end> (or --file <path> --lines A:B). The token budget is hard-enforced: select never returns more than --budget tokens and expand refuses to exceed it unless you pass --budget-extra N.
  4. bin/pruner show <slice_id> / list re-print saved slices without re-scoring.
  5. With the plugin, an error pasted into the prompt is sliced automatically (context starting "pruner (ran automatically ..."): start from that slice, expand it rather than re-running select.

Full CLI (--graph, --parser, tree-sitter backend, language scope): references/schema.md.

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.