Agent skill

Harden

by swingerman in swingerman/engineer

Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.

MITAuto-check passedTesting & QA

Install Harden

skills CLI
$ npx skills add swingerman/engineer --skill harden -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swingerman/engineer harden --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineer/skills/harden .claude/skills/harden && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
harden
GitHub stars
154
Token cost
~1.8k tokens
SKILL.md length
784 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.

  • Works in 7 steps: Resolve + scope. Resolve the root and… → Advise. Run /engineer.refinement-advisor… → Introversion pre-scan (if selected). Run → …
  • — /engineer.harden
  • SKILL.md covers Modes, Workflow, harden_results shape and Fork safety, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Harden is an agent skill from swingerman/engineer. Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8. Runs the refinement-advisor, then the picked tools — introversion scan, mutation testing, and opt-in TLA+ / Lean verification. Triggers — "/engineer.harden", "harden this feature", "Checkpoint 8", "which hardening does this need", "formally verify the feature".

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test coverage. The repository describes itself as: Disciplined Agentic Engineering — a methodology kit for Claude Code: acceptance-test-first specs, explicit checkpoints, and autonomy you can actually leave running. The engineer… The licence is MIT.

When your agent uses it

  • — /engineer.harden
  • Harden this feature
  • Which hardening does this need
  • Formally verify the feature

Example prompts

  • “/engineer.harden”
  • “harden this feature”
  • “Checkpoint 8”
  • “/harden”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Resolve + scope. Resolve the root and manifest via
  2. Advise. Run /engineer.refinement-advisor with stage: harden over the
  3. Introversion pre-scan (if selected). Run
  4. Mutation (if selected). Run atdd:atdd-mutate on the touched files, then
  5. Formal checks (selected TLA+/Lean rows only). Dispatch one plain subagent
  6. Arch re-check. Harden may have changed code, so re-run
  7. Handoff (feature mode). Emit per

What it can do on your machine

Read from SKILL.md and the folder at commit 32947eb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Harden loads about 1.8k tokens when it runs. Until then it costs about 109 tokens; SKILL.md has 784 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from swingerman/engineer at commit 32947eb, republished under its MIT licence (© swingerman). 784 words, ~1,839 tokens.

Download SKILL.mdSave it as .claude/skills/harden/SKILL.md (or your agent's skills folder).
name
harden
description
Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8. Runs the refinement-advisor, then the picked tools — introversion scan, mutation testing, and opt-in TLA+ / Lean verification. Triggers — "/engineer.harden", "harden this feature", "Checkpoint 8", "which hardening does this need", "formally verify the feature".

harden

Checkpoint 8. Acceptance tests show the feature works. Harden checks whether the tests would notice if it stopped working, and, for code with a real invariant, whether that invariant can be broken at all.

Tool choice comes from /engineer.refinement-advisor, not from a fixed list. Formal verification is worth its cost on a retry loop, and a waste on a CRUD endpoint.

Modes

  • feature (default): scope = the feature branch's changed code. Entry gate applies. Writes a CP8 handoff.
  • fix: called from /engineer.fix Step 7. Scope = the fix diff. Skip the Step 0 feature gate, write results into the fix record's harden_results, and write no CP8 handoff (fix owns its own close).

Workflow

Step 0 — Entry gate (feature mode). Run ${CLAUDE_PLUGIN_ROOT}/scripts/dae_handoff.py <feature-dir> --through 7. On a non-zero exit, stop and show the gap to the human. Then run ${CLAUDE_PLUGIN_ROOT}/scripts/dae_branch.py <feature-dir>. On a non-zero exit, stop. After both pass, show the breadcrumb (${CLAUDE_PLUGIN_ROOT}/scripts/dae_progress.py <feature-dir>, advisory) and create one TodoWrite todo per step. See ${CLAUDE_PLUGIN_ROOT}/references/progress-indicator.md.

Verification independence: CP8 runs on a non-implementer agent (agent_id ≠ CP5's; enforced by dae_handoff.py gate()).

  1. Resolve + scope. Resolve the root and manifest via ${CLAUDE_PLUGIN_ROOT}/scripts/dae_resolve.py. Scope = changed code. Load acs.md, spec.md, CHARTER.md, and the CP7 handoff's crap_results block (arch-check records crap-analyzer's output there). In fix mode, or if the block is missing, run crap-analyzer on the scope first.

  2. Advise. Run /engineer.refinement-advisor with stage: harden over the scope, passing it crap_results. Effective autonomy decides who picks the checks (see the advisor's Who decides: autonomy):

    • at high, the advisor decides alone
    • below high, it asks
    • manifest.harden.required: true makes every recommended check mandatory
    • Steps 3–5 each run only if their tool was selected. An unselected step records {skipped: <the advisor's reason, or "not selected">} in its harden_results field, so the decision is visible, not silent.

    Record the table, what was selected, and who decided (decided_by: advisor | human) in harden_results.advisor.

  3. Introversion pre-scan (if selected). Run ${CLAUDE_PLUGIN_ROOT}/scripts/dae_introvert.py <methodology-root>. It flags tests that can pass without asserting on SUT output. The script defers to manifest.introversion.backend when set. Any non-ok status is advisory. Dispatch an agent to confirm each finding. For each confirmed vacuous test, write a real assertion and re-run. Record harden_results.introversion.

  4. Mutation (if selected). Run atdd:atdd-mutate on the touched files, then atdd:kill-mutants on the survivors. If a test was flagged in Step 3 and carries a surviving mutant, it is almost certainly vacuous. Record harden_results.mutation_score.

  5. Formal checks (selected TLA+/Lean rows only). Dispatch one plain subagent (default isolation, not a fork) per pick, subagent_type: engineer:formal-verifier (or the project override): /engineer.tlaplus for interleaving/state-machine targets, /engineer.lean for all-inputs targets. Each brief gives:

    • the target function (file:line)
    • the confirmed invariant
    • "follow the skill's Verifying real code workflow; model the code as written"
    • "do not open a PR; return the verdict, and any counterexample reproduced against the real code"

    Picks for different targets are independent, so dispatch them in parallel. Handle each result as follows:

    • Holds. Record the verdict and its limit. TLC's "no error up to N" is not a proof; Lean with no sorry and clean #print axioms is.
    • Confirmed counterexample. Treat it like a surviving mutant. Pin it as a failing test (red), fix, go green, and re-run both test streams. If the fix would change AC-observable behavior, stop and route to /engineer.feature-edit. Harden does not rewrite the contract.
    • Doesn't reproduce. The model diverged from the code. Record it as provisional and do not fix the code.
    • Side findings (dead code, an unreachable branch). Record them as advisory, and don't block on them.

    Record harden_results.formal[]: {tool, target, invariant, verdict: holds|violated|provisional, bound_or_proof, finding}.

  6. Arch re-check. Harden may have changed code, so re-run ${CLAUDE_PLUGIN_ROOT}/scripts/dae_arch.py <methodology-root>. Record harden_results.arch_check.

  7. Handoff (feature mode). Emit per ${CLAUDE_PLUGIN_ROOT}/references/handoff-summary.md with checkpoint: 8. The exit_criteria block asserts:

    • the advisor ran, and every tool has a recorded verdict (selected, or skipped with a reason)
    • if mutation was selected: score ≥ quality_thresholds.mutation_score_min (verified_by: tool). Both are percentages, 0–100.
    • if introversion was selected: no unresolved confirmed vacuous tests
    • every selected formal check is holds, or its counterexample is fixed and pinned by a test that fails on the old code
    • arch-check clean

    recommended_next: "open PR / /engineer.progress-log".

Show full SKILL.md (101 more words)Show less

harden_results shape

yaml
harden_results:
  advisor: {decided_by: advisor, rows: [{tool, verdict, target, why, invariant, selected}]}
  introversion: {status, flagged, confirmed_vacuous, fixed}
  mutation_score: 87            # percent, 0–100; or {skipped: "config-only change"}
  formal:
    - {tool: tlaplus, target: "ResidentialProxyHttpClient::get", invariant: "attempt ≤ 3; every path exits",
       verdict: holds, bound_or_proof: "TLC exhaustive, 16 states", finding: "post-loop throw unreachable (advisory)"}
  arch_check: {status: clean}

fix mode adds bug_line_mutation_confirmed in fix's own Step 7. That bug-line gate always runs, whatever the advisor picked. It is how fix proves its regression test is tied to the bug. A skipped mutation_score ({skipped: …}) still counts as recorded for dae_fix.py's close check.

Fork safety

Formal subagents run toolchains and re-run their own output, which is not fork-safe. Use plain subagents, and no detached/background Bash runs inside them. See ${CLAUDE_PLUGIN_ROOT}/references/parallelism.md (Fork safety).

References

  • /engineer.refinement-advisor: picks the tools
  • /engineer.tlaplus, /engineer.lean: the formal-verification skills; each has a "Verifying real code" workflow
  • atdd:atdd-mutate, atdd:kill-mutants: mutation testing
  • ${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md: autonomy keying and brief template

© swingerman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in engineer/skills/harden of swingerman/engineer.

Open the folder on GitHubat commit 32947eb

Compare with similar skills

Harden next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Harden compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Harden this skillswingerman/engineer154—~1.8kAutomated safety check: PassMIT
Requirementsrizsotto/Bear6.5k—~2kAutomated safety check: PassGPL-3.0
Crap Analysisardalis/RiverBooks1342 repos~3.4kAutomated safety check: PassNone
Code Coverages3s-project/s3s311—~789Automated safety check: PassApache-2.0
Project Statusbactopia/bactopia522—~787Automated safety check: PassMIT
Check Coverageldayton/Dippy243—~403Automated safety check: PassMIT

Similar skills

  • Requirements

    rizsotto/Bear

    Write, modify, or review a requirement file under docs/requirements -- pick the single owning file, keep the text contract-only, name IDs so they need no explanation, and verify cross-references and…

    6.5k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • Crap Analysis

    ardalis/RiverBooks

    Analyze code coverage and CRAP (Change Risk Anti-Patterns) scores to identify high-risk code.

    134 GitHub starsUsed in 2 repos~3.4k tokens
    Testing & QAAuto-check passed
  • Code Coverage

    s3s-project/s3s

    Measure and grow the line coverage of the s3s crate. An agent skill from s3s-project/s3s.

    311 GitHub stars~789 tokensUpdated today
    Testing & QAAuto-check passed
  • Project Status

    bactopia/bactopia

    Show a live snapshot of the Bactopia project state — component counts, GroovyDoc coverage, nf-test coverage, and structural issues.

    522 GitHub stars~787 tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Check Coverage

    ldayton/Dippy

    Ensure comprehensive test coverage for a CLI handler. An agent skill from ldayton/Dippy.

    243 GitHub stars~403 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Guarding Destructive Operations

    kajisho5/ffmpeg-skill

    Add and review preconditions on operations that delete, overwrite, rewrite history, or resolve a caller-supplied name to a filesystem path — refusing instead of warning, placing the guard ahead of…

    1.9k GitHub stars~2.6k tokensUpdated 2 days ago
    Testing & QAAuto-check passed

More from swingerman/engineer

All 27 skills in this repo
  • Crap Analyzer

    swingerman/engineer

    A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.

    154 GitHub stars~1.2k tokensUpdated 14 days ago
    Auto-check passed
  • Atdd Mutate

    swingerman/engineer

    A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

    154 GitHub stars~2.7k tokensUpdated 14 days ago
    Auto-check passed
  • Fix

    swingerman/engineer

    A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end.

    154 GitHub stars~3k tokensUpdated 14 days ago
    Auto-check passed
  • Atdd

    swingerman/engineer

    A skill your agent uses to drive feature work through the Acceptance Test Driven Development workflow — Given/When/Then specs before code, a project-specific test pipeline, and two parallel test…

    154 GitHub stars~2.8k tokensUpdated 14 days ago
    Auto-check passed
  • Next

    swingerman/engineer

    Use at the start of a work session, or any time the question is "what should I pick up now" across the whole project.

    154 GitHub stars~3k tokensUpdated 14 days ago
    Auto-check passed
  • Post Merge

    swingerman/engineer

    Use immediately after a PR is merged to clean up the local feature branch and resync main.

    154 GitHub stars~1.4k tokensUpdated 14 days ago
    Auto-check passed

Categories

Questions about Harden

What does Harden do?

Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8. Harden is an agent skill from swingerman/engineer. Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.

When should I use Harden?

Harden fits situations like: — /engineer.harden; harden this feature; which hardening does this need; formally verify the feature.

How do I install Harden in Claude Code?

Run `npx skills add swingerman/engineer --skill harden -a claude-code`. Or copy the skill folder (engineer/skills/harden in swingerman/engineer) into .claude/skills/harden in your project. Claude Code loads it when a task matches its description.

How do I install Harden in Codex?

Run `npx skills add swingerman/engineer --skill harden -a codex`. Or copy the skill folder (engineer/skills/harden in swingerman/engineer) into .agents/skills/harden in your project. Codex loads it when a task matches its description.

Can I use Harden in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swingerman/engineer --skill harden -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/harden, .gemini/skills/harden, .github/skills/harden and .opencode/skills/harden in your project.

What does Harden need to run?

SKILL.md names no scripts, command-line tools or credentials: Harden is instructions for the agent only.

Does Harden access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Harden safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Harden use?

Harden is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Harden use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Harden?

Skills that share tags, products or a category with Harden: Requirements (rizsotto/Bear, 6.5k stars), Crap Analysis (ardalis/RiverBooks, 134 stars), Code Coverage (s3s-project/s3s, 311 stars) and Project Status (bactopia/bactopia, 522 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Harden?

swingerman (a GitHub user) maintains it in swingerman/engineer, which has 154 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on September 23, 2026.

Source: swingerman/engineer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.