agentleFS
justinwilliamesjustinwilliames/skills/skill-hardening/SKILL.md

skill-hardening

Skill1 starsChanged 5 months agoMITView on GitHub

Meta-skill for auditing and upgrading agent skills (SKILL.md files) to frontier quality. Load when asked to review, enhance, harden, sync, or spring-clean a skills library, or when writing a new skill that should hold up under real use. Provides the 10-point rubric, the audit procedure, and the sync-home discipline that keeps multi-home skills from forking. Do NOT use for one-off prompt tweaks — it's for skills meant to persist and be maintained.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer tables for failure modes and decision boundaries.

    line 66
  2. Distinctive:

    Keep facts that age (models, prices, versions) in one place in the file, dated, so the next hardening pass finds them in one grep.

    line 69
  3. Very specific:

    Run scripts/skill-sync.sh [skills-dir] (default ~/.claude/skills) to mechanise step 3 of the audit: it reads each live SKILL.md's sync-home …

    line 74

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

Skill Hardening

A skill is a program whose interpreter is a model. Like any program it rots: paths die, model names age out, prices change, better patterns emerge, and copies drift apart across their homes. This skill is the maintenance protocol — a rubric to score against, a procedure to apply, and a sync discipline to keep every copy honest.

The rubric — score each skill 0–2 per dimension

#Dimension2 looks like0 looks like
R1Trigger clarityDescription states when to fire AND when not to"Use for X-related tasks"
R2Decision-firstThe protocol/decision rule opens the fileTwo pages of philosophy before the first instruction
R3Named failure modesAnti-patterns enumerated with detection signals"Be careful"
R4Verification gatesEvery output has a defined "how we know it's right" observationOutputs shipped on vibes
R5Escalation ladderWhat to do when the default path plateaus (retry, tool, model, human)Silence on failure handling
R6FreshnessModel names, prices, paths, dates all currentDead paths, retired personas, last-gen models
R7Output contractDeliverable shape exactly specified"Produce a summary"
R8Autonomy calibrationExplicit act-vs-ask boundaries; hard gates on irreversible/external actionsAssumes approval, or asks for everything
R9Sync homesThe skill names its canonical copy and distribution copiesCopies exist, no map
R10EconomyEvery section load-bearingRestated points, decorative frameworks, filler

18–20: frontier. 14–17: serviceable, harden opportunistically. <14: schedule a rewrite — patching a weak skill dimension-by-dimension usually costs more than re-authoring it.

The audit procedure

  1. Inventory — list every skill and, for each, its homes (local install, git repo, MCP manifest, marketplace copy). A skill you can't map, you can't maintain.
  2. Score — read fully, score R1–R10, cite file:line for every gap. No gap without a line number; unevidenced findings are opinions.
  3. Drift-check — diff each pair of homes. Report direction (which side is newer), not just "differs". Check git state: dirty, ahead, behind.
  4. Punch list — concrete edits ordered by value, exact old→new where possible. A finding without a proposed edit is half a finding.
  5. Apply — batch mechanical fixes (paths, names, dates) separately from judgment fixes (structure, protocol changes). Mechanical fixes can be delegated; judgment fixes get review.
  6. Re-score — the changed dimensions only. Confirm the edit actually moved the score.
  7. Sync — propagate to every home per the discipline below, in the canonical direction.

Sync-home discipline

  • One canonical home per skill, declared in the skill itself. Every other copy is a distribution artifact, edited never — regenerated or copied from canonical.
  • Sanitize on the public boundary. Private→public copies strip personal directives, internal names, and private-memory references, keeping the technical substance. The sanitization is a step in the sync, not a separate chore that can be forgotten.
  • Sync is part of "done". An edit that lands in one home isn't finished; state which homes received it and which are pending (and why).

Writing rules for new skills

  • Frontmatter description carries the routing decision: trigger phrases, and the negative space ("do NOT use for…"). The loader reads only this — it must stand alone.
  • Open with the decision rule or protocol. Context and rationale go after, or in references/.
  • Prefer tables for failure modes and decision boundaries; prose for everything else.
  • Bake in the verification gate for the skill's own outputs (R4) — a skill that can't say how to check its work will generate confident garbage at scale.
  • Keep facts that age (models, prices, versions) in one place in the file, dated, so the next hardening pass finds them in one grep.

Automated drift check — scripts/skill-sync.sh

Run scripts/skill-sync.sh [skills-dir] (default ~/.claude/skills) to mechanise step 3 of the audit: it reads each live SKILL.md's sync-home footer, resolves the declared twin, and reports per skill — OK, DRIFT, SANITIZED (differs by design — review manually), MISSING twin, LOCAL-ONLY, or NO-FOOTER (an R9 failure in itself) — plus the twin repo's git dirt/ahead-behind state. Exit code is non-zero when drift or missing twins exist, so it slots into a cron or session-start hook. Run it whenever a skill feels stale, and before any release that ships skill copies.

Named failure modes

Failure modeWhat it looks likeAntidote
Skill bloatEvery incident appends a paragraph; nothing is ever cutR10 pass on every edit: what does this line displace?
Baked-in stalenessFacts-that-age scattered through proseCentralise + date them
Trigger overlapTwo skills claim the same request; routing becomes luckAudit descriptions as a set, not individually
Fork driftCopies edited independently until neither is canonicalDeclare canonical; edit only there
Unsanitized leakPrivate names/directives shipped to a public copySanitize as a sync step with its own check
Rubric theaterScores assigned without reading the whole skillNo score without file:line evidence
Patch-rotTen patches on a <14 skill instead of a rewriteRewrite threshold is part of the rubric

Related

This rubric operationalises the whole suite: R2/R7/R10 are operator-standard applied to documents, R4 is verification-gates, the audit's evidence rule is challenge-before-build, and R10 is context-discipline for files.

Sync home

Sync home: github.com/justinwilliames/skills — canonical. Installed copies (e.g. ~/.claude/skills/skill-hardening) are distribution artifacts: edit the repo, re-copy.

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.