secure-coding

A baseline checklist for writing or reviewing code with common security risks in mind, including unsafe input, exposed secrets, weak passwords, and insecure network settings.

In plain words
What is it for?
Use it for security-sensitive coding, code reviews, and focused checks of authentication, data handling, dependencies, rate limits, HTTPS, and infrastructure settings.
Why use it?
It helps catch security problems while code is being written or changed, before they become vulnerabilities in a working system.

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

Made for: Claude Code, Codex.

Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00183 $0.01565
Opus 5 $0.00092 $0.00783
Sonnet 5 $0.00037 $0.00313
Haiku 4.5 $0.00018 $0.00156

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

Security

Grade B, and why

secure-coding scanned grade B with 2 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 2d 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.

Tells the agent never to refusemediumAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

- **Existing code already violates a rule and the user's task is unrelated?** Mention it once, don't refuse the task, don't sprawl into a cleanup unless asked.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Strips warnings and disclaimerslowAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- **Editing existing code**: if you notice a violation in code you're touching (even unrelated to the current task), flag it once with the rule it breaks and propose the fix. Do not lecture, do not list every minor issue

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

portal-skills/skills/secure-coding/SKILL.md · 88 lines

How it starts

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

Secure Coding Baseline

These are baseline security requirements for any team. Apply them whenever writing, modifying, or reviewing security-sensitive code.

The point of each rule is in the why: when you hit an edge case the checklist doesn't cover, reason from the principle, not the literal rule.

How to apply

  • Writing new code in a security-relevant area: follow these rules by default. Don't ask the user for permission to be secure.
  • Editing existing code: if you notice a violation in code you're touching (even unrelated to the current task), flag it once with the rule it breaks and propose the fix. Do not lecture, do not list every minor issue. Surface what matters.
  • Explicit "security review" requests: walk the relevant sections systematically and report issues grouped by category.
  • Uncertain whether something counts: name the rule and the situation and let the user decide.

Phrase findings like a peer pointing something out, not a compliance bot:

"Heads up: this concatenates req.body.email into the SQL string, which is the injection pattern we don't allow. Want me to switch to a parameterized query?"

One line, name the rule, propose the fix.

Authentication & Authorization

  • Use an authentication mechanism appropriate to the project. OIDC for user-facing apps; mutual TLS or signed tokens for service-to-service. Why: each context has known-good patterns; picking the wrong one usually means rolling something custom.
  • Use a well-known, maintained auth library. Never roll your own. Why: cryptographic and protocol mistakes are subtle and the cost of getting them wrong is account takeover.
  • Enforce authorization at the server, not just the UI. A hidden button is not a permission check. Why: clients are untrusted; UI-only enforcement is bypassed by anyone reading the network tab.
  • Least privilege. Tokens and roles grant the minimum access needed for the task.
  • Short-lived tokens with refresh rotation over long-lived sessions. Why: limits blast radius if a token leaks.

Read the full file on GitHub · 88 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. 2d ago First seen · 88 lines · 183 tokens per session scan B 50589644687c

Subscribe to this mod's changes

secure-coding is a skill published in the GitHub repository smk-labs/claude-plugins (11 stars, last pushed 4d ago), licensed MIT. It adds 183 tokens to every session and 1,565 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it B with 2 findings (tells the agent never to refuse, strips warnings and disclaimers). 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

brainstorm-okrs

Brainstorm team-level OKRs aligned with company objectives — qualitative objectives with measurable key results. Use when setting quarterly OKRs, aligning team goals with company strategy, drafting objectives, or learning how to write effective OKRs.

phuryn/pm-skills · 49 tokens

pre-mortem

Run a pre-mortem risk analysis on a PRD or launch plan. Categorizes risks as Tigers (real problems), Paper Tigers (overblown concerns), and Elephants (unspoken worries), then classifies as launch-blocking, fast-follow, or track. Use when preparing for launch, stress-testing a product plan, or identifying what could go…

phuryn/pm-skills · 79 tokens

ab-test-analysis

Analyze A/B test results with statistical significance, sample size validation, confidence intervals, and ship/extend/stop recommendations. Use when evaluating experiment results, checking if a test reached significance, interpreting split test data, or deciding whether to ship a variant.

phuryn/pm-skills · 54 tokens

dummy-dataset

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.

phuryn/pm-skills · 48 tokens

outcome-roadmap

Transform an output-focused roadmap into an outcome-focused one that communicates strategic intent. Rewrites initiatives as outcome statements reflecting user and business impacts. Use when shifting to outcome roadmaps, making a roadmap more strategic, or rewriting feature lists as outcomes.

phuryn/pm-skills · 53 tokens

release-notes

Generate user-facing release notes from tickets, PRDs, or changelogs. Creates clear, engaging summaries organized by category (new features, improvements, fixes). Use when writing release notes, creating changelogs, announcing product updates, or summarizing what shipped.

phuryn/pm-skills · 57 tokens