secure-code-guardian

secure-code-guardian is a skill for Claude Code from Jeffallan/claude-skills. It costs 113 tokens per session (1,701 once invoked), scanned A, original, MIT.

A set of secure-development instructions for authentication, permissions, input handling, and common web vulnerabilities. OWASP Top 10 is a widely used list of serious web-application security risks.

In plain words
What is it for?
It is for building or reviewing login systems, access controls, password handling, input validation, security headers, CORS rules, and related tests.
Why use it?
It helps prevent issues such as account takeover, unauthorized access, SQL injection, cross-site scripting, and unsafe cross-origin settings. It also requires checking that the protections work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the fullstack-dev-skills plugin — 71 skills, 2 commands, 8 agents, 4 hooks shipped together

Good fit It is for building or reviewing login systems, access controls, password handling, input validation, security headers, CORS rules, and related tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeffallan/claude-skills/secure-code-guardian
About the project

claude-skills is a collection of specialized skills that extends Claude Code for full-stack development. Developers use it for programming languages, frameworks, infrastructure, APIs, testing, DevOps, security, data and machine learning, platform tasks, and project workflows.

Jeffallan/claude-skills · 12,556 stars · on GitHub

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 Jeffallan/claude-skills --skill secure-code-guardian
Clone the repo
git clone --depth 1 https://github.com/Jeffallan/claude-skills

Made for: Claude Code.

Or install fullstack-dev-skills, the plugin that ships this one along with the rest of its 71 skills, 2 commands, 8 agents, 4 hooks.

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 secure-code-guardian

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeffallan/claude-skills/secure-code-guardian/github.svg)](https://agentmods.dev/skills/jeffallan/claude-skills/secure-code-guardian)
Your own site
<a href="https://agentmods.dev/skills/jeffallan/claude-skills/secure-code-guardian"><img src="https://agentmods.dev/badge/skills/jeffallan/claude-skills/secure-code-guardian/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 secure-code-guardian

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeffallan/claude-skills/secure-code-guardian"><img src="https://agentmods.dev/badge/skills/jeffallan/claude-skills/secure-code-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,701 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 4 Oct 2026
  • Snyk pass 3 Oct 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00113 $0.01701
Opus 5.5 $0.00045 $0.00680
Sonnet 5.5 $0.00023 $0.00340
Haiku 4.5 $0.00011 $0.00170

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

Security

Grade A, and why

secure-code-guardian scanned grade A with 1 finding 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.

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.

- **Headers/CORS**: Validate with a security scanner (e.g., `curl -I`, Mozilla Observatory) that security headers are present and CORS origin allowlist is correct.
plugin/skills/secure-code-guardian/SKILL.md · 197 lines

How it starts

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

Secure Code Guardian

Core Workflow

  1. Threat model — Identify attack surface and threats
  2. Design — Plan security controls
  3. Implement — Write secure code with defense in depth; see code examples below
  4. Validate — Test security controls with explicit checkpoints (see below)
  5. Document — Record security decisions

Validation Checkpoints

After each implementation step, verify:

  • Authentication: Test brute-force protection (lockout/rate limit triggers), session fixation resistance, token expiration, and invalid-credential error messages (must not leak user existence).
  • Authorization: Verify horizontal and vertical privilege escalation paths are blocked; test with tokens belonging to different roles/users.
  • Input handling: Confirm SQL injection payloads (' OR 1=1--) are rejected; confirm XSS payloads (<script>alert(1)</script>) are escaped or rejected.
  • Headers/CORS: Validate with a security scanner (e.g., curl -I, Mozilla Observatory) that security headers are present and CORS origin allowlist is correct.

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
OWASP references/owasp-prevention.md OWASP Top 10 patterns
Authentication references/authentication.md Password hashing, JWT
Input Validation references/input-validation.md Zod, SQL injection
XSS/CSRF references/xss-csrf.md XSS prevention, CSRF
Headers references/security-headers.md Helmet, rate limiting

Constraints

MUST DO

  • Hash passwords with bcrypt/argon2 (never MD5/SHA-1/unsalted hashes)
  • Use parameterized queries (never string-interpolated SQL)
  • Validate and sanitize all user input before use
  • Implement rate limiting on auth endpoints
  • Set security headers (CSP, HSTS, X-Frame-Options)
  • Log security events (failed auth, privilege escalation attempts)
  • Store secrets in environment variables or secret managers (never in source code)

Read the full file on GitHub · 197 lines

Files

What ships with it

5 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 Changed ecfdd2e38d06
  2. 1mo ago Changed · +3 lines 47715fd6db1e
  3. 3mo ago First seen · 194 lines · 113 tokens per session scan A 19153a339a49

Subscribe to this mod's changes

secure-code-guardian is a skill published in the GitHub repository Jeffallan/claude-skills (12,556 stars, last pushed today), licensed MIT. It adds 113 tokens to every session and 1,701 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

secure-code-guardian compared with skills from other repositories

secure-code-guardian next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
secure-code-guardianJeffallan/claude-skillsSkill13ktodayMITA113Claude Code
postgres-database-migrationtimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A220Cursor
timescaledb-hyperfunctionstimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A298Cursor
design-postgis-tablestimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A31Cursor
setup-timescaledb-hypertablestimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A219Cursor
migrate-postgres-tables-to-hypertablestimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A181Cursor
pgvector-semantic-searchtimescale/pg-aiguideSkill1.9kyesterdayApache-2.0A190Cursor