security-hardening

security-hardening is a command for Claude Code from zsutxz/ClaudeLearning. It costs 0 tokens per session (1,933 once invoked), scanned A, original, MIT.

A security review and improvement workflow that checks an application for weaknesses across its code, dependencies, configuration, and deployment layers. It uses multiple security checks and coordinates specialized review agents.

In plain words
What is it for?
Use it to scan code, dependencies, exposed secrets, and application behavior; review common web risks; create a software component inventory; and apply layered security controls.
Why use it?
It brings findings from different parts of an application into one security assessment and guides work to reduce vulnerabilities and future risks.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to scan code, dependencies, exposed secrets, and application behavior; review common web risks; create a software component inventory; and apply layered security controls.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zsutxz/claudelearning/security-hardening
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/zsutxz/ClaudeLearning

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-hardening

README.md
[![agentmods](https://agentmods.dev/badge/commands/zsutxz/claudelearning/security-hardening.svg)](https://agentmods.dev/commands/zsutxz/claudelearning/security-hardening)
Your own site
<a href="https://agentmods.dev/commands/zsutxz/claudelearning/security-hardening"><img src="https://agentmods.dev/badge/commands/zsutxz/claudelearning/security-hardening.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,933 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01933
Opus 5 $0.00000 $0.00966
Sonnet 5 $0.00000 $0.00387
Haiku 4.5 $0.00000 $0.00193

Measured 7d ago against content hash 58360ae878d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

security-hardening scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/security-hardening.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Implement comprehensive security hardening with defense-in-depth strategy through coordinated multi-agent orchestration:

[Extended thinking: This workflow implements a defense-in-depth security strategy across all application layers. It coordinates specialized security agents to perform comprehensive assessments, implement layered security controls, and establish continuous security monitoring. The approach follows modern DevSecOps principles with shift-left security, automated scanning, and compliance validation. Each phase builds upon previous findings to create a resilient security posture that addresses both current vulnerabilities and future threats.]

Phase 1: Comprehensive Security Assessment

1. Initial Vulnerability Scanning

  • Use Task tool with subagent_type="security-auditor"
  • Prompt: "Perform comprehensive security assessment on: $ARGUMENTS. Execute SAST analysis with Semgrep/SonarQube, DAST scanning with OWASP ZAP, dependency audit with Snyk/Trivy, secrets detection with GitLeaks/TruffleHog. Generate SBOM for supply chain analysis. Identify OWASP Top 10 vulnerabilities, CWE weaknesses, and CVE exposures."
  • Output: Detailed vulnerability report with CVSS scores, exploitability analysis, attack surface mapping, secrets exposure report, SBOM inventory
  • Context: Initial baseline for all remediation efforts

2. Threat Modeling and Risk Analysis

  • Use Task tool with subagent_type="security-auditor"
  • Prompt: "Conduct threat modeling using STRIDE methodology for: $ARGUMENTS. Analyze attack vectors, create attack trees, assess business impact of identified vulnerabilities. Map threats to MITRE ATT&CK framework. Prioritize risks based on likelihood and impact."
  • Output: Threat model diagrams, risk matrix with prioritized vulnerabilities, attack scenario documentation, business impact analysis
  • Context: Uses vulnerability scan results to inform threat priorities

3. Architecture Security Review

  • Use Task tool with subagent_type="backend-api-security::backend-architect"
  • Prompt: "Review architecture for security weaknesses in: $ARGUMENTS. Evaluate service boundaries, data flow security, authentication/authorization architecture, encryption implementation, network segmentation. Design zero-trust architecture patterns. Reference threat model and vulnerability findings."
  • Output: Security architecture assessment, zero-trust design recommendations, service mesh security requirements, data classification matrix
  • Context: Incorporates threat model to address architectural vulnerabilities

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 118 lines · 0 tokens per session scan A 58360ae878d3

Subscribe to this mod's changes

security-hardening is a command published in the GitHub repository zsutxz/ClaudeLearning (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,933 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.