PlugWiki

security-and-hardening Skill for Claude: Write More Secure Code

Makes Claude threat-model first, then follow a clear always, ask-first and never list when it writes security-sensitive code.

Installs
75.8K
on skills.sh
Stars
112.6K
on GitHub
Files
1
besides SKILL.md
Updated
Nov 2026
last repo commit

security-and-hardening makes Claude start with a short threat model, then apply a three-tier rule set: always do, ask first and never do. It covers injection, XSS, auth and sessions, headers, uploads, secrets, dependencies, privacy and AI features.

It triggers when you handle user input, authentication, stored data or outside services. It bundles one Markdown pattern file with code examples and no scanner scripts, and it tells Claude to run your package manager's own audit.

Good for

  • Developers building login, input handling, file uploads or payments
  • Teams adding LLM features that need output and prompt-injection rules
  • Reviewers who want a checklist to sign off against

Install security-and-hardening

Claude Code

  1. 1

    Copy this prompt.

    Install the security-and-hardening skill in Claude Code. Run this command:
    
    /plugin marketplace add addyosmani/agent-skills
    /plugin install agent-skills@addy-agent-skills
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

The README says a per-skill install copies only the skill folder, not the repo-level references folder that holds the shared checklists. The skill still works without it. The plugin route installs the whole set of 25 skills with those references. Pick one route, not both. If the plugin install fails with an SSH error, the README gives an HTTPS form of the marketplace add.

From the project README. Source.

What's in the skill

When it loads

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 session cookies, 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.

Sections in SKILL.md

  1. Overview
  2. When to Use
  3. Process: Threat Model First
  4. The Three-Tier Boundary System
  5. Always Do (No Exceptions)
  6. Ask First (Requires Human Approval)
  7. Never Do
  8. Hardening Controls
  9. Injection, XSS, and access control
  10. Authentication and sessions
  11. Headers, CORS, and responses
  12. Input validation and uploads
  13. Server-side fetches (SSRF)
  14. Destructive operations on derived paths
  15. Rate limiting
  16. Secrets

Key facts

License
MIT
Installs on skills.sh
75,764 (Nov 2, 2026)
GitHub stars (whole repo)
112,555 (Nov 2, 2026)
Last commit to the repo
Nov 1, 2026

What it includes

  • Map trust boundaries, name assets, run STRIDE, write abuse cases

    Five minutes of thinking like an attacker before adding controls.

    Threat model first

  • 8 rules with no exceptions

    Validate external input, parameterize queries, encode output, use HTTPS, hash passwords, set security headers, use httpOnly cookies and run the native dependency audit.

    Always do

  • 7 changes that need human approval

    New auth flows, new sensitive data, new external integrations, CORS changes, file upload handlers, rate limit changes and elevated permissions.

    Ask first

  • 7 hard stops

    Commit secrets, log sensitive data, trust client-side validation, disable security headers, use eval or innerHTML with user data, keep sessions in localStorage or expose stack traces.

    Never do

  • Injection, XSS, access control, auth, headers, uploads, SSRF

    Each topic links to a pattern with example code in references/hardening-patterns.md.

    Hardening controls

  • Allowlisted root, minimum depth, ownership check

    Before a delete, move or overwrite, the resolved target must pass all three checks.

    Destructive operations on derived paths

  • Block install scripts first, then run the native audit

    Never apply forced fixes such as npm audit fix --force automatically. Audits miss new malicious packages, so review new dependencies.

    Runs code · Dependencies and supply chain

  • Classify fields, collect for a purpose, set retention

    Covers deletion paths, consent and data-processing agreements with vendors.

    Personal data and privacy

  • Treat model output as untrusted input

    Maps to the OWASP LLM Top 10 (2025): validate output, resist prompt injection and keep secrets out of the context window.

    AI and LLM features

  • Sign-off lists

    Ends with a verification list, including a clean audit and no secrets in source or git history.

    Review checklist and verification

From the official docs

Permissions

Medium risk

The skill makes Claude edit security-sensitive code and run package-manager commands such as audits and clean installs. Work on a branch and review every dependency change.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It edits security-sensitive code

    Changes to auth, input handling and secrets are easy to get subtly wrong. Review the diff and test on a branch.

  • It runs package-manager commands

    The dependency steps mention native audits and a clean frozen install. Approve each command and read lockfile changes.

  • The skill says to avoid forced fixes

    It warns against applying npm audit fix --force automatically. Hold Claude to that and review any upgrade.

  • It tells Claude to block dependency install scripts first

    The dependency steps say to bootstrap with scripts disabled and to approve only the minimum. Check which scripts you approve.

Technical details
Talks toNot stated in the SKILL.md; the dependency steps use your package manager's own commands

Questions

How do I install security-and-hardening?

Use the install box above. The plugin route installs all 25 skills and the repo's shared checklists. A per-skill install copies only this skill folder, so its links to security-checklist.md will not resolve. The pattern file inside the folder still works.

Does it scan my code for vulnerabilities?

No scanner is bundled. The folder holds a SKILL.md and a Markdown pattern file. The skill tells Claude to write code to its rules and to run your package manager's native audit against the lockfile before release.

Which standards does it follow?

The SKILL.md builds on the OWASP Top 10 for web apps and maps AI features to the OWASP Top 10 for LLM Applications (2025). It adds STRIDE for threat modeling.

Does it work in the Claude app or Codex?

The README documents a Codex plugin install and a Claude Code plugin. The Claude app route is not documented.

How is it different from code-review-and-quality?

security-and-hardening is a guide to building securely. code-review-and-quality reviews a change on five axes, and its security axis points to this skill for detail. The two are separate skills in the same repo.

Does it need an API key?

No key is named in the SKILL.md. Its audit step uses your package manager's own audit command.

Is it safe?

It is mostly text rules, but it makes Claude edit security-sensitive code and run package-manager commands such as audits and clean installs. Work on a branch and review every dependency change.

Information

updated Nov 2, 2026

Folder
skills/security-and-hardening

addyosmani/agent-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 5
  1. addyosmani/agent-skills README · github.com
  2. security-and-hardening SKILL.md · github.com
  3. hardening-patterns.md · github.com
  4. security-and-hardening on skills.sh · skills.sh
  5. addyosmani/agent-skills · github.com

Updated Nov 2, 2026.