claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Applies NIST/CWE security hardening to Python and Rust code. Use when auditing code for vulnerabilities or proposing concrete security remediations.
$ npx -y skills add athola/claude-night-market --skill harden --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/hardenContext preview
The summary Claude sees to decide when to auto-load this skill.
Applies NIST/CWE security hardening to Python and Rust code. Use when auditing code for vulnerabilities or proposing concrete security remediations.
name: harden
description: Applies NIST/CWE security hardening to Python and Rust code. Use when auditing code for vulnerabilities or proposing concrete security remediations.
globs: "**/*.{py,rs,toml,yaml,yml,sh}"
alwaysApply: false
category: security
tags:
- security
- hardening
- nist
- supply-chain
- python
- rust
- cwe
tools: []
provides:
governance:
- hardening-report
- remediation-proposal
security:
- vuln-detection
- hardening-posture
usage_patterns:
- security-hardening
- quarterly-posture-audit
- pre-release-security-gate
complexity: advanced
model_hint: deep
estimated_tokens: 1100
progressive_loading: true
dependencies:
- pensive:safety-critical-patterns
- pensive:rust-review
- pensive:bug-review
- pensive:tiered-audit
- pensive:blast-radius
- leyline:supply-chain-advisory
- leyline:authentication-patterns
- leyline:content-sanitization
- abstract:hook-authoring
- imbue:proof-of-work
- imbue:review-core
- imbue:structured-output
modules:
- modules/nist-controls.md
- modules/python-checks.md
- modules/rust-checks.md
- modules/cross-cutting.md
- modules/frontier-checks.md
- modules/proposal-shape.mdActive 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.
with a security-focused panel.
but does not propose protocol fixes (specialist work).
1. `harden:discovery`: inventory languages, build files, hooks, CI workflows 2. `harden:scan-python`: run python-checks.md detectors when Python is present 3. `harden:scan-rust`: run rust-checks.md detectors when Rust is present 4. `harden:scan-cross-cutting`: run cross-cutting.md detectors (deps, secrets, SBOM, CI) 5. `harden:scan-frontier`: run frontier-checks.md (PQC, LLM supply chain, sandboxing) 6. `harden:nist-mapping`: map findings to NIST SSDF practices 7. `harden:proposals`: for each finding above the threshold, draft a concrete remediation per `modules/proposal-shape.md` 8. `harden:approval-gate`: present proposals to the user for apply / file / defer / reject 9. `harden:apply-and-validate`: apply approved proposals as discrete commits, re-run gates, capture evidence 10. `harden:findings-verified`: citations confirmed by `citation_verifier.py` 11. `harden:report`: write `reviews/harden-<date>.md` and optionally 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:
# 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`:
Present 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:
git add <touched files> git commit -m "harden: <finding-id> <one-line summary>"
After each apply, re-run the project gate
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.