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.
In this repository5 other files it gives its agents.
- compostSkill
- greenhouseSkill
- myceliumSkill
- seedbankSkill
- weederSkill
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
- Very specific: line 25
If you have an error, always pass --error.
≈ “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.
Files
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.
- Select a slice:
If you have an error, always pass<this-skill-dir>/bin/pruner select --task "<what you're doing>" --budget <N> \ [--error "<traceback>" | --error-file <path>] [--changed <files...> | --auto-changed]--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 listsrequired_context,supporting_context,relevant_tests,relevant_configas exactfile:start-endranges with a reason each. Read those ranges, not whole files. - The slice is a starting point, not a fence. If confidence is
low/medium(ahint:line is printed) or the slice doesn't explain the behavior, fall back to targeted grep and reads. - Missing a dependency? Don't re-run
selectfrom scratch or fall back to open-ended exploration: checkomitted_candidates, thenbin/pruner expand <slice_id> --add <id or file:start-end>(or--file <path> --lines A:B). The token budget is hard-enforced:selectnever returns more than--budgettokens andexpandrefuses to exceed it unless you pass--budget-extra N. bin/pruner show <slice_id>/listre-print saved slices without re-scoring.- With the plugin, an error pasted into the prompt is sliced automatically
(context starting "pruner (ran automatically ..."): start from that
slice,
expandit rather than re-runningselect.
Full CLI (--graph, --parser, tree-sitter backend, language scope):
references/schema.md.
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.

