Harden
MANDATORY: Re-read this entire file before every audit pass. Do not rely on earlier readings within the same conversation. Context window drift causes skipped steps.
Purpose
Ensures substantial deliverables are structurally sound, internally consistent,
and aligned with domain best practices before delivery. Replaces ad hoc quality
checks with a repeatable methodology.
How It Works
- Research — Searches the web for domain-specific best practices
before auditing (not just internal assumptions)
- Dual-pass audit — Checks both ideas (are they sound?) and
structure (do paths/references/formatting work?)
- Severity classification — 🔴 Critical / 🟡 Significant / 🟢 Minor
with specific locations
- Fix — Implements all critical and significant fixes (not just reports)
- Converge — Re-audits until only minor issues remain (max 3 passes)
The Process
Step 1: Research
Search for current best practices specific to the deliverable's domain.
Scope guidance:
- Minimum 2 searches for focused domains (e.g., a skill file -> Anthropic
skill docs)
- 3-5 searches for broad or unfamiliar domains (e.g., a grant aims page ->
NIH guidelines, successful examples, common reviewer complaints)
- Always check for official/canonical sources first, then practitioner insights
- Fetch the canonical source. If search results include the single most
authoritative document for this domain (official guide, spec, standard),
fetch and read it — do not rely on search snippets. Snippets capture ~5%
of a document's content and miss testing, edge cases, and patterns.
Limit to the first ~5000 tokens if the source is very long; prioritize
sections on requirements, validation, and common mistakes.
- Synthesize findings into actionable bullets that inform the audit — not a
reading list
If web search is unavailable: State this limitation explicitly. Proceed
using training knowledge but flag that the audit lacks external validation.
Step 2: Comparative Audit
Run TWO distinct passes within this step. Both are mandatory.
Pass A — Thematic audit (ideas level):
- Does the deliverable achieve its stated purpose?
- Are the ideas sound, complete, and non-contradictory?
- Does it align with research findings from Step 1?
- Are there gaps, unstated assumptions, or logical errors?
- Would the target audience (reviewer, agent, collaborator) find it clear?
Pass B — Structural audit (artifact level):
- Do all paths, filenames, and references resolve?
- Are names, terms, and conventions consistent throughout?
- Do cross-references point to real sections/files?
- Is formatting correct for the target format (markdown, YAML, code)?
- Are there orphaned sections, redundant content, or dangling references?
- If executable (a plan, a config): would a literal reader succeed?
Pass C — Regression check (only when re-hardening a modified deliverable):
Trigger detection: Apply Pass C when the deliverable was previously completed
or delivered and is now being revised — indicated by the user referencing a
prior version, requesting modifications to existing work, or re-submitting
after changes. Examples: "update the roadmap I wrote earlier", "fix the issues
you found", or any edit to an artifact that was previously declared done.
- What previously worked that this modification could break?
- Are existing cross-references still valid after the change?
- Do acceptance criteria from the original still hold?
- Has scope crept beyond the intended modification?
Severity classification for every issue found:
- 🔴 Critical — Will cause failure, incorrect behavior, or fundamental
misunderstanding. Must fix.
- 🟡 Significant — Degrades quality, violates best practices, causes
confusion, or wastes resources (tokens, time). Must fix.
- 🟢 Minor — Cosmetic, low-impact, stylistic. Fix if easy, skip if not.
Required output structure:
- What passes — Sections/aspects reviewed and confirmed correct. This
proves the audit actually examined these areas rather than skipping them.
- What's missing — Gaps, absent sections, unstated assumptions.
- What's wrong — Errors, inconsistencies, violations. Each with severity
and specific location (line number, section name, or quote).
- Prioritized fix list — All issues ordered 🔴 → 🟡 → 🟢 with specific
remediation for each.
Step 3: Update
Execute all 🔴 and 🟡 fixes. Do not cherry-pick. Do not defer significant
issues. Fix 🟢 issues if they're adjacent to other changes.
After fixes, run a mechanical verification:
- If the deliverable contains paths: grep/check all paths resolve
- If it contains names/terms: verify consistency
- If it references sections: confirm they exist
- If it has acceptance criteria: verify the artifact satisfies them
Step 4: Diminishing Returns Check
Evaluate what this pass found:
- Any 🔴 critical issues? → Run another pass (return to Step 2)
- Any structural 🟡 issues? → Run another pass (return to Step 2)
- Only 🟢 minor issues? → Stop. Deliver.
Limits: 2 passes is typical. 3 is maximum. If still finding critical
issues after 3 passes, flag to the user that the deliverable may need
fundamental restructuring rather than incremental fixes.
Re-hardening trigger: When external standards change (new Anthropic docs,
updated NIH guidelines, framework version bumps), previously hardened
deliverables should be re-audited against the new standards. The user triggers
this manually; the skill treats it as a fresh hardening with Pass C enabled.
Domain Quality Criteria
When auditing, identify the relevant quality criteria for the deliverable type.
For domains not listed below, generate criteria by asking: "What would an
expert reviewer check before approving this?"
Skills (Claude Code / Claude Chat)
- Frontmatter: name (lowercase, hyphens, <=64 chars; gerund form is
conventional but not required), description (third person, non-empty,
all triggers included; Anthropic Help Center states <=200 chars,
ecosystem convention <=1024 chars — test auto-invocation if exceeding
- If the skill has environment dependencies (web search, filesystem, MCP,
specific platform), declare them in the
compatibility frontmatter field
AND mention the primary dependency in the description
- Body under 500 lines, context-efficient (no content Claude already knows)
- Progressive disclosure where applicable
- Trigger validation: ask Claude "when would you use [skill name]?" and
compare its answer against intended triggers. Check for under-triggering
(missing expected phrases) and over-triggering (matching unrelated queries)
- Instructions are specific and actionable, not buried or ambiguous; critical
steps appear early in the document
Setup/Configuration Documents
- All paths consistent and valid, instructions imperative
- Acceptance criteria explicit and mechanically verifiable
- Self-documenting with graceful fallback for missing prerequisites
Grant Sections
- Significance (clear gap), innovation (distinct from prior art),
approach (feasible, risks mitigated), alignment (budget matches scope)
- Reviewer-friendly: scannable, no undefined jargon
Strategic Plans / Roadmaps
- Outcomes measurable, dependencies explicit, timeline realistic
- Risks identified with mitigations, prioritization rationale stated
Protocols / SOPs
- Steps unambiguous and executable by stated audience
- Materials specified with versions, decision points identified
- Expected results stated for verification
Implementation Plans / Execution Runbooks
- Every summary list (e.g., "Bootstrapping Steps") must have 1:1
correspondence with its detailed execution section. No step in one
without a match in the other.
- For each step, verify preconditions are satisfied by prior steps.
Flag: config created before its target exists, files referenced before
creation, tools invoked before dependencies are available.
- Every CLI command, slash command, skill name, and tool referenced must
actually exist. Verify against the known environment — not assumptions
or recall. Flag speculative or hallucinated commands.
- Hook/automation rules must be achievable with their mechanism type
(command hooks = grep/regex, prompt hooks = LLM yes/no, agent hooks =
multi-turn). Flag rules requiring capabilities beyond their type.
- Every task must include a concrete verification method: a command with
expected output, a file/state existence check, or an observable result.
"Verify it works" and "run tests" without specifics are insufficient —
a literal executor must be able to confirm success without follow-up.
- Verification methods must be falsifiable — they must be able to fail.
"Check that the file exists" is falsifiable. "Review the output" is not.
Anti-Patterns
Performative skepticism: Adding self-critical commentary ("you might want
to strengthen this") without running the actual audit process. Sounds rigorous,
catches nothing structural.
Thematic-only auditing: Checking that ideas are sound while ignoring paths,
names, formatting, and consistency. How 14 issues survived a "validated"
deliverable in prior experience.
Structural-only auditing: The inverse — checking paths and formatting while
missing that the ideas are wrong or incomplete.
Severity inflation: Marking everything 🔴 to appear thorough. Reserve
critical for actual failure modes.
Audit without research: Skipping Step 1 and auditing against internal
assumptions rather than external standards. The research step imports criteria
that wouldn't be generated otherwise.
Snippet-depth research: Finding the canonical source but reading only
search result excerpts instead of fetching the full document. Captures
technical requirements but misses testing methodology, edge cases, and
behavioral patterns. How 4 relevant quality criteria were missed despite
the source appearing twice in search results.
Skipping "what passes": Only reporting failures without confirming what
was reviewed and found correct. Hides gaps in audit coverage.
Static-only plan auditing: Checking that references resolve and formatting
is correct while treating a sequential plan as a static document. Plans are
executable — each step has preconditions. Auditing a plan without simulating
execution order misses ordering violations, summary↔detail drift, and
nonexistent tool references. How 7 issues (4 moderate) survived 4 audit passes
on an implementation plan.
Verification-free planning: Approving an implementation plan where tasks
lack concrete verification methods. Every task produces a result; every result
can be checked. Plans without per-task verification shift the burden to the
executor to invent checks — which means they often don't.
1---2name: harden3description: Audits any substantial deliverable — documents, grant sections, strategies, protocols, skills, configs, roadmaps, plans — against domain-specific quality criteria before delivery. Searches the web for best practices, runs dual-pass thematic and structural audit with severity classification, fixes all issues, and iterates until convergence. Activates when producing deliverables exceeding 4 paragraphs or 20 lines, or when the user says "harden", "audit", "stress test", or "review before delivering", or when re-auditing a modified deliverable for regressions. Does not activate for conversational responses, brainstorming, web search summaries, or rough drafts.4license: MIT5---67# Harden89> **MANDATORY:** Re-read this entire file before every audit pass. Do not rely on earlier readings within the same conversation. Context window drift causes skipped steps.1011## Purpose1213Ensures substantial deliverables are structurally sound, internally consistent,14and aligned with domain best practices before delivery. Replaces ad hoc quality15checks with a repeatable methodology.1617## How It Works18191. **Research** — Searches the web for domain-specific best practices20 before auditing (not just internal assumptions)212. **Dual-pass audit** — Checks both ideas (are they sound?) and22 structure (do paths/references/formatting work?)233. **Severity classification** — 🔴 Critical / 🟡 Significant / 🟢 Minor24 with specific locations254. **Fix** — Implements all critical and significant fixes (not just reports)265. **Converge** — Re-audits until only minor issues remain (max 3 passes)2728## The Process2930### Step 1: Research3132Search for current best practices specific to the deliverable's domain.3334**Scope guidance:**35- Minimum 2 searches for focused domains (e.g., a skill file -> Anthropic36 skill docs)37- 3-5 searches for broad or unfamiliar domains (e.g., a grant aims page ->38 NIH guidelines, successful examples, common reviewer complaints)39- Always check for official/canonical sources first, then practitioner insights40- **Fetch the canonical source.** If search results include the single most41 authoritative document for this domain (official guide, spec, standard),42 fetch and read it — do not rely on search snippets. Snippets capture ~5%43 of a document's content and miss testing, edge cases, and patterns.44 Limit to the first ~5000 tokens if the source is very long; prioritize45 sections on requirements, validation, and common mistakes.46- Synthesize findings into actionable bullets that inform the audit — not a47 reading list4849**If web search is unavailable:** State this limitation explicitly. Proceed50using training knowledge but flag that the audit lacks external validation.5152### Step 2: Comparative Audit5354Run TWO distinct passes within this step. Both are mandatory.5556**Pass A — Thematic audit (ideas level):**57- Does the deliverable achieve its stated purpose?58- Are the ideas sound, complete, and non-contradictory?59- Does it align with research findings from Step 1?60- Are there gaps, unstated assumptions, or logical errors?61- Would the target audience (reviewer, agent, collaborator) find it clear?6263**Pass B — Structural audit (artifact level):**64- Do all paths, filenames, and references resolve?65- Are names, terms, and conventions consistent throughout?66- Do cross-references point to real sections/files?67- Is formatting correct for the target format (markdown, YAML, code)?68- Are there orphaned sections, redundant content, or dangling references?69- If executable (a plan, a config): would a literal reader succeed?7071**Pass C — Regression check (only when re-hardening a modified deliverable):**7273Trigger detection: Apply Pass C when the deliverable was previously completed74or delivered and is now being revised — indicated by the user referencing a75prior version, requesting modifications to existing work, or re-submitting76after changes. Examples: "update the roadmap I wrote earlier", "fix the issues77you found", or any edit to an artifact that was previously declared done.7879- What previously worked that this modification could break?80- Are existing cross-references still valid after the change?81- Do acceptance criteria from the original still hold?82- Has scope crept beyond the intended modification?8384**Severity classification for every issue found:**85- 🔴 **Critical** — Will cause failure, incorrect behavior, or fundamental86 misunderstanding. Must fix.87- 🟡 **Significant** — Degrades quality, violates best practices, causes88 confusion, or wastes resources (tokens, time). Must fix.89- 🟢 **Minor** — Cosmetic, low-impact, stylistic. Fix if easy, skip if not.9091**Required output structure:**921. **What passes** — Sections/aspects reviewed and confirmed correct. This93 proves the audit actually examined these areas rather than skipping them.942. **What's missing** — Gaps, absent sections, unstated assumptions.953. **What's wrong** — Errors, inconsistencies, violations. Each with severity96 and specific location (line number, section name, or quote).974. **Prioritized fix list** — All issues ordered 🔴 → 🟡 → 🟢 with specific98 remediation for each.99100### Step 3: Update101102Execute all 🔴 and 🟡 fixes. Do not cherry-pick. Do not defer significant103issues. Fix 🟢 issues if they're adjacent to other changes.104105After fixes, run a mechanical verification:106- If the deliverable contains paths: grep/check all paths resolve107- If it contains names/terms: verify consistency108- If it references sections: confirm they exist109- If it has acceptance criteria: verify the artifact satisfies them110111### Step 4: Diminishing Returns Check112113Evaluate what this pass found:114- Any 🔴 critical issues? → Run another pass (return to Step 2)115- Any structural 🟡 issues? → Run another pass (return to Step 2)116- Only 🟢 minor issues? → Stop. Deliver.117118**Limits:** 2 passes is typical. 3 is maximum. If still finding critical119issues after 3 passes, flag to the user that the deliverable may need120fundamental restructuring rather than incremental fixes.121122**Re-hardening trigger:** When external standards change (new Anthropic docs,123updated NIH guidelines, framework version bumps), previously hardened124deliverables should be re-audited against the new standards. The user triggers125this manually; the skill treats it as a fresh hardening with Pass C enabled.126127## Domain Quality Criteria128129When auditing, identify the relevant quality criteria for the deliverable type.130For domains not listed below, generate criteria by asking: "What would an131expert reviewer check before approving this?"132133### Skills (Claude Code / Claude Chat)134- Frontmatter: name (lowercase, hyphens, <=64 chars; gerund form is135 conventional but not required), description (third person, non-empty,136 all triggers included; Anthropic Help Center states <=200 chars,137 ecosystem convention <=1024 chars — test auto-invocation if exceeding138 200)139- If the skill has environment dependencies (web search, filesystem, MCP,140 specific platform), declare them in the `compatibility` frontmatter field141 AND mention the primary dependency in the description142- Body under 500 lines, context-efficient (no content Claude already knows)143- Progressive disclosure where applicable144- Trigger validation: ask Claude "when would you use [skill name]?" and145 compare its answer against intended triggers. Check for under-triggering146 (missing expected phrases) and over-triggering (matching unrelated queries)147- Instructions are specific and actionable, not buried or ambiguous; critical148 steps appear early in the document149150### Setup/Configuration Documents151- All paths consistent and valid, instructions imperative152- Acceptance criteria explicit and mechanically verifiable153- Self-documenting with graceful fallback for missing prerequisites154155### Grant Sections156- Significance (clear gap), innovation (distinct from prior art),157 approach (feasible, risks mitigated), alignment (budget matches scope)158- Reviewer-friendly: scannable, no undefined jargon159160### Strategic Plans / Roadmaps161- Outcomes measurable, dependencies explicit, timeline realistic162- Risks identified with mitigations, prioritization rationale stated163164### Protocols / SOPs165- Steps unambiguous and executable by stated audience166- Materials specified with versions, decision points identified167- Expected results stated for verification168169### Implementation Plans / Execution Runbooks170- Every summary list (e.g., "Bootstrapping Steps") must have 1:1171 correspondence with its detailed execution section. No step in one172 without a match in the other.173- For each step, verify preconditions are satisfied by prior steps.174 Flag: config created before its target exists, files referenced before175 creation, tools invoked before dependencies are available.176- Every CLI command, slash command, skill name, and tool referenced must177 actually exist. Verify against the known environment — not assumptions178 or recall. Flag speculative or hallucinated commands.179- Hook/automation rules must be achievable with their mechanism type180 (command hooks = grep/regex, prompt hooks = LLM yes/no, agent hooks =181 multi-turn). Flag rules requiring capabilities beyond their type.182- Every task must include a concrete verification method: a command with183 expected output, a file/state existence check, or an observable result.184 "Verify it works" and "run tests" without specifics are insufficient —185 a literal executor must be able to confirm success without follow-up.186- Verification methods must be falsifiable — they must be able to fail.187 "Check that the file exists" is falsifiable. "Review the output" is not.188189## Anti-Patterns190191**Performative skepticism:** Adding self-critical commentary ("you might want192to strengthen this") without running the actual audit process. Sounds rigorous,193catches nothing structural.194195**Thematic-only auditing:** Checking that ideas are sound while ignoring paths,196names, formatting, and consistency. How 14 issues survived a "validated"197deliverable in prior experience.198199**Structural-only auditing:** The inverse — checking paths and formatting while200missing that the ideas are wrong or incomplete.201202**Severity inflation:** Marking everything 🔴 to appear thorough. Reserve203critical for actual failure modes.204205**Audit without research:** Skipping Step 1 and auditing against internal206assumptions rather than external standards. The research step imports criteria207that wouldn't be generated otherwise.208209**Snippet-depth research:** Finding the canonical source but reading only210search result excerpts instead of fetching the full document. Captures211technical requirements but misses testing methodology, edge cases, and212behavioral patterns. How 4 relevant quality criteria were missed despite213the source appearing twice in search results.214215**Skipping "what passes":** Only reporting failures without confirming what216was reviewed and found correct. Hides gaps in audit coverage.217218**Static-only plan auditing:** Checking that references resolve and formatting219is correct while treating a sequential plan as a static document. Plans are220executable — each step has preconditions. Auditing a plan without simulating221execution order misses ordering violations, summary↔detail drift, and222nonexistent tool references. How 7 issues (4 moderate) survived 4 audit passes223on an implementation plan.224225**Verification-free planning:** Approving an implementation plan where tasks226lack concrete verification methods. Every task produces a result; every result227can be checked. Plans without per-task verification shift the burden to the228executor to invent checks — which means they often don't.