snr-harden

snr-harden is a command for Claude Code from Kin9Zeus/senior-engineer-skills. It costs 24 tokens per session (841 once invoked), scanned A, original, MIT.

A command for reviewing application security, including secrets, permissions, injection risks, login systems, browser protections, configuration, dependencies, cryptography and logging. It proposes fixes and regression tests.

In plain words
What is it for?
Performing a defensive security review of a codebase, confirming findings in the source, and preparing fixes and tests for issues such as exposed secrets or broken access controls.
Why use it?
It helps locate common security weaknesses and check them systematically before they become incidents.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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

Good fit Performing a defensive security review of a codebase, confirming findings in the source, and preparing fixes and tests for issues such as exposed secrets or broken access controls.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/kin9zeus/senior-engineer-skills/snr-harden/github.svg)](https://agentmods.dev/commands/kin9zeus/senior-engineer-skills/snr-harden)
Your own site
<a href="https://agentmods.dev/commands/kin9zeus/senior-engineer-skills/snr-harden"><img src="https://agentmods.dev/badge/commands/kin9zeus/senior-engineer-skills/snr-harden/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 snr-harden

Your own site · 80×15
<a href="https://agentmods.dev/commands/kin9zeus/senior-engineer-skills/snr-harden"><img src="https://agentmods.dev/badge/commands/kin9zeus/senior-engineer-skills/snr-harden.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 841 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.00024 $0.00841
Opus 5 $0.00012 $0.00420
Sonnet 5 $0.00005 $0.00168
Haiku 4.5 $0.00002 $0.00084

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

Security

Grade A, and why

snr-harden 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 11d 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.

commands/snr-harden.md · 90 lines

How it starts

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

Security Hardening Pass

Harden: $ARGUMENTS (default: the whole repository).

Load the security-hardening skill. Defensive security only — never scan, probe or send traffic to infrastructure the user has not confirmed they own or are authorised to test.

Order of work — top-down by real-world yield

1  Secrets           — anything committed is compromised. Start here
2  Access control    — the highest-severity findings live here
3  Injection         — SQL, command, template, path, deserialization
4  Authentication    — sessions, tokens, resets, MFA, rate limits
5  XSS and CSP
6  SSRF, CSRF, CORS, redirects, uploads
7  Configuration     — debug mode, headers, exposed endpoints
8  Supply chain      — dependencies, install scripts, CI
9  Crypto            — hashing, randomness, JWT verification
10 Logging           — auth events logged; no secrets or PII in logs

Run the scan first

skills/security-hardening/scripts/secret-scan.sh (or .ps1). It is read-only. Everything it reports is a lead, not a finding — confirm each by reading the file.

The two checks that find the most severe issues

1 · Secrets in git history. Anything ever committed is disclosed, in every clone and fork. Remediation order is fixed and non-negotiable:

1. ROTATE the credential — immediately, before anything else
2. Check the provider's audit log for abuse
3. Purge the history (git filter-repo / BFG), everyone re-clones
4. Enable secret scanning and a pre-commit hook

Purging without rotating leaves the key live and makes the repository look clean. That is the most common mistake in this whole area.

2 · Object-level authorization. Authenticate as user A; request user B's resource by changing an identifier. A 200 is a P0. Grep for the shape:

grep -rEn 'findById|findByPk|findOne\(\{ *_?id|\.get\(pk=|WHERE id *=' \
  --exclude-dir={node_modules,.git,vendor,dist} . | head -30

Then read each hit and ask: where is the caller's relationship to this object asserted? Grep for the mitigating control before declaring a finding — a false P0 costs the reader's trust for the whole report.

Read the full file on GitHub · 90 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. 11d ago First seen · 90 lines · 24 tokens per session scan A b98bc4ac0580

Subscribe to this mod's changes

snr-harden is a command published in the GitHub repository Kin9Zeus/senior-engineer-skills (3 stars, last pushed 18d ago), licensed MIT. It adds 24 tokens to every session and 841 once invoked, about $0.0001 per session on Opus 5. 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.