SecurityOfficial · openai

Security Best Practices skill for Claude

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.

Security Best Practices SKILL.md

A preview of the skill file from openai/skills.

Security Best Practices

Overview

This skill provides a description of how to identify the language and frameworks used by the current context, and then to load information from this skill's references directory about the security best practices for this language and or frameworks.

This information, if present, can be used to write new secure by default code, or to passively detect major issues within existing code, or (if requested by the user) provide a vulnerability report and suggest fixes.

Workflow

The initial step for this skill is to identify ALL languages and ALL frameworks which you are being asked to use or already exist in the scope of the project you are working in. Focus on the primary core frameworks. Often you will want to identify both frontend and backend languages and frameworks.

Then check this skill's references directory to see if there are any relevant documentation for the language and or frameworks. Make sure you read ALL reference files which relate to the specific framework or language. The format of the filenames is <language>-<framework>-<stack>-security.md. You should also check if there is a <language>-general-<stack>-security.md which is agnostic to the framework you may be using.

If working on a web application which includes a frontend and a backend, make sure you have checked for reference documents for BOTH the frontend and backend!

If you are asked to make a web app which will include both a frontend and backend, but the frontend framework is not specified, also check out javascript-general-web-frontend-security.md. It is important that you understand how to secure both the frontend and backend.

If no relevant information is available in the skill's references directory, think a little bit about what you know about the language, the framework, and all well known security best practices for it. If you are unsure you can try to search online for documentation on security best practices.

From there it can operate in a few ways.

  1. The primary mode is to just use the information to write secure by default code from this point forward. This is useful for starting a new project or when writing new code.

  2. The secondary mode is to passively detect vulnerabilities while working in the project and writing code for the user. Critical or very important vulnerabilities or major issues going against security guidance can be flagged and the user can be told about them. This passive mode should focus on the largest impact vulnerabilities and secure defaults.

Read the full SKILL.md on GitHub →

How to install Security Best Practices

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit openai/skills/skills/.curated/security-best-practices#main ~/.claude/skills/security-best-practices

Codex

npx degit openai/skills/skills/.curated/security-best-practices#main ~/.codex/skills/security-best-practices

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Security Best Practices skill do?

Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.

+How do I install Security Best Practices in Claude Code?

Copy the skill folder into ~/.claude/skills/security-best-practices, for example with "npx degit openai/skills/skills/.curated/security-best-practices#main ~/.claude/skills/security-best-practices". Claude Code loads it automatically and uses it when a task matches.

+Does Security Best Practices work with ChatGPT or Codex?

Yes. Security Best Practices uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/security-best-practices. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Security Best Practices free?

Security Best Practices is published on GitHub by openai. The repository does not declare a license, so check with the author before reusing it.

Related security skills

  1. Security Review

    Official

    Security code review for vulnerabilities. Use when asked to "security review", "find vulnerabilities", "check for security issues", "audit…

    getsentry/skills★ 1.2k
  2. Audit

    a user-authored audit skill

    pbakaus/impeccable★ 112k
  3. Semgrep

    Official

    Runs a Semgrep security scan over a codebase: detects languages, selects rulesets, presents the plan for explicit approval, then runs every…

    trailofbits/skills★ 8.3k
  4. Security Ownership Map

    Official

    Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and…

    openai/skills★ 29k
  5. Security Threat Model

    Official

    Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and…

    openai/skills★ 29k
  6. Aflpp

    Official

    Sets up and runs AFL++ for multi-core fuzzing of C/C++ projects built with afl-clang-fast or afl-gcc-fast.

    trailofbits/skills★ 8.3k
  7. Agentic Actions Auditor

    Official

    Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI…

    trailofbits/skills★ 8.3k
  8. Algorand Vulnerability Scanner

    Official

    Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field…

    trailofbits/skills★ 8.3k
  9. Audit Augmentation

    Official

    Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated…

    trailofbits/skills★ 8.3k

See all security skills →

More skills from openai

  1. Sentry

    Official

    Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the…

    openai/skills★ 29k

All skills by openai →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.