secure-coding

secure-coding is a skill for Claude Code, Codex from sergeyizmailov/knowledge-delta-skills. It costs 61 tokens per session (1,923 once invoked), scanned A, original, MIT.

A set of secure coding practices for JavaScript, Node.js, HTML, and CSS websites, admin panels, APIs, and landing pages. It focuses on validating input, controlling access, and avoiding common web security mistakes.

In plain words
What is it for?
Use it when writing or reviewing web code to choose safer libraries, protect API routes, validate data, configure headers, limit requests, and check dependencies for known vulnerabilities.
Why use it?
It reduces common risks such as cross-site scripting, injection, unsafe requests to other services, and weak configuration.

Skill for Claude CodeCodex

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/sergeyizmailov/knowledge-delta-skills/secure-coding
Any agent
npx skills add sergeyizmailov/knowledge-delta-skills --skill secure-coding
Clone the repo
git clone --depth 1 https://github.com/sergeyizmailov/knowledge-delta-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 secure-coding

README.md
[![agentmods](https://agentmods.dev/badge/skills/sergeyizmailov/knowledge-delta-skills/secure-coding.svg)](https://agentmods.dev/skills/sergeyizmailov/knowledge-delta-skills/secure-coding)
Your own site
<a href="https://agentmods.dev/skills/sergeyizmailov/knowledge-delta-skills/secure-coding"><img src="https://agentmods.dev/badge/skills/sergeyizmailov/knowledge-delta-skills/secure-coding.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,923 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.1 $0.00061 $0.01923
Opus 5 $0.00030 $0.00962
Sonnet 5 $0.00012 $0.00385
Haiku 4.5 $0.00006 $0.00192

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

Security

Grade A, and why

secure-coding 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 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.

| `fetch(userUrl)` without validation | SSRF | Internal scan, cloud metadata |
skills/secure-coding/SKILL.md · 106 lines

How it starts

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

Secure Coding (JS / Node.js / HTML / CSS)

Apply automatically when writing any web code — hardened by default. Validate deployment topology (reverse proxy, TLS termination, CDN) before applying trust proxy, HSTS preload, or cross-origin isolation defaults. AI-generated code has 2.74x more vulnerabilities than human-written; 45% of AI samples introduce an OWASP Top 10 vuln (Veracode, 100+ LLMs).

Workflow

New code: secure defaults first (helmet, cors explicit origins, rate-limit, body size limit) → per endpoint: auth middleware → zod validation → parameterized queries → generic errors → scan against "Never Do" table.

Dependencies (prefer context7 MCP; else npm registry / GitHub / GHSA): latest stable version, no open critical/high CVEs, maintainer disqualify only on: deprecated, archived, unanswered CVE > 90 days, ownership transferred to unknown party (mature libs like argon2/helmet/jose sit quiet for months and stay canonical). Apps: package-lock.json + npm ci; libs: semver ranges + audit in CI. Prefer Safe Library Stack below.

Auditing existing code: entry point → routes → middleware chain → static serving → npm audit + pinned versions + known compromised packages → configs (NODE_ENV, exposed .env/.git/source maps, debug endpoints) → per route: auth → validation → data handling → errors → headers/CSP/CORS/cookies/ports → report.

Audit output format:

### [CRITICAL/HIGH/MEDIUM/LOW] Finding title
- **Location**: file:line
- **Vulnerability**: CWE-XXX (name)
- **Impact**: what an attacker can do
- **Fix**: specific code change

OWASP Top 10:2025 Quick Map

# Risk Exploit Defense
A01 Broken Access Control IDOR: /api/user/123/124 Auth check on EVERY endpoint, 404 not 403
A02 Security Misconfiguration Default creds, debug, verbose errors, exposed files Helmet, CSP, no defaults, generic errors, block dotfiles
A03 Supply Chain Compromised npm packages (Shai-Hulud: 500+) Pin versions, npm ci --ignore-scripts, audit
A04 Cryptographic Failures Weak hashing, plaintext, broken TLS Argon2id, AES-256-GCM, TLS 1.2+ only
A05 Injection SQLi, XSS, SSTI, prototype pollution, prompt injection Parameterized queries, DOMPurify, no eval()
A06 Insecure Design No rate limit on login, no anti-automation Rate limit, CAPTCHA, lockout
A07 Auth Failures JWT alg:none, weak secrets, no rotation jose + RS256, strong secrets, regenerate on login
A08 Integrity Failures Tampered CDN scripts, unsigned updates SRI hashes, verify signatures
A09 Logging Failures No auth logging, secrets in logs Log auth events, NEVER log tokens/passwords
A10 Exception Mishandling Stack traces + DB errors to client Generic 500, detail to server logs only

Read the full file on GitHub · 106 lines

Files

What ships with it

12 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. 5d ago First seen · 106 lines · 61 tokens per session scan A 4d8d7a668f77

Subscribe to this mod's changes

secure-coding is a skill published in the GitHub repository sergeyizmailov/knowledge-delta-skills (3 stars, last pushed yesterday), licensed MIT. It adds 61 tokens to every session and 1,923 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens

firebase-messaging

Use when setting up Firebase Cloud Messaging, managing permissions and tokens, handling background/foreground notification taps, or dispatching messages server-side (HTTP v1).

evanca/flutter-ai-rules · 35 tokens

firebase-cloud-functions

Use when calling callable functions (httpsCallable), passing data to server-side logic, handling function errors/timeouts, configuring regions, or testing with the Emulator Suite.

evanca/flutter-ai-rules · 36 tokens

karpathy-llm-wiki

Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.

Astro-Han/karpathy-llm-wiki · 67 tokens

accessibility

Use when working on accessibility, a11y, WCAG, ARIA, screen readers, keyboard nav, focus order, contrast, alt text, captions, reduced motion, or target sizes; not language/culture/device (see inclusive-design).

evanca/flutter-ai-rules · 52 tokens

excalidraw-architect

Choose and compose the right Excalidraw diagram - architecture, flowchart, sequence, state, ER, swimlane, process, timeline, quadrant, pyramid, venn, loop, gantt, bar, line, scatter, and more - using the excalidraw-architect-mcp server. Use whenever a reader would learn more from a picture than from prose, or when…

BV-Venky/excalidraw-architect-mcp · 101 tokens