/harden
> Apply security hardening to a project -- headers, configs, dependencies, and best practices.
Best use case
/harden is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
> Apply security hardening to a project -- headers, configs, dependencies, and best practices.
Teams using /harden should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/harden/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How /harden Compares
| Feature / Agent | /harden | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
> Apply security hardening to a project -- headers, configs, dependencies, and best practices.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# /harden > Apply security hardening to a project -- headers, configs, dependencies, and best practices. ## Usage ``` /harden [path] [--focus <headers|deps|auth|all>] [--dry-run] ``` ## What It Does Analyzes the project's current security posture and applies hardening measures: security headers, dependency updates, authentication improvements, input validation, and configuration tightening. Produces a before/after comparison. ## Implementation 1. **Assess current state** -- scan for security headers, dependency versions, auth config, input validation. 2. **Generate hardening plan** -- prioritized list of improvements by impact. 3. **Apply changes** (unless `--dry-run`): - **Headers**: add HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy. - **Dependencies**: update packages with known CVEs. - **Auth**: strengthen password policy, session config, token expiration. - **Input**: add validation schemas where missing. - **Config**: disable debug mode, hide server info, set secure cookie flags. 4. **Verify** -- run security scan to confirm improvements. 5. **Report** -- before/after security posture comparison. ## Examples ```bash # Full hardening /harden # Dry run to see what would change /harden --dry-run # Focus on security headers only /harden --focus headers # Focus on dependency updates /harden --focus deps ```
Related Skills
/do
> The agent's primary skill. Customize this to match your agent's purpose.
/report
> Generate structured reports. Director-owned.
/primary
> Main workflow execution and routing. Director-owned.
Qualify
## Command
Prospect
## Command
Close Plan
## Command
Battlecard
## Command
Spec
## Command
Schedule
## Command
Repurpose
## Command
Ideate
## Command
Analyze
## Command