security-hardening

security-hardening is a skill for Claude Code from Kin9Zeus/senior-engineer-skills. It costs 172 tokens per session (2,696 once invoked), scanned A, original, MIT.

A defensive review guide for finding and fixing common application security weaknesses. It covers areas listed by OWASP, a security organization known for its Top 10 web-application risks.

In plain words
What is it for?
Use it when reviewing login and sessions, permissions, tokens, user input, uploads, redirects, security headers, dependencies, encryption, logging, or the threat model for a system you own or are allowed to assess.
Why use it?
It helps prevent stolen secrets, unauthorized access, injection attacks, cross-site scripting, unsafe file uploads, vulnerable dependencies, and insecure configuration.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the senior-engineer-skills plugin — 15 skills, 7 commands, 4 agents shipped together

Good fit Use it when reviewing login and sessions, permissions, tokens, user input, uploads, redirects, security headers, dependencies, encryption, logging, or the threat model for a system you own or are allowed to assess.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kin9zeus/senior-engineer-skills/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.

Any agent
npx skills add Kin9Zeus/senior-engineer-skills --skill security-hardening
Clone the repo
git clone --depth 1 https://github.com/Kin9Zeus/senior-engineer-skills

Made for: Claude Code.

Or install senior-engineer-skills, the plugin that ships this one along with the rest of its 15 skills, 7 commands, 4 agents.

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/skills/kin9zeus/senior-engineer-skills/security-hardening/github.svg)](https://agentmods.dev/skills/kin9zeus/senior-engineer-skills/security-hardening)
Your own site
<a href="https://agentmods.dev/skills/kin9zeus/senior-engineer-skills/security-hardening"><img src="https://agentmods.dev/badge/skills/kin9zeus/senior-engineer-skills/security-hardening/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/kin9zeus/senior-engineer-skills/security-hardening"><img src="https://agentmods.dev/badge/skills/kin9zeus/senior-engineer-skills/security-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 172 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,696 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00172 $0.02696
Opus 5 $0.00086 $0.01348
Sonnet 5 $0.00034 $0.00539
Haiku 4.5 $0.00017 $0.00270

Measured 11d ago against content hash 162cad243b2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

security-hardening scanned grade A with 1 finding 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/secret-scan.ps1, scripts/secret-scan.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- Review `postinstall` and `preinstall` scripts in the dependency tree; they run arbitrary code on every developer machine and CI runner.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/security-hardening/SKILL.md · 261 lines

How it starts

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

Security Hardening

Assume every input is hostile, every user is an attacker, and every secret in the repository is already public. Then check whether the code agrees.

Scope: defensive security — finding and fixing weaknesses in code the user owns or is authorised to assess. Never scan, probe or send traffic to infrastructure without explicit confirmation of ownership or authorisation. Produce fixes and detections, not weaponised exploits.


The order of operations

Findings are not equal. Work top-down; the first three account for most real breaches.

  1. Secrets — anything committed is compromised.
  2. Broken access control — the most common critical finding in real systems.
  3. Injection — SQL, command, template, LDAP, NoSQL.
  4. Authentication weaknesses — sessions, tokens, resets, MFA.
  5. XSS and content injection.
  6. SSRF and unvalidated redirects.
  7. Insecure configuration — headers, debug modes, exposed endpoints.
  8. Supply chain — dependencies, install scripts, build pipeline.
  9. Cryptographic failures — at rest, in transit, in tokens.
  10. Logging and monitoring gaps — an undetected breach is an unbounded one.

references/owasp-checklist.md carries the full per-category checks.


1. Secrets — start here, always

git log --all --full-history --name-only -- '*.env' '*.pem' '*.key' '*.p12' '*credential*' | head -30
git ls-files | grep -E '(^|/)\.env($|\.)' | grep -v example

Plus the pattern scan in scripts/secret-scan.sh / .ps1.

Anything found in history is disclosed, even if a later commit removed it. It lives in every clone, every fork, every CI cache. The remediation order is fixed:

  1. Rotate the credential. Immediately, before anything else.
  2. Check for abuse — provider audit logs, unexpected usage, unfamiliar IPs.
  3. Purge the history (git filter-repo, or BFG) and force-push, with every collaborator re-cloning.
  4. Prevent recurrence — secret scanning in CI, pre-commit hooks, .gitignore.

Read the full file on GitHub · 261 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 261 lines · 172 tokens per session scan A 162cad243b2c

Subscribe to this mod's changes

security-hardening is a skill published in the GitHub repository Kin9Zeus/senior-engineer-skills (3 stars, last pushed 17d ago), licensed MIT. It adds 172 tokens to every session and 2,696 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

accessibility

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

addyosmani/web-quality-skills · 51 tokens

performance

Optimize web performance for faster loading and better user experience. Use when asked to "speed up my site", "optimize performance", "reduce load time", "fix slow loading", "improve page speed", or "performance audit".

addyosmani/web-quality-skills · 49 tokens

seo

Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization".

addyosmani/web-quality-skills · 46 tokens

best-practices

Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities".

addyosmani/web-quality-skills · 49 tokens

web-quality-audit

Run an evidence-led web quality audit covering performance, accessibility, SEO, best practices, and agentic browsing. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".

addyosmani/web-quality-skills · 58 tokens

core-web-vitals

Optimize Core Web Vitals (LCP, INP, CLS) for better page experience using field and lab evidence. Use when asked to "improve Core Web Vitals", "fix LCP", "reduce CLS", "optimize INP", "page experience optimization", or "fix layout shifts".

addyosmani/web-quality-skills · 67 tokens