/harness-craft:skill-tddfrom harness-craft
Author or edit an agent skill using the TDD loop: run a baseline pressure scenario WITHOUT the skill (RED), write the minimal skill that fixes the observed failure (GREEN), then close the loopholes agents actually used (REFACTOR). USE WHEN creating a new SKILL.md, editing an existing one, or when a deployed skill is being ignored / rationalized around by agents. SKIP when the rule is mechanically enforceable — write a hook, not a skill (see Structural-first gate below).
Ships in harness-craft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Distilled from obra/superpowers
writing-skills (MIT, Jesse Vincent). Harness addition: the structural-first
entry gate.
Before writing any skill, ask: can a hook, guard, or regex enforce this instead?
| Enforceable by | Write | Not a skill because |
|---|---|---|
| Pattern match on a command / path / output | PreToolUse / PostToolUse hook | Hooks fire even when the agent forgot |
| A required step at session boundaries | SessionStart / Stop hook | Same |
| Judgment call, no machine-checkable predicate | Skill (proceed below) | Only the residue belongs in prose |
This is the harness core thesis: behavioral docs decay under context pressure; structure doesn't. A skill is the fallback, not the default.
RED — watch the agent fail first. Run a pressure scenario with a fresh subagent WITHOUT the skill. Record verbatim: what it did, and the exact rationalizations it used. If the baseline does NOT exhibit the failure, stop — there is nothing to fix, don't author the skill.
GREEN — write the minimal skill. Address only the observed failures, not hypothetical ones. Re-run the same scenario WITH the skill; the agent should now comply.
REFACTOR — close loopholes. New rationalization found in testing? Add an
explicit counter. Re-test until it holds. Every excuse harvested from testing
goes into a rationalization table (| Excuse | Reality |).
No skill ships without a failing baseline first — same Iron Law as code TDD.
The form that bulletproofs one failure type backfires on another:
| Baseline failure | Right form | Wrong form |
|---|---|---|
| Knows the rule, skips it under pressure | Prohibition + rationalization table + red-flags list | Soft guidance ("prefer…") |
| Complies, but output has the wrong shape | Positive recipe: state what the output IS, parts in order | Prohibition list ("don't restate…") |
| Omits a required element | REQUIRED slot in the template they already fill | Prose reminder near the template |
| Behavior depends on a condition | Conditional keyed to an observable predicate | Unconditional rule + exemption clauses |
Upstream wording tests found prohibitions on shaping problems produced MORE of the unwanted content than no guidance at all. Also: no nuance clauses ("don't X unless it matters" reopens the negotiation), and exemption clauses don't scope ("limit doesn't apply to code blocks" still suppresses them).
Target < 500 words for a normal skill; move heavy reference to a sibling file, reusable code to a script. One excellent example beats five mediocre ones. No narrative war stories — distill to the reusable pattern.
Upstream: obra/superpowers writing-skills — MIT © 2025 Jesse Vincent.
Distilled and adapted for claude-harness (structural-first gate added).
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/atomized-briefingWrite an implementation plan / worker briefing as atomized 2-5 minute
steps with exact file paths, explicit Consumes/Produces interfaces, and
zero placeholders — so a context-free executor (formation worker, spawned
subagent, or future you) can run it without re-deriving intent.
USE WHEN briefing a formation worker, dispatching subagents over a
multi-task plan, or writing any plan another session will execute.
SKIP for single-task work you will execute yourself in this session.
/calibrated-verificationEvery verification script, test, scanner, or matcher must ship with a
calibration pair — a known positive it provably catches and a negative
control it provably passes — and must print its denominator (scanned N /
matched M / dropped K). "All clean" from an uncalibrated checker is
indistinguishable from a broken checker.
USE WHEN writing or running any detector-shaped artifact: a doc-vs-source
matcher, an audit script, a migration verifier, a scrubber, a grep-based
sweep — and ESPECIALLY before asserting a negative ("no matches", "no
references", "all clean", "0 findings") from its output.
SKIP when the tool's output is directly the deliverable (not a judgment
about presence/absence).
Other plugins' skills for the same job
npx claudepluginhub hrmtz/claude-harness --plugin harness-craft