secure-code-guardian

secure-code-guardian is a skill for Claude Code from Jeffallan/claude-skills. It costs 113 tokens per session (1,648 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 — 57 skills 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 · 11,361 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 57 skills.

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.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.svg" alt="Measured on agentmods" 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,648 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 29 Apr 2026
  • Snyk pass 29 Apr 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.01648
Opus 5 $0.00056 $0.00824
Sonnet 5 $0.00023 $0.00330
Haiku 4.5 $0.00011 $0.00165

Measured 9d ago against content hash 19153a339a49, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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.
skills/secure-code-guardian/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 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 · 194 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 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 (11,361 stars, last pushed 1mo ago), licensed MIT. It adds 113 tokens to every session and 1,648 once invoked, about $0.0006 per session on Opus 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

Other skills, from other repositories

postgres-database-migration

Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…

timescale/pg-aiguide · 220 tokens

setup-timescaledb-hypertables

Use this skill when creating database schemas or tables for Timescale, TimescaleDB, TigerData, or Tiger Cloud, especially for time-series, IoT, metrics, events, or log data. Use this to improve the performance of any insert-heavy table. Trigger when user asks to: Create or design SQL schemas/tables AND…

timescale/pg-aiguide · 219 tokens

design-postgis-tables

Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications.

timescale/pg-aiguide · 31 tokens

pgvector-semantic-search

Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…

timescale/pg-aiguide · 190 tokens

find-hypertable-candidates

Use this skill to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables. Trigger when user asks to: Analyze database tables for hypertable conversion potential Identify time-series or event tables in an existing schema Evaluate if a table would…

timescale/pg-aiguide · 184 tokens

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…

timescale/pg-aiguide · 162 tokens