harden

harden is a skill for Claude Code from helderberto/agent-skills. It costs 77 tokens per session (813 once invoked), scanned A, original, MIT.

A security-focused coding guide for places where untrusted data enters an application, such as user input, authentication, file uploads, or external APIs. It applies protective rules while code is being implemented.

In plain words
What is it for?
Use it when adding authentication, processing user data, storing sensitive information, connecting external services, handling uploads, or changing other security-sensitive code.
Why use it?
It helps prevent common security mistakes at system boundaries, including unsafe database queries, cross-site scripting, exposed secrets, weak password storage, and insecure cookies.

Skill for Claude Code

Written for Claude Code: effort in frontmatter.

Part of the hb plugin — 38 skills, 6 agents shipped together

Good fit Use it when adding authentication, processing user data, storing sensitive information, connecting external services, handling uploads, or changing other security-sensitive code.

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

Any agent
npx skills add helderberto/agent-skills --skill harden
Clone the repo
git clone --depth 1 https://github.com/helderberto/agent-skills

Made for: Claude Code.

Or install hb, the plugin that ships this one along with the rest of its 38 skills, 6 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 harden

README.md
[![agentmods](https://agentmods.dev/badge/skills/helderberto/agent-skills/harden.svg)](https://agentmods.dev/skills/helderberto/agent-skills/harden)
Your own site
<a href="https://agentmods.dev/skills/helderberto/agent-skills/harden"><img src="https://agentmods.dev/badge/skills/helderberto/agent-skills/harden.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 813 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.00077 $0.00813
Opus 5 $0.00039 $0.00407
Sonnet 5 $0.00015 $0.00163
Haiku 4.5 $0.00008 $0.00081

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

Security

Grade A, and why

harden 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 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- [ ] Security headers present in response (check via DevTools or `curl -I`)
skills/harden/SKILL.md · 83 lines

How it starts

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

Harden

Security as a constraint on every line that touches user data, auth, or external systems. This skill is proactive: applied during implementation, not after. For reactive scans, use safe-repo (sensitive data) or deps-audit (CVEs).

Three-Tier Boundary System

Always do (no exceptions)

  • Validate every external input at the system boundary (route handler, API entry)
  • Parameterize all database queries (never concatenate user input into SQL)
  • Encode output to prevent XSS — use framework auto-escaping, don't bypass it
  • HTTPS for all external communication
  • Hash passwords with bcrypt/scrypt/argon2 (salt rounds ≥ 12); never plaintext
  • Set security headers: CSP, HSTS, X-Frame-Options, X-Content-Type-Options
  • Session cookies: httpOnly, secure, sameSite
  • Use environment variables for secrets; reference, never inline
  • Strip sensitive fields from API responses by default

Ask first (human approval required)

  • New authentication flow or auth logic changes
  • Storing new categories of sensitive data (PII, payment)
  • New external service integrations
  • CORS configuration changes
  • File upload handlers
  • Rate-limit / throttling changes
  • Granting elevated permissions or roles

Never do

  • Commit secrets to version control
  • Log sensitive data (passwords, tokens, full PAN)
  • Trust client-side validation as a security boundary
  • Disable security headers for convenience
  • Use eval() or innerHTML with user-provided data
  • Store sessions in client-accessible storage (e.g., localStorage for auth tokens)
  • Expose stack traces or internal errors to users

See OWASP Top 10 quick reference.

Input Validation at Boundaries

Always validate at the system boundary (route handler, message consumer), not in business logic:

  • Schema validator (Zod, Joi, Yup, pydantic) defines the contract
  • Reject with 422 + structured error before any business logic touches the data
  • Trust internal code; validate only at the edges

Read the full file on GitHub · 83 lines

Files

What ships with it

1 file 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. 7d ago First seen · 83 lines · 77 tokens per session scan A 305efa1693a0

Subscribe to this mod's changes

harden is a skill published in the GitHub repository helderberto/agent-skills (14 stars, last pushed 5d ago), licensed MIT. It adds 77 tokens to every session and 813 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

case-interview-practice

Interactive consulting case interview practice with structured frameworks, feedback mechanisms, and progressive difficulty. Use when preparing for management consulting interviews, case competitions, or business problem-solving exercises.

travisjneuman/.claude · 39 tokens

i18n-localization

Internationalization and localization for global applications. Use when adding multi-language support, handling regional formats, or preparing apps for global markets.

travisjneuman/.claude · 32 tokens

electron-desktop

Desktop application development with Electron for Windows, macOS, and Linux. Use when building cross-platform desktop apps, implementing native OS features, or packaging web apps for desktop.

travisjneuman/.claude · 38 tokens

finance

Financial analysis expertise for financial modeling (DCF, LBO, M&A), valuation, financial statement analysis, capital allocation, treasury management, and corporate finance decisions. Use when building financial models, analyzing statements, or making investment decisions.

travisjneuman/.claude · 48 tokens

investment-memo-generator

Investment memo creation combining financial analysis, document generation, and structured templates. Use when creating investment memos, pitch decks, deal summaries, or investment committee materials.

travisjneuman/.claude · 37 tokens

content-repurposer

Adapt content across platforms with tone/format shifting — blog to social, long to short, text to visual outline. Use when repurposing content for different channels, audiences, or formats.

travisjneuman/.claude · 43 tokens