Skip to content

Guide · Agent skill

How to use the Security and Hardening agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The Security and Hardening skill is an instruction set that tells an AI coding agent to treat every external input as untrusted and to check code against common web risks such as injection, cross-site scripting, broken access control, weak authentication and insecure file uploads. It is written for developers building web apps with logins, forms, uploads or third-party integrations, and for teams reviewing an input handler, login flow or API route. After this guide you will know what the skill changes in the agent's behaviour, how to install it, how to trigger it with plain requests, and where its limits are.

Security and Hardeningaddyosmani/agent-skills · MIT

Quick start

  1. 1Download the ZIP. Get the security-and-hardening ZIP from this directory page.
  2. 2Unzip the skill. Extract the folder so that SKILL.md and references/hardening-patterns.md are inside it.
  3. 3Place the folder. Move it to ~/.claude/skills/ for all projects, or to .claude/skills/ inside one project.
  4. 4Or upload in the apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
  5. 5Ask in plain language. Describe the feature, route or dependency you want reviewed, such as a login flow or an audit report.
  6. 6Review the output. Check the trust boundaries and proposed changes, and approve any auth or other Ask First change yourself.

What the Security and Hardening skill makes the agent do

When the skill is active, the agent starts by mapping the trust boundaries of a feature: where untrusted data enters the system, such as HTTP requests, form fields, file uploads, webhooks, third-party APIs and LLM output. It then names the assets worth protecting, runs a quick STRIDE pass over each boundary, and writes abuse cases next to use cases.

After that, it applies a set of rules. Examples from the skill include hashing passwords with bcrypt, scrypt or argon2, using httpOnly, secure and sameSite cookies for sessions, validating input at the boundary, and never exposing stack traces to users. For concrete code patterns, the skill points to a reference file, references/hardening-patterns.md, which the agent opens when it reaches that code.

Install the skill from the ZIP download

Download the ZIP for the skill from this directory page and unzip it. To make it available for all your projects, place the unzipped folder in ~/.claude/skills/. To limit it to a single project, place it in that project's .claude/skills/ folder.

If you use the Claude apps instead, upload the skill under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills

Trigger the skill with natural requests

You do not need a special command. The skill's description tells the agent when to use it, so ask for the task in plain language. The source lists triggers such as auditing an input handler, checking that a login flow is safe against the OWASP Top Ten, building a feature that accepts untrusted data, auditing dependencies, triaging package-manager audit findings, and assessing supply-chain risk in a new package. It also applies when personal data or privacy compliance such as GDPR or CCPA is involved.

  • Review this login handler for OWASP Top Ten issues.
  • Check this file upload endpoint for insecure handling before we merge.
  • Triage the findings from our package manager's audit and tell me what matters.
  • Assess the supply-chain risk of adding this new package to the project.
  • Map the trust boundaries for this webhook feature before we build it.

What to expect from the output

Expect the agent to explain the trust boundaries and risks it found, then propose or make code changes that follow the skill's rules. Some changes are gated. The skill's Ask First list includes adding or changing authentication logic, storing new categories of sensitive data, adding external integrations, changing CORS, adding file upload handlers, modifying rate limiting and granting elevated roles. The agent should wait for human approval on these.

The skill also says to run the detected package manager's native audit against the committed lockfile before every release. Review each change the agent makes before you accept it.

Requirements and safety notes

The source lists no requirements. The skill does not run scripts and does not use the network. It is a set of instructions and reference material that guides the agent's reasoning and code edits. It is a guide, not a security scanner, and it cannot guarantee that code is secure, so missed issues are possible.

The skill is not a substitute for a professional penetration test or formal security audit. For non-web or highly specialised systems, such as embedded software, cryptographic protocol design or regulated payment processing, the generic rules may not fit and expert review is needed.

  • Requires: nothing listed
  • Runs scripts: no
  • Uses network: no

Tips for getting useful results

Name the feature and its inputs in your request, and point the agent at the specific file or route. The skill works best when it can map a concrete boundary. Ask for abuse cases as well as a review, since the skill asks for them as the first test to write.

Keep the human review step. The skill is designed so that security-sensitive edits such as auth logic need approval, and you should check any dependency or audit recommendation yourself before acting on it.

  • Give the agent one feature or route at a time.
  • Ask it to explain the trust boundaries before it edits code.
  • Ask for the abuse-case tests it proposes, then run them.

What people use it for

  • Auditing an input handler or API route for injection and XSS risks before merging.
  • Checking that a login flow hashes passwords, sets secure session cookies and does not leak error details.
  • Reviewing a file upload feature for allowlisted types, size caps and content checks.
  • Triaging package-manager audit findings and assessing the supply-chain risk of a new dependency.
  • Mapping trust boundaries and abuse cases for a webhook or third-party integration before building it.

Frequently asked questions

How do I install the security-and-hardening skill?

Download the ZIP from the directory page and unzip it. Place the folder in ~/.claude/skills/ for personal use, or in a project's .claude/skills/ folder for one project. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

Does the security-and-hardening skill need anything else installed?

The source lists no requirements. The skill does not run scripts and does not use the network, so it adds instructions and reference material rather than software.

Is this skill free to use?

The source states the skill is licensed under MIT. The source does not mention pricing, so check the directory page for any further terms.

Can this skill replace a security scanner or penetration test?

No. The skill is guidance for the agent's reasoning and code changes, not a scanner. It cannot guarantee code is secure and missed issues are possible, so a professional penetration test or formal audit is still needed for serious systems.

Does the skill fix vulnerabilities automatically?

It can propose and make code changes, but security-sensitive edits such as authentication logic, CORS and rate limiting are on its Ask First list and need human approval. Review every change before accepting it.

How does it compare with other security tools for code?

The source does not compare it with other tools. Its distinct role is guiding an AI agent through threat modelling and hardening rules during development. Dedicated scanners and dependency audit tools serve different purposes, and the skill can help you triage their findings.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you build web apps with logins, forms, uploads or third-party integrations and want an agent to consider security from the start, or if you need a structured review of an input handler, login flow or dependency findings. Pick something else, such as a professional penetration test or a specialist review, for embedded, cryptographic, regulated payment or other highly specialised systems, and for any system where missed issues carry serious consequences.

Download the skill