security-best-practices

security-best-practices is a skill for Claude Code, Codex from svngoku/coding-agents-skills. It costs 174 tokens per session (4,680 once invoked), scanned B, original, MIT.

Security review and hardening guidance for Python, JavaScript/TypeScript, and Go application code. It covers common weaknesses such as injection, unsafe login handling, cross-site scripting, exposed secrets, and insecure dependencies.

In plain words
What is it for?
Reviewing web routes, message handlers, command-line tools, file processors, authentication, file uploads, deserialization, and outbound requests. It also supports threat modelling and secure-login work.
Why use it?
It helps find security problems in code and connect each problem to a practical fix, instead of treating security as a checklist. It also helps developers assess how attackers could reach sensitive data or actions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Reviewing web routes, message handlers, command-line tools, file processors, authentication, file uploads, deserialization, and outbound requests. It also supports threat modelling and secure-login work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/svngoku/coding-agents-skills/security-best-practices
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.

Any agent
npx skills add svngoku/coding-agents-skills --skill security-best-practices
Clone the repo
git clone --depth 1 https://github.com/svngoku/coding-agents-skills

Made for: Claude Code, Codex.

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 security-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/security-best-practices/github.svg)](https://agentmods.dev/skills/svngoku/coding-agents-skills/security-best-practices)
Your own site
<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/security-best-practices"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/security-best-practices/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.

agentmods 80×15 button for security-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/security-best-practices"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/security-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,680 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00174 $0.04680
Opus 5 $0.00087 $0.02340
Sonnet 5 $0.00035 $0.00936
Haiku 4.5 $0.00017 $0.00468

Measured 9d ago against content hash bbf68e721958, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

security-best-practices scanned grade B with 3 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 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (fixtures/vulnerable.py, graders/check.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

- SSRF: scheme + host **allowlist**; forbid user-supplied URLs to internal services; block link-local (`169.254.169.254` metadata) and private ranges; disable redirects or re-validate each hop.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

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

| Python | `requests.get(user_url)` unchecked | SSRF | Scheme/host allowlist, block private IPs |

Runs shell commandslowCapability

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

os.system(f"ffmpeg -i {filename} out.mp4")
skills/security-best-practices/SKILL.md · 298 lines

How it starts

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

Security Best Practices

Review and harden application code against the vulnerabilities that actually get exploited: injection, broken authentication, IDOR, XSS, insecure secrets, weak dependencies. This skill is actionable engineering guidance, not a compliance checklist — each vulnerability class maps to a concrete code-level fix, with cheat-sheets for Python, JavaScript/TypeScript, and Go plus a worked secure-login example.

Quick Reference

Topic Reference
STRIDE worksheet, trust boundaries, least privilege, DFDs threat-modeling.md
JWT verification, OAuth2 flows, OIDC, token storage jwt-oauth.md

Core Workflow

  1. Scope the review. List entry points (HTTP routes, message consumers, CLIs, file processors), sensitive data (PII, credentials, payment data), and trust boundaries. Note the languages/frameworks so the right cheat-sheet applies.
  2. Threat-model in 5 minutes. Run the STRIDE table below per entry point; mark high-risk flows (auth, uploads, deserialization, outbound HTTP). Full worksheet: threat-modeling.md.
  3. Walk the OWASP map. Check every applicable row in the table below. Most findings come from three rows: access control (IDOR), injection, and security misconfiguration.
  4. Verify secure defaults and apply the cheat-sheet. TLS, headers, CORS, cookies, non-leaky errors (Secure Defaults), then grep for your language's dangerous patterns (SQL f-strings, pickle, innerHTML, eval) and fix confirmed hits.
  5. Report findings. Prioritize by severity × likelihood; give file:line, the vulnerability class, why it matters, and the fix. Offer to implement the fixes.

Threat Modeling in 5 Minutes

Letter Threat Ask Example Typical fix
S Spoofing Can someone pretend to be another user/service? Forged JWT, stolen session Strong auth, signed tokens, verify identity
T Tampering Can data be modified in transit or at rest? SQL injection, unsigned payloads TLS, signatures/HMAC, parameterized queries
R Repudiation Can an action be denied after the fact? "I never made that transfer" Audit logs, signed receipts
I Information disclosure Can sensitive data leak? Stack traces, IDOR, secrets in logs Least privilege, redaction, generic errors
D Denial of service Can the service be overwhelmed? Expensive queries, no rate limits Rate limiting, resource limits, timeouts
E Elevation of privilege Can a user do more than allowed? Role escalation, IDOR Server-side authorization on every action

Read the full file on GitHub · 298 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 298 lines · 174 tokens per session scan B bbf68e721958

Subscribe to this mod's changes

security-best-practices is a skill published in the GitHub repository svngoku/coding-agents-skills (11 stars, last pushed 26d ago), licensed MIT. It adds 174 tokens to every session and 4,680 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it B with 3 findings (cloud metadata endpoint, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.