Skip to content
Skill

Security and hardening

Guides an AI agent through threat modeling, secure coding controls and dependency audits

Security and hardening is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
123K
Last commit
License
MIT
Listing updated

Similar skills

About Security and hardening

This skill steers an agent toward security-first development for web applications. It starts with a threat model: the agent maps trust boundaries, including LLM output and local values that look internal, names the assets at risk, and runs a STRIDE pass over each boundary before adding controls.

The guidance is organized as a three-tier rule set (always do, ask first, never do) and then as topic-by-topic controls covering injection and XSS, sessions and cookies, security headers and CORS, schema validation, file uploads, server-side request forgery, rate limiting and secrets. A separate section covers dependency hygiene, including identifying the package manager and lockfile, gating install scripts, triaging audit findings by reachability and reviewing new packages for typosquatting. Further sections address personal data minimization and retention for GDPR and CCPA, and risks specific to LLM features such as prompt injection and untrusted model output.

The skill points to a references file with concrete code patterns and a security checklist, which the agent opens as needed. It is written for web application code and assumes the agent has access to the project's source, lockfile and command line to run audits.

When your agent uses it

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 3 files (46 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the agent-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionic

Or copy only this skill to ~/.claude/skills/security-and-hardening:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/security-and-hardening &&
cp -R "$tmp/skills/security-and-hardening" ~/.claude/skills/security-and-hardening &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/security-and-hardening inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/security-and-hardening to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/security-and-hardening &&
cp -R "$tmp/skills/security-and-hardening" ~/.agents/skills/security-and-hardening &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/security-and-hardening inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/security-and-hardening to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/security-and-hardening &&
cp -R "$tmp/skills/security-and-hardening" ~/.cursor/skills/security-and-hardening &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/security-and-hardening inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/security-and-hardening

Or copy the folder to ~/.gemini/skills/security-and-hardening yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/security-and-hardening:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/security-and-hardening &&
cp -R "$tmp/skills/security-and-hardening" ~/.copilot/skills/security-and-hardening &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/security-and-hardening inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/addyosmani/agent-skills.git

Then copy agent-skills/skills/security-and-hardening into your agent's skills folder as security-and-hardening. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Threat modeling first
Walks the agent through mapping trust boundaries, naming assets and running a STRIDE pass before hardening.
Injection and XSS controls
Covers parameterized queries, output encoding, authorization on every request and safe handling of raw HTML.
Session and auth hardening
Sets rules for password hashing, secret sourcing and httpOnly, secure, sameSite cookies with bounded lifetimes.
Dependency audit triage
Guides audit runs against the committed lockfile, script gating and checks for typosquatted or malicious packages.
SSRF and upload safety
Describes allowlisting outbound URLs, blocking private addresses and validating uploaded file content.
Privacy and LLM risks
Covers data minimization, retention and deletion paths, plus prompt injection and untrusted model output.

Good for

  • Audit an input handler for injection and validation gaps
  • Review a login flow against the OWASP Top Ten
  • Triage npm or pnpm audit findings before a release
  • Check a new package for supply-chain risk before installing it
  • Add rate limiting and secure session cookies to an API
  • Review a feature that stores personal data for GDPR or CCPA obligations

Security and hardening FAQ

When does Security and hardening trigger?

It triggers when the task involves auditing input handlers, handling user input, authentication, data storage or external integrations, OWASP login checks, dependency vulnerability audits, supply-chain risk in new packages, or personal data and privacy compliance.

Does Security and hardening need any scripts or tools?

The skill ships no scripts. It relies on the project's own package manager audit, such as npm audit or pnpm audit, and on the agent's access to the repository and its lockfile.

What does Security and hardening leave to the reference files?

Concrete implementation patterns and a review checklist live in a separate references file that the agent opens when it reaches that code.

How do I install Security and hardening in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/security-and-hardening to use it in all your projects, or to .claude/skills/security-and-hardening in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.

Does Security and hardening run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Security and hardening?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Security and hardening?

The closest alternatives to Security and hardening are Security and hardening, Agent security hardening, Agentic safety audit, Security and Threat model.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from addyosmani/agent-skills

  1. Lets your coding agent inspect and test live browser pages through Chrome DevTools

    • Open source
    • 123K GitHub stars
    • Browser automation
  2. Guides an agent through red-green-refactor test-first development and bug reproduction

    • Open source
    • 123K GitHub stars
    • Developer tools
  3. Audits interfaces against WCAG 2.2 AA and guides fixing the violations found

    • Open source
    • 123K GitHub stars
    • Developer tools
  4. Guides designing stable, hard-to-misuse APIs, REST endpoints and module contracts

    • Open source
    • 123K GitHub stars
    • Design and media
  5. Sets up CI/CD quality gates, deployment strategies and rollback plans for agents

    • Open source
    • 123K GitHub stars
    • Developer tools
  6. Guides an agent through multi-axis code review before changes are merged

    • Open source
    • 123K GitHub stars
    • Developer tools