Source: addyosmani/agent-skills · Maintainer: community: Addy Osmani · License: MIT · Checked: 23 October 2026
What is the security-and-hardening skill?
The security-and-hardening skill makes Claude Code and other agents treat security as a rule on every change, not a review at the end: it threat-models first, applies a fixed set of web app defenses, and checks the result against a list. It is for developers building anything that takes user input, handles logins, stores personal data or calls third-party services.
It comes from addyosmani/agent-skills, Addy Osmani's MIT-licensed set of engineering skills, which the README pitches as workflows that "enforce the same discipline senior engineers bring to production code." The skill's description reads: "Hardens code against vulnerabilities. Use when auditing an input handler for vulnerabilities, when handling user input, authentication, data storage, or external integrations, or when checking a login flow is safe against the OWASP Top Ten. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services. Use when auditing dependencies for known vulnerabilities, triaging package-manager audit findings, or assessing supply-chain risk in a new package. Use when personal data or privacy compliance (GDPR, CCPA) is involved."
As of 23 October 2026, its skills.sh page listed about 68,000 installs, with Pass results from all three security audits shown (Gen Agent Trust Hub, Socket and Snyk).
What does it do?
The SKILL.md starts with a process it calls "Threat Model First": spend five minutes thinking like an attacker before adding controls. The agent maps trust boundaries (requests, uploads, webhooks, third-party APIs and LLM output), names the assets worth stealing, runs STRIDE over each boundary, and writes abuse cases next to use cases.
Then it sorts rules into three tiers:
- Always do. Validate input at the boundary, parameterize queries, encode output, use HTTPS, hash passwords with bcrypt, scrypt or argon2, set security headers, use
httpOnly,secure,sameSitecookies, and run the package manager's native audit before every release. - Ask first. New auth flows, new kinds of sensitive data, new integrations, CORS changes, file uploads, rate limit changes and new elevated roles all need human approval.
- Never do. Commit secrets, log sensitive data, trust client-side validation, use
eval()orinnerHTMLwith user data, keep auth tokens in localStorage, or show stack traces to users.
The hardening section covers injection and XSS, authorization on every request (not just authentication), sessions, headers and CORS, schema validation and uploads, SSRF, destructive file operations on paths that came from input, rate limiting with a shared store, secrets, dependency and supply chain checks, privacy (classify fields, set retention, support deletion and export), and LLM features mapped to the OWASP Top 10 for LLM Applications. A rationalizations table answers excuses like "It's just a prototype", and a verification checklist closes it out.
What's in the folder:
SKILL.md: the threat model, three tiers, controls, red flags and checklist.references/hardening-patterns.md: worked code for each control, opened only when the agent reaches that kind of code.
The skill also points to references/security-checklist.md at the repo root, a longer pre-sign-off list with OWASP quick reference tables. That file is outside the skill folder (see the install note below).
How do you install the security skill in Claude Code?
Whole set as a Claude Code plugin. From the README:
/plugin marketplace add addyosmani/agent-skills
/plugin install agent-skills@addy-agent-skills
This brings all the skills, the repo's agents (including a security-auditor persona) and its slash commands. Plugin skills are namespaced as /plugin-name:skill-name per the Claude Code skills docs, so this one is /agent-skills:security-and-hardening. The README notes the marketplace clones over SSH and gives an HTTPS fallback if that fails.
Just this skill. With the skills CLI:
npx skills add addyosmani/agent-skills --skill security-and-hardening
Add -g for all projects. The folder lands in .claude/skills/security-and-hardening/, or ~/.claude/skills/security-and-hardening/ with -g. Codex and Cursor read the same SKILL.md format; see Codex skills and Cursor skills.
The README is upfront about one gap: a per-skill install "copies only skills/<name>/, not the repo-level references/ directory." The skill still works, but its link to security-checklist.md breaks. Fix it by using the plugin, or by copying that checklist into a references/ folder inside the installed skill.
How do you use it?
Claude can load it on its own when your task touches input, auth, storage or integrations. Naming it makes sure.
Example prompts (suggestions, not quotes from the repo):
Use the security-and-hardening skill to audit the signup and login handlers before we launch.Add a webhook endpoint for Stripe events. Threat-model it first and list the trust boundaries.We fetch a user-supplied image URL for link previews. Check it for SSRF.npm audit shows 3 high findings. Triage them by reachability and tell me which to fix now.Our chatbot passes model output into a SQL query. Review it against the LLM checklist.
If you installed the plugin, the repo's command files say /review checks security as one of five review axes, and /ship runs a security-auditor pass and treats critical or high findings as launch blockers. Use /agent-skills:review where Claude Code has a built-in /review.
There are no packages or API keys. The dependency checks use whatever your project already has, such as npm audit or pip-audit.
Tips and limits
From the files, not from testing:
- Guidance, not a scanner. It ships no scripts. It shapes code and reviews; it does not prove an app is secure. Pair it with a static analysis tool like the Semgrep skill.
- Web app focus. The overview says it covers "web applications". Examples assume HTTP APIs, cookies and Node-style tooling.
- OWASP numbering is the 2021 order. The quick reference lists A04 as Insecure Design. The OWASP Top 10:2025 renumbers categories and adds Software Supply Chain Failures, so update the labels if you report against 2025.
- Ask-first means it will stop. Expect the agent to pause for approval before auth changes, CORS edits or new upload handlers. That is by design.
- Audits miss new malware. The skill itself warns that dependency audits only match known advisories and won't catch a fresh typosquat.
- License. MIT, so you can fork and tune it if you keep the copyright notice.
Save it in your Kipt library
In Kipt, open Skills and paste the skill's GitHub folder link into the import box. Kipt reads the SKILL.md and its files, including hardening-patterns.md; for a repo with many skills it shows a list to pick from. You can also drop the folder or a .zip, which is a good way to add security-checklist.md into the skill's references/ folder first. Your skills live in your own private GitHub repo and install into Claude Code or Codex with one command:
npx skills add https://github.com/<you>/<repo>.git --all -g
Kipt is not affiliated with Addy Osmani or addyosmani/agent-skills.
Similar skills
- Semgrep skill: Trail of Bits' Semgrep and CodeQL skills for automated security scans.
- Code review skill: for the pre-merge review that should catch what slipped through.
- API design skill: design the interface well before you harden it.
- Systematic debugging skill: root cause first when a security fix breaks something.