security-and-hardening

security-and-hardening is a skill for Claude Code from shennawardana23/skillme. It costs 87 tokens per session (2,115 once invoked), scanned B, original, Apache-2.0.

A guide for designing and building features with security protections included from the start. It maps where untrusted data enters and how attackers might misuse each boundary.

In plain words
What is it for?
Use it when building features that accept user input, manage sessions, receive webhooks, handle payments, or call outside services.
Why use it?
It reduces the chance that authentication, file uploads, payments, personal data, or external integrations are protected only after the feature is finished.

Skill for Claude Code

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

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Use it when building features that accept user input, manage sessions, receive webhooks, handle payments, or call outside services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shennawardana23/skillme/security-and-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 shennawardana23/skillme --skill security-and-hardening
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

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-and-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/security-and-hardening/github.svg)](https://agentmods.dev/skills/shennawardana23/skillme/security-and-hardening)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/security-and-hardening"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/security-and-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-and-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/shennawardana23/skillme/security-and-hardening"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/security-and-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,115 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00087 $0.02115
Opus 5 $0.00044 $0.01058
Sonnet 5 $0.00017 $0.00423
Haiku 4.5 $0.00009 $0.00212

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

Security

Grade B, and why

security-and-hardening scanned grade B 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 9d 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.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- **SSRF** — any server-side fetch of a user-influenced URL needs a host allowlist, a check that *every* resolved IP is a public unicast address, and `redirect: 'error'`. The `169.254.169.254` cloud metadata address is t

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-and-hardening/SKILL.md · 101 lines

How it starts

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

Security and Hardening

This is a build-time skill: it hardens a feature while it's being designed and written. For auditing code that already exists, use security-review (priority checklist) or security-analysis (pattern scan). Treat every external input as hostile, every secret as sacred, every authorization check as mandatory — security is a constraint on every line touching user data, auth, or external systems, not a phase at the end.

Process: threat model first

Controls bolted on without a threat model are guesses. Before writing hardening code, spend five minutes thinking like an attacker:

  1. Map the trust boundaries — where does untrusted data cross into the system? HTTP requests, form fields, file uploads, webhooks, third-party API responses, message queues, and LLM output. Every boundary is attack surface.
  2. Name the assets — what's worth stealing or breaking? Credentials, PII, payment data, admin actions, money movement.
  3. Run STRIDE over each boundary — a quick lens, not a ceremony:
Threat Ask Typical mitigation
Spoofing Can someone impersonate a user/service? Authentication, signature verification
Tampering Can data be altered in transit or at rest? Integrity checks, parameterized queries, HTTPS
Repudiation Can an action be denied later? Audit logging of security events
Information disclosure Can data leak? Encryption, field allowlists, generic errors
Denial of service Can it be overwhelmed? Rate limiting, input size caps, timeouts
Elevation of privilege Can a user gain rights they shouldn't? Authorization checks, least privilege
  1. Write abuse cases next to use cases — for each feature, ask "how would I misuse this?" and make that the first test.

If you can't name the trust boundaries for a feature, you're not ready to secure it — this is OWASP A04: Insecure Design; most breaches begin in design, not code.

The three-tier boundary system

Always do (no exceptions): validate all external input at the boundary; parameterize every database query; encode output via framework auto-escaping; use HTTPS everywhere; hash passwords with bcrypt/scrypt/argon2; set security headers (CSP, HSTS, X-Frame-Options); use httpOnly/secure/sameSite cookies for sessions; run a dependency audit before every release.

Read the full file on GitHub · 101 lines

Files

What ships with it

2 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. 9d ago First seen · 101 lines · 87 tokens per session scan B 5431dd1c68d9

Subscribe to this mod's changes

security-and-hardening is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 15d ago), licensed Apache-2.0. It adds 87 tokens to every session and 2,115 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.