skill-distiller
Skill1 starsChanged 30 days agoMITView on GitHub
Compress successful interaction traces, compiler error-recovery patterns, and spike learnings into reusable, benchmarked skills. Use after a vertical slice passes all computational sensors, after recovering from a non-trivial error, when the steering loop requires updating a feedforward guide, or when creating or updating a skill in .agents/skills/. Successful ordinary work alone is not a trigger.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- amanuelmamo7/Skillstheir own version, first seen Nov 7, 2026
- Mathews-Tom/armorytheir own version, first seen Nov 1, 2026
- okdk7788/opencode-self-improving-skillstheir own version, first seen Oct 25, 2026
- iliaal/whetstonetheir own version, first seen Jul 12, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Mathews-Tom/armory★ 340same name
- iliaal/whetstone★ 37same name
- okdk7788/opencode-self-improving-skills★ 4same name
- amanuelmamo7/Skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codacy-analysis-cliSkill
- codacy-cloud-cliSkill
- codacy-code-reviewSkill
- configure-codacy-cloudSkill
- configure-codacySkill
- crates-io-name-checkSkill
- event-modelerSkill
- fail-closed-proxySkill
- harnessSkill
- htn-plannerSkill
- issue-to-prSkill
- move-only-decompositionSkill
- nested-build-isolationSkill
- npm-github-publishSkill
- pr-triageSkill
- setup-coverageSkill
- skill-creatorSkill
- spike-runnerSkill
- tokio-performanceSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
If a skill in .agents/skills/ matches the domain, update its SKILL.md with the new heuristic.
- Very specific: line 48
If novel, generate a new directory .agents/skills/<skill-name>/ with:
- Very specific: line 51
Run do-harness overlap after any corpus change: new or moved guidance must not push a pair past the accepted baselines in …
- Distinctive: line 58
Run the skill-evaluator loop:
- Very specific: line 69
If no guide exists, create one in .agents/skills/ via steps 1-5.
- Distinctive: line 77
Never distill a fix that did not pass computational sensors — hallucinations propagate.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Guides
See references/heuristics.md for distilled heuristics.
Skill Distiller & Dreaming Skill
Purpose
Post-task distillation loop that compresses successful interaction traces, compiler error-recovery patterns, and spike learnings into reusable, benchmarked skills.
Distillation Trigger
A green result alone is not a trigger: successful ordinary work prompts a review for reusable learning, and concluding there is no reusable lesson — without writing or mutating a skill — is a valid outcome. Distill only when one of the evidence-backed situations below applies.
Execute when:
- A vertical slice successfully passes all computational sensors (
cargo test,cargo clippy). - An agent recovered from a non-trivial error (e.g., borrow checker conflicts, async lifetime issues, libSQL driver quirks).
- A spike resolved a previously unknown architectural constraint.
- Steering loop: the same sensor fired more than 2 times in one sprint — the root cause should become a feedforward guide.
Execution Steps
1. Extract Interaction Trace
- Query
.do-harness/agent_state.dbfor the active session's commands, error diffs, and resolution steps.
2. Generalize Heuristic
- Convert the specific fix into a generalized pattern.
- Strip project-specific identifiers while preserving the structural solution.
3. Update / Create Agent Skill
- If a skill in
.agents/skills/matches the domain, update itsSKILL.mdwith the new heuristic. - If novel, generate a new directory
.agents/skills/<skill-name>/with:SKILL.md: Core guidance, invariants, and code examples (with Agent Skills frontmatter).evals/evals.json: At least 2-3 verification cases withid,prompt,expected_output, and checkableassertions.
- Run
do-harness overlapafter any corpus change: new or moved guidance must not push a pair past the accepted baselines inplans/invariants.json.
4. Anti-AI-Slop Review Pass & Trace Recording
- Review the generalized heuristic and any code snippets against the Anti-AI-Slop checklist in references/anti_ai_slop.md (purpose-per-struct, real error handling, meaningful domain names, no speculative abstractions, why-focused docs).
- Record the checklist outcome in the trace's
resolution_steps(e.g.,anti-ai-slop: pass (no speculative structs, real error handling)) prior to distillation review and raising the pass-rate floor (distill --to-fixture).
5. Benchmark & Evaluate
Run the skill-evaluator loop:
- Structure check —
SKILL.mdpresent, frontmatter valid,evals/evals.jsonexists and parses. - Eval review — each case has a real prompt, a concrete expected outcome, and checkable assertions.
- Live run — execute one representative prompt against the skill and grade with evidence.
- Baseline comparison — when measuring improvement, rerun the same prompt without the skill or against the previous version.
- Verdict —
PASS,NEEDS_WORK, orFAILwith evidence; iterate untilPASS.
6. Steering Loop
- Canonical rule lives in
.agents/skills/harness(Steering Loop): a sensor firing >2 times in one sprint is a feedforward-guide defect, not a symptom to patch. Follow it; do not restate it here. - If no guide exists, create one in
.agents/skills/via steps 1-5.
References
- Anti-AI-slop audit checklist: see references/anti_ai_slop.md.
Gotchas
- Never distill a fix that did not pass computational sensors — hallucinations propagate.
- Strip secrets and machine-specific paths from traces before writing them into a skill.
Negative Knowledge (Anti-Patterns)
The "only distill verified fixes" rule governs positive patterns. Negative
knowledge — a trap that was actually hit and not solved — is equally valuable
and is stored as a kind: gotchas eval case, whose assertions prove the wrong
action was not taken:
{
"kind": "gotchas",
"assertions": [
"absent:.do-harness/blessed-to-pass",
"not-contains:recovery-log.md|relaxed the sensor"
]
}eval --strict-fixtures rejects a gotchas case with no negative
(absent: / not-contains:) assertion, so an anti-pattern cannot be recorded
as a positive-only claim it never earned.
Anti-patterns live in the skill's ## Anti-patterns section, each naming the
observed wrong action and why it failed. Seed them from real incidents — an
unsolved blocker, a repeated correction, a revert — never from speculation.
The npm publishing work is the seed example. Its four recorded anti-patterns
(per-package non-reusable 2FA approval, no Trusted Publisher before a package
exists, npm publish --dry-run not checking name similarity, and never
renaming a single reference or unpublishing live siblings) live in
.agents/skills/npm-github-publish/SKILL.md. They are graded with absent:
and not-contains: assertions that run against the real publisher's output,
so they stay provable without any positive npm fix having landed.
Measuring Skill Lift (and its limits)
Optional and slow. Nothing below runs in CI or in any gate: the CI eval step is
do-harness eval --strict-fixtures(deterministic walkthroughs, under 3s per skill). Agent-lift measurement spawns a real agent per case — minutes, not seconds — so run it deliberately when you are changing a fixture or auditing a lift number, never as part of a routine loop.do-harness distill --from-strikesis likewise optional: it writes starter scaffolds on demand and is not wired intoverify, hooks, or CI.
do-harness eval --skill <name> reports lift = with-skill pass rate minus
without-skill pass rate, where the baseline strips SKILL.md + references/
before running the same executor.
Three distinct outcomes, do not conflate them:
lift=+0.29— a number. Meaning depends on what the assertions read.lift=contaminated— the baseline regenerated its own guidance (e.g. the walkthrough rando-harness init, which re-scaffoldsSKILL.md), so the subtraction is unusable. Fix the fixture; do not read it as a zero.lift=n/a— not measured (no baseline, or neither side graded anything).
A non-zero lift does not prove the agent used the guidance. Assertions of
the form contains:.agents/skills/<name>/SKILL.md|... pass because the skill
file is copied into the sandbox, not because any agent read it. Measured
directly: a stub agent that does nothing but exit 0, and a real coding agent,
both score identically on such a fixture — the delta is just the count of
guidance-reading assertions divided by the total. Verify by running the eval
against a do-nothing command before trusting any lift figure:
eval --skill <name> --agent-cmd 'true' # null-agent control
eval --skill <name> --agent-cmd <real> # if equal, lift measures file presence onlyTo measure agent behavior, grade the executor's own output (agent_stdout.txt
in agent mode, or artifacts the walkthrough creates) rather than files shipped
in the sandbox.
Strike-Driven Scaffolding
A sensor that strikes 3+ times has no verified fix yet, so distilling from it positively would fabricate one. Use the recorded signature instead:
do-harness distill --from-strikesThis generates the starter pair (SKILL.md generated from the signature + a
failing gotchas fixture) via the same skill-creator layout. The starter is
legitimately red: its exists: assertion names the recovery log the author has
not written yet. Completing the guide turns it green.
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.

