Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/sam-dumont/claude-skillsnpx agentmods add skills/sam-dumont/claude-skills/code-securityWrote 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.
[](https://agentmods.dev/skills/sam-dumont/claude-skills/code-security)<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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00146 | $0.03427 |
| Opus 5.5 | $0.00058 | $0.01371 |
| Sonnet 5.5 | $0.00029 | $0.00685 |
| Haiku 4.5 | $0.00015 | $0.00343 |
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 3mo 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)` | 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!"
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.
- 3mo ago First seen · 413 lines · 146 tokens per session scan A 7c7449c74e8c
code-security is a skill published in the GitHub repository sam-dumont/claude-skills (38 stars, last pushed 28d ago), licensed MIT. It adds 146 tokens to every session and 3,427 once invoked, about $0.0006 per session on Opus 5.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.
code-security compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| code-securitysam-dumont/claude-skills | Skill | 38 | 28d ago | MIT | A | 146 | Claude Code |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 102k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 396k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 331k | 4d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 15k | today | CC0-1.0 | A | 113 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 144k | today | MIT | A | 95 | Claude Code |