secure-coding

secure-coding is a skill for Claude Code, Codex from MartinOlivero/saas-builder. It costs 128 tokens per session (1,390 once invoked), scanned A, original, MIT.

A secure-by-default workflow for writing backend, API, authentication, and data-handling code. It considers security while code is being written, including request handlers, user input, database writes, uploads, secrets, cross-origin access, and third-party webhooks.

In plain words
What is it for?
Use it when building endpoints, handling forms or user data, saving records, adding login, accepting file uploads, managing secrets, configuring CORS, or receiving webhooks.
Why use it?
It helps prevent common vulnerabilities before they enter the application. This is prevention during development, not a later security audit of finished code.

Skill for Claude CodeCodex

Part of the saas-builder plugin — 18 skills, 1 hook shipped together

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

Made for: Claude Code, Codex.

Or install saas-builder, the plugin that ships this one along with the rest of its 18 skills, 1 hook.

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/martinolivero/saas-builder/secure-coding.svg)](https://agentmods.dev/skills/martinolivero/saas-builder/secure-coding)
Your own site
<a href="https://agentmods.dev/skills/martinolivero/saas-builder/secure-coding"><img src="https://agentmods.dev/badge/skills/martinolivero/saas-builder/secure-coding.svg" alt="Measured on agentmods" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,390 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00128 $0.01390
Opus 5 $0.00064 $0.00695
Sonnet 5 $0.00026 $0.00278
Haiku 4.5 $0.00013 $0.00139

Measured 3d ago against content hash 1830238eceba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

secure-coding scanned grade A with 0 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/secure-coding/SKILL.md · 71 lines

How it starts

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

Secure Coding

This skill keeps you from introducing vulnerabilities while you build. It is prevention, not audit — it runs at the moment you write an endpoint, a form handler, or a database write, and bakes in the safe default before the bug exists.

Analogy: it is the seatbelt you put on before driving, not the crash investigator who shows up afterward. Audit tools (Trail of Bits, Semgrep, CodeQL) inspect the wreck. This skill stops the crash.

Scope

This skill is for the solo dev or small team who has no security tooling installed and just wants to ship without leaving holes. If a dedicated audit plugin is present, this skill still runs first — preventing a vuln is always cheaper than finding it later.

Trigger

Activate whenever code touches: a request handler/endpoint, user input, a database write, authentication, file uploads, secrets/env vars, CORS, or any third-party webhook. Default-deny mindset: code with no explicit security decision is the bug.

Discovery (max 3 questions, only if unknown)

  1. Is this endpoint/data public, authenticated, or admin-only?
  2. Does it touch personal data (email, name, payment, location, anything identifying a person)?
  3. What is the backend — serverless functions (Vercel), a Node server, or a BaaS (Supabase/InsForge)?

The OWASP Top 10, as prevention rules

Apply the matching rule the instant you write the code. Each maps an OWASP 2021 category to a concrete default.

Risk Prevent it by
A01 Broken Access Control Check authorization on the server, on every endpoint. Verify the resource belongs to req.user (stop IDOR). Default-deny: no explicit check = bug. Never trust client-sent role/price/owner fields.
A02 Cryptographic Failures HTTPS everywhere (free on Vercel). Hash passwords with bcrypt or argon2, never plaintext/reversible. Encrypt PII at rest. Never roll your own crypto.
A03 Injection Never string-concat SQL. Parameterized queries / ORM only (pg params, Drizzle, Prisma, Kysely). Validate every input at the boundary with zod before it reaches logic or the DB.
A04 Insecure Design Threat-model the feature first: who can call this, what is the worst input. Enforce limits by design — quotas, server-side amount/price checks.
A05 Security Misconfiguration Add Helmet for secure headers. CORS = explicit origin allowlist (never * with credentials: true). Disable verbose error stacks in prod.
A06 Vulnerable Components Pin deps, run npm audit + Dependabot, remove unused packages, update before shipping.
A07 Auth Failures Use a vetted auth provider (see the auth skill). Rate-limit login routes harder. httpOnly + Secure + SameSite cookies for sessions. MFA where possible.
A08 Data Integrity Verify webhook signatures (e.g. Stripe signing secret). Don't deserialize untrusted data. Commit the lockfile.
A09 Logging Failures Log auth + authz denials — but never log PII, tokens, passwords, or full request bodies. Redact first.
A10 SSRF Don't fetch user-supplied URLs server-side without an allowlist; block internal/metadata IP ranges.

Read the full file on GitHub · 71 lines

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. 3d ago First seen · 71 lines · 128 tokens per session scan A 1830238eceba

Subscribe to this mod's changes

secure-coding is a skill published in the GitHub repository MartinOlivero/saas-builder (2 stars, last pushed 15d ago), licensed MIT. It adds 128 tokens to every session and 1,390 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.