Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Applies NIST/CWE security hardening to Python and Rust code. Use when auditing code for vulnerabilities or proposing concrete security remediations.
.claude/skills/athola-harden/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -17% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 122% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 124% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 44% | 0% |
Active security hardening: scan the existing repository for vulnerabilities and forward-facing threats, then propose concrete remediations the user can approve, defer, or file.
This skill is the engine behind /harden. It complements the Claude Code built-in /security-review (which scans the pending diff) by sweeping the whole repository against citation-backed checks rather than line-level review of in-flight code.
/security-review.attune:war-roomwith a security-focused panel.
but does not propose protocol fixes (specialist work).
pensive:bug-review.harden:discovery: inventory languages, build files, hooks,CI workflows
harden:scan-python: run python-checks.md detectors whenPython is present
harden:scan-rust: run rust-checks.md detectors when Rustis present
harden:scan-cross-cutting: run cross-cutting.md detectors(deps, secrets, SBOM, CI)
harden:scan-frontier: run frontier-checks.md (PQC, LLMsupply chain, sandboxing)
harden:nist-mapping: map findings to NIST SSDF practicesharden:proposals: for each finding above the threshold,draft a concrete remediation per modules/proposal-shape.md
harden:approval-gate: present proposals to the user forapply / file / defer / reject
harden:apply-and-validate: apply approved proposals asdiscrete commits, re-run gates, capture evidence
harden:findings-verified: citations confirmed bycitation_verifier.py
harden:report: write reviews/harden-<date>.md andoptionally post to Discussions
Load modules based on what the discovery step finds.
| Detected | Load | |----------|------| | Python files (*.py, pyproject.toml) | modules/python-checks.md | | Rust files (*.rs, Cargo.toml) | modules/rust-checks.md | | Any | modules/nist-controls.md (citation backbone) | | Any | modules/cross-cutting.md (deps, secrets, CI) | | LLM SDK use (anthropic, openai), MCP server, post-quantum surface | modules/frontier-checks.md | | Any with proposals enabled | modules/proposal-shape.md |
The module hub keeps the SKILL.md itself under the estimated_tokens: 1100 budget. Detail lives in the modules.
Inventory the repo without modifying anything:
bash# Languages and build files find . -type f \( -name '*.py' -o -name '*.rs' -o -name '*.sh' \) \ | head -200 > /tmp/harden-langs.txt # Build manifests ls pyproject.toml Cargo.toml package.json go.mod 2>/dev/null # CI workflows and pre-commit ls .github/workflows/ .pre-commit-config.yaml 2>/dev/null # Hooks and Dockerfiles find . -path ./node_modules -prune -o -type f \ \( -name 'hooks.json' -o -name 'Dockerfile*' \) -print
Dispatch /discovery-prefilter if the repo has > 5000 source files to bound the scan.
For each detected language, load the matching module and run its detector list. Each detector outputs findings with the schema defined in modules/proposal-shape.md. The citation column is mandatory: a finding without a NIST/CWE reference is downgraded to "advisory" and not eligible for active proposal.
Group findings by SSDF practice (PW.4, PW.8, RV.1, etc.) and CWE ID. The mapping table lives in modules/nist-controls.md. The report's executive summary references SSDF practice coverage so the audit is comparable across runs.
For each finding above the configured severity threshold, draft a concrete remediation per modules/proposal-shape.md:
pensive:blast-radiusPresent proposals one at a time via AskUserQuestion. Default options: apply, file as issue, defer to backlog, reject. Auto-apply is opt-in via the --auto-apply flag and respects a per-finding severity threshold.
Apply each approved proposal as a discrete commit:
bashgit add <touched files> git commit -m "harden: <finding-id> <one-line summary>"
After each apply, re-run the project gates:
bashmake test --quiet && make lint && make type-check
If a gate fails, revert the commit (git revert HEAD --no-edit) and downgrade the finding to "needs human design."
Write reviews/harden-<date>.md with:
If running inside a PR context, post the executive summary as a comment via abstract:post_review_insights.
| Severity | Definition | Default disposition | |----------|------------|---------------------| | CRITICAL | Active exploit path, RCE, credential leak | apply or file immediately | | HIGH | Plausible exploit, missing defense-in-depth on attack surface | propose for apply | | MEDIUM | Best-practice gap, hardening opportunity | propose for apply with --auto-apply medium | | LOW | Style/documentation gap with security flavor | file as issue | | ADVISORY | Pattern detected without exploit narrative | report only |
markdown# Hardening Report — <date> ## Executive Summary - Codebase: <repo> @ <sha> - Languages scanned: Python (X files), Rust (Y files) - NIST SSDF practices covered: PW.4, PW.7, PW.8, RV.1, RV.2 - CWE Top 25 hits: <count> across <distinct CWEs> - Disposition: <N> applied, <N> filed, <N> deferred, <N> rejected ## Findings | ID | Severity | Citation | File:Line | Disposition | |----|----------|----------|-----------|-------------| | H1 | CRITICAL | CWE-502, NIST SSDF PW.7 | `src/x.py:45` | applied (commit abc123) | | H2 | HIGH | CWE-89, NIST SSDF PW.4 | `src/y.py:120` | filed (#456) | ## Per-finding detail ### H1 — Unsafe deserialization **Citation:** CWE-502 (Deserialization of Untrusted Data), NIST SSDF PW.7 (Review and analyze human-readable code). **Detection signal:** - File: `src/x.py:45` - Anchor: `data = pickle.loads(user_supplied_input)` - Pattern: <module>.loads(user_supplied_input) - Reachability: untrusted, comes from request body **Proposal:** ... **Blast radius:** ... **Reversal plan:** ...
--auto-apply,CRITICAL findings always prompt.
per-batch.
commit and downgrades the finding.
reference are advisory only and skip the apply phase.
--report-only until the user has reviewed at least one report and explicitly opts into proposals.
The skill composes (rather than re-implements):
pensive:rust-review: full Rust audit when Rust is presentpensive:bug-review: bug-hunting backbonepensive:safety-critical-patterns: NASA Power-of-10 adaptedpensive:tiered-audit: three-tier discipline (--tier 1/2/3)pensive:blast-radius: change-impact assessment for proposalsleyline:supply-chain-advisory: dependency postureleyline:authentication-patterns: auth/credential reviewleyline:content-sanitization: input handlingabstract:hook-authoring: hook-event securityimbue:proof-of-work: evidence discipline for findingsharden:findings-verified)Every finding must cite a real location and a verbatim anchor. Write findings to .review/findings.json and confirm each citation resolves:
bashpython plugins/imbue/scripts/citation_verifier.py \ --findings .review/findings.json --repo-root .
Drop or label UNVERIFIED any finding the verifier fails (exit 1); only verified findings enter the report. See Skill(imbue:review-core) Step 5 and Skill(imbue:structured-output) for the schema.
detected in the repo.
report executive summary lists the SSDF practice coverage.
proposal (file, diff or config snippet, blast radius, reversal plan, expected-passing test).
(or without an --auto-apply flag covering its severity).
gate failure reverted the commit and downgraded the finding.
reviews/harden-<date>.md exists and lists every findingwith a disposition (applied / filed / deferred / rejected / advisory).
Location + verbatim Anchorconfirmed by citation_verifier.py (exit 0), or unverified findings were dropped or labeled UNVERIFIED.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 10,029 | 11,731 | +17% | 1 | 1 | 0% | 1,289 | 3,801 | +195% | 0 | 0 | — |
case-02 | fail→fail | 8,571 | 8,843 | +3% | 1 | 1 | 0% | 1,026 | 3,632 | +254% | 0 | 0 | — |
case-03 | fail→fail | 17,266 | 18,272 | +6% | 1 | 1 | 0% | 2,471 | 4,962 | +101% | 0 | 0 | — |
case-04 | fail→fail | 7,514 | 11,664 | +55% | 1 | 1 | 0% | 750 | 3,328 | +344% | 0 | 0 | — |
case-05 | fail→pass | 42,984 | 13,472 | -69% | 1 | 1 | 0% | 4,868 | 4,035 | -17% | 0 | 0 | — |
case-06 | fail→fail | 17,889 | 13,783 | -23% | 1 | 1 | 0% | 1,961 | 3,822 | +95% | 0 | 0 | — |
case-07 | pass→pass | 9,457 | 7,404 | -22% | 1 | 1 | 0% | 1,435 | 3,451 | +140% | 0 | 0 | — |
case-08 | pass→pass | 19,082 | 4,201 | -78% | 1 | 1 | 0% | 1,816 | 3,312 | +82% | 0 | 0 | — |
case-09 | fail→pass | 10,446 | 5,105 | -51% | 1 | 1 | 0% | 1,584 | 3,518 | +122% | 0 | 0 | — |
case-10 | fail→pass | 14,582 | 6,231 | -57% | 1 | 1 | 0% | 2,054 | 3,548 | +73% | 0 | 0 | — |
case-11 | fail→pass | 10,571 | 5,433 | -49% | 1 | 1 | 0% | 1,546 | 3,459 | +124% | 0 | 0 | — |
case-12 | fail→pass | 11,342 | 2,326 | -79% | 1 | 1 | 0% | 2,138 | 3,089 | +44% | 0 | 0 | — |
case-13 | fail→pass | 7,625 | 2,547 | -67% | 1 | 1 | 0% | 1,082 | 3,041 | +181% | 0 | 0 | — |
case-14 | pass→pass | 20,220 | 7,966 | -61% | 1 | 1 | 0% | 2,387 | 4,028 | +69% | 0 | 0 | — |
case-15 | fail→pass | 12,744 | 6,031 | -53% | 1 | 1 | 0% | 1,916 | 3,660 | +91% | 0 | 0 | — |
case-16 | fail→pass | 15,914 | 9,372 | -41% | 1 | 1 | 0% | 2,448 | 4,100 | +67% | 0 | 0 | — |
case-17 | pass→pass | 7,812 | 5,624 | -28% | 1 | 1 | 0% | 1,050 | 2,955 | +181% | 0 | 0 | — |
case-18 | pass→pass | 10,723 | 4,441 | -59% | 1 | 1 | 0% | 1,504 | 3,146 | +109% | 0 | 0 | — |
case-19 | fail→pass | 11,265 | 4,774 | -58% | 1 | 1 | 0% | 1,653 | 3,429 | +107% | 0 | 0 | — |
case-20 | fail→pass | 14,282 | 7,684 | -46% | 1 | 1 | 0% | 2,389 | 4,000 | +67% | 0 | 0 | — |
case-21 | fail→pass | 8,487 | 3,049 | -64% | 1 | 1 | 0% | 1,341 | 3,197 | +138% | 0 | 0 | — |
case-22 | fail→pass | 8,194 | 2,643 | -68% | 1 | 1 | 0% | 1,076 | 3,096 | +188% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.