code-security

code-security is a skill for Claude Code, Codex from sam-dumont/claude-skills. It costs 146 tokens per session (3,427 once invoked), scanned A, original, MIT.

A Python code-security review that combines automated checks with a reasoning-based review of how the code behaves. It checks for known unsafe patterns, vulnerable dependencies, exposed secrets, and logic-related security problems.

In plain words
What is it for?
Use it when scanning Python code, checking dependencies for known vulnerabilities, auditing authentication or input handling, or preparing an application for security hardening.
Why use it?
It helps find security issues that a single automated scanner may miss, including problems that depend on how several parts of an application work together.

Skill for Claude CodeCodex

Part of the code-security plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sam-dumont/claude-skills/code-security
Any agent
npx skills add sam-dumont/claude-skills --skill code-security
Clone the repo
git clone --depth 1 https://github.com/sam-dumont/claude-skills

Made for: Claude Code, Codex.

Or install code-security, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-security.svg)](https://agentmods.dev/skills/sam-dumont/claude-skills/code-security)
Your own site
<a href="https://agentmods.dev/skills/sam-dumont/claude-skills/code-security"><img src="https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,427 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00146 $0.03427
Opus 5 $0.00073 $0.01714
Sonnet 5 $0.00029 $0.00685
Haiku 4.5 $0.00015 $0.00343

Measured 5d ago against content hash 7c7449c74e8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-security scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.get(user_provided_url) # Can hit internal services

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| B601-B602 | shell injection | `subprocess.call(shell=True)` |
plugins/code-security/skills/code-security/SKILL.md · 413 lines

How it starts

The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Code Security Skill

This skill combines static analysis tools with LLM-powered dynamic analysis to provide comprehensive security coverage. Static tools catch known patterns; Claude reasons about logic flaws, business rule bypasses, and context-dependent vulnerabilities that no static tool can detect.

Two-Layer Security Model

┌─────────────────────────────────────────────────────────┐
│  Layer 1: Static Analysis (Automated)                   │
│  Bandit · pip-audit · ruff S-rules · secrets detection  │
│  → Known vulnerability patterns, CVEs, exposed secrets  │
├─────────────────────────────────────────────────────────┤
│  Layer 2: LLM Dynamic Analysis (Claude)                 │
│  Code path reasoning · business logic review            │
│  → Logic flaws, auth bypasses, race conditions,         │
│    context-dependent vulnerabilities                    │
└─────────────────────────────────────────────────────────┘

Layer 1: Static Analysis Tools

Tool Stack

Tool Purpose Invocation
Bandit Python-specific security linter (SAST) uvx bandit -r src/
pip-audit Dependency CVE scanner uvx pip-audit
ruff S-rules Bandit rules integrated in ruff uv run ruff check --select S src/
detect-secrets Secrets/credentials in source code uvx detect-secrets scan
safety Alternative dependency vulnerability check uvx safety check

Makefile Targets

Add these targets to the project Makefile:

# =============================================================================
# Security
# =============================================================================

# Security lint (Bandit) — high severity only for CI gates
security-lint:
	uvx bandit -r src/ --severity-level high -q

# Full security lint (all severities) — for thorough review
security-lint-full:
	uvx bandit -r src/ -f json -o bandit-report.json || true
	@echo "Full report: bandit-report.json"
	uvx bandit -r src/

# Dependency vulnerability audit
pip-audit:
	uvx pip-audit -r <(uv pip freeze | grep -v -e '^-e ' -e '^$(PROJECT_NAME)==') --strict

# Secrets detection
secrets-scan:
	uvx detect-secrets scan --all-files --exclude-files '\.git/.*' | python -c "import sys,json; r=json.load(sys.stdin); findings=r.get('results',{}); exit(1) if findings else print('No secrets found.')"

# Combined security gate for CI
security-check: security-lint pip-audit secrets-scan
	@echo "All security checks passed!"

Read the full file on GitHub · 413 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 413 lines · 146 tokens per session scan A 7c7449c74e8c

Subscribe to this mod's changes

code-security is a skill published in the GitHub repository sam-dumont/claude-skills (39 stars, last pushed 5mo ago), licensed MIT. It adds 146 tokens to every session and 3,427 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens