secure-coding

secure-coding is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 44 tokens per session (1,255 once invoked), scanned A, original, MIT.

A set of practices for writing code that safely handles user input, logins, permissions, passwords, tokens, and other sensitive data.

In plain words
What is it for?
It helps implement authentication, authorization, cryptography, secure cookies and headers, parameterized queries, and safely encoded output.
Why use it?
It prevents common security mistakes such as injection attacks, missing access checks, unsafe password storage, and exposed credentials.

Skill for Claude CodeCodex

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

Good fit It helps implement authentication, authorization, cryptography, secure cookies and headers, parameterized queries, and safely encoded output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/secure-coding
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 nimadorostkar/Claude-Skills-collection --skill secure-coding
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

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/nimadorostkar/claude-skills-collection/secure-coding/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/secure-coding)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/secure-coding"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/secure-coding/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-coding

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/secure-coding"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/secure-coding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • 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.00044 $0.01255
Opus 5 $0.00022 $0.00628
Sonnet 5 $0.00009 $0.00251
Haiku 4.5 $0.00004 $0.00126

Measured 9d ago against content hash 5d08a33c3a7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 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.

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/security/secure-coding/SKILL.md · 121 lines

How it starts

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

Secure Coding

Purpose

Write code where the secure path is the default path. Most vulnerabilities are not clever — they are a string concatenated into a query, an authorization check that was never written, or a password hashed with the wrong algorithm.

When to Use

  • Writing code that handles user input, authentication, or sensitive data.
  • Implementing authorization.
  • Handling passwords, tokens, or encryption.
  • Reviewing code for vulnerabilities.

Capabilities

  • Injection prevention: SQL, command, template, LDAP, XSS.
  • Authentication: password storage, session management, MFA, token handling.
  • Authorization: enforcing it at the right layer, and the object-level checks people forget.
  • Cryptography: choosing the right primitive and not implementing it yourself.
  • Secure defaults: headers, cookies, TLS.

Inputs

  • The code, and where untrusted data enters it.
  • The authentication and authorization model.
  • Compliance requirements, if any.

Outputs

  • Parameterized queries and encoded output, everywhere.
  • Authorization enforced on every object access, not just at the route.
  • Secrets and credentials handled with the correct primitives.

Workflow

  1. Identify the trust boundaries — Every place data enters from outside: HTTP, files, queues, environment, third-party APIs. Everything crossing one is untrusted, including data from your own other services.
  2. Parameterize, never concatenate — Every query, command, and template. String interpolation into SQL is the oldest vulnerability there is, and it is still the most common.
  3. Authorize on the object, not the route — A route guard checks that you are logged in. It does not check that this order belongs to you. Broken object-level authorization is the most prevalent API vulnerability in practice.
  4. Use the right crypto primitive — Argon2id or bcrypt for passwords. AES-GCM or libsodium for encryption. HMAC for signing. Never design your own scheme, and never use MD5, SHA-1, or plain SHA-256 for passwords.
  5. Fail closed — On error, deny. An authorization check that throws and is caught by a generic handler returning 200 has granted access.
  6. Set the defaults — Secure cookies, CSP, HSTS, and TLS configuration. These are one-time changes that eliminate whole vulnerability classes.

Read the full file on GitHub · 121 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. 9d ago First seen · 121 lines · 44 tokens per session scan A 5d08a33c3a7c

Subscribe to this mod's changes

secure-coding is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 25d ago), licensed MIT. It adds 44 tokens to every session and 1,255 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

offensive-crypto-attacks

Systematic methodology for identifying and exploiting cryptographic implementation weaknesses in real-world applications. Covers padding oracle attacks against CBC-mode ciphers with PKCS7 padding (Vaudenay's original attack through modern padbuster automation), ECB mode exploitation including block cut-and-paste and…

SnailSploit/Claude-Red · 261 tokens

offensive-c2-frameworks

Command and Control framework deployment, configuration, and operational tradecraft for red team engagements. Covers Cobalt Strike (malleable C2 profiles, Beacon types HTTP/HTTPS/DNS/SMB, Beacon Object Files for in-memory execution, sleep and jitter tuning, named pipe pivoting), Sliver (implant generation across…

SnailSploit/Claude-Red · 250 tokens

offensive-parameter-pollution

HTTP parameter pollution (HPP) checklist: duplicate parameter injection, backend vs frontend parsing differences, WAF bypass via HPP, server-side vs client-side HPP, and practical exploitation patterns. Use when testing web applications for parameter handling flaws.

SnailSploit/Claude-Red · 0 tokens

offensive-wifi

Wireless / 802.11 attack methodology for red team engagements and wireless security assessments. Covers monitor-mode setup, WPA/WPA2-PSK handshake capture and PMKID attacks, WPA3 SAE downgrade and Dragonblood, WPA-Enterprise (EAP) attacks (MSCHAPv2 cracking, EAP-TLS cert theft, evil-twin RADIUS), Karma / Known Beacons…

SnailSploit/Claude-Red · 183 tokens

offensive-z-wave

Z-Wave attack methodology — sniffing with Z-Force / EZ-Wave / RTL-SDR + ZniffMobile, S0 (legacy) network-key derivation flaw and key reuse, S2 (modern) ECDH commissioning analysis, replay/injection on unauthenticated nodes, default-key brute-force on test deployments, and home-automation hub pivots. Use when targeting…

SnailSploit/Claude-Red · 113 tokens

seo

Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization".

addyosmani/web-quality-skills · 46 tokens