Skip to main content
skill CX Codex

code-security — Claude Code skill: what it does, how to install

Security guidelines for writing safe code and catching vulnerabilities across 15+ languages. Helps inspect database queries, network calls, and infrastructure configurations.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add semgrep/skills --skill code-security -a claude-code
Open on GitHub

What code-security does

This skill equips the agent with defensive coding guidelines across 15+ programming languages. It compiles 28 rule categories covering OWASP Top 10 vulnerabilities, cryptography flaws, and infrastructure security. Rules are organized by severity levels, starting from SQL injection and hardcoded credentials down to race conditions or regular expression denial of service.

Guidance files live in the rules/ directory with explicit code samples demonstrating vulnerable and corrected implementations. The repository highlights priority checks for stacks such as Python, JavaScript, TypeScript, Go, Java, C/C++, Ruby, PHP, and HCL or YAML configurations. The assistant references these files whenever it spots input handling, database queries, XML parsing, or when explicitly asked.

Infrastructure checks specifically target Terraform configurations across AWS, Azure, and GCP, alongside Docker, Kubernetes, and GitHub Actions manifests. Without these configuration files present in your workspace, the corresponding checks remain idle.

What it helps with

  • catch SQL injection and command injection flaws in application code
  • audit Terraform, Kubernetes, and Docker manifests for security misconfigurations
  • replace weak hashing and encryption with SHA-256 and AES-256
  • detect hardcoded secrets and API credentials
  • prevent path traversal vulnerabilities during file operations

Example prompts for the agent

  • Check this query handler for SQL injection and unsanitized parameters
  • Inspect my Dockerfile and Kubernetes manifests for security issues
  • Is this file reading logic vulnerable to path traversal?

How to install code-security

1Skills CLI (Vercel)

npx skills add semgrep/skills --skill code-security -a claude-code

2Manually: put the files in place

~/.claude/skills/code-security/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-security/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-security

How to install code-security in Claude Code?

Run npx skills add semgrep/skills --skill code-security -a claude-code in your terminal.

What does the code-security skill do?

It gives the agent a reference set of 28 security categories covering OWASP Top 10 risks, crypto best practices, and secure configuration templates for writing and reviewing code.

Which languages and frameworks does this skill inspect?

The skill provides guidance across 15+ languages including Python, JavaScript, TypeScript, Java, Go, C/C++, Ruby, and PHP. It also covers infrastructure manifests for Docker, Kubernetes, GitHub Actions, and Terraform across AWS, Azure, and GCP.

Similar skills

Everything for Security →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor