agentleFS
codeverbojancodeverbojan/claude-code-kickstart/.claude/skills/securing-code/SKILL.md

securing-code

Skill2 starsChanged 8 months agoMITView on GitHub

Enforces secure coding patterns for API routes, auth, input handling, and database queries. Triggered when writing server-side code, handling user input, or adding dependencies.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. dayfinggg/openai-codex-agent-skills★ 8same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always follow this sequence in every server-side handler:

    line 13
  2. Very specific:

    After adding ignore-scripts=true, explicitly allow trusted scripts:

    line 53
  3. Distinctive:

    Check: maintainer count, download volume, last publish date

    line 90
  4. Distinctive:

    Verify: no phantom transitive dependencies added

    line 92
  5. Distinctive:

    Wait: prefer packages with 7+ days since last publish

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Secure Code Patterns

API Route Handler Order

Always follow this sequence in every server-side handler:

1. Auth check
2. CSRF check (mutations only)
3. Input validation (schema-based)
4. Business logic (parameterized queries only)
5. Response

Non-Obvious Rules

  • CSRF tokens on ALL mutations (POST, PUT, DELETE) — not just forms
  • Rate limit auth endpoints specifically (login, reset, signup)
  • sameSite=strict on session cookies, not lax
  • Set X-Content-Type-Options: nosniff — prevents MIME sniffing attacks
  • Audit log sensitive operations (rate changes, user management, role changes)

Supply Chain

Pin versions, block scripts, enforce soak periods. These are enforceable guards, not advice — configure them in the project.

Node.js (.npmrc)

# Block postinstall scripts by default (would have stopped the Axios attack)
ignore-scripts=true

# 7-day soak period — don't install packages published in the last week
minimum-release-age=10080

# Pin exact versions — no ^ or ~
save-exact=true

# Enforce peer deps and run audit on every install
strict-peer-dependencies=true
audit=true

After adding ignore-scripts=true, explicitly allow trusted scripts:

pnpm config set allow-scripts "esbuild,sharp,prisma"

Python (pip)

# Pin with hashes for integrity verification
pip install --require-hashes -r requirements.txt

# Generate pinned requirements with hashes
pip-compile --generate-hashes requirements.in

Go

# Verify module checksums against public transparency log
GONOSUMCHECK= GOFLAGS=-mod=readonly go build ./...

Rust

# Cargo.toml — use exact versions
[dependencies]
serde = "=1.0.210"
# Audit for known vulnerabilities
cargo audit

When adding ANY new dependency

  1. Check: maintainer count, download volume, last publish date
  2. Review: postinstall / build scripts in the package
  3. Verify: no phantom transitive dependencies added
  4. Wait: prefer packages with 7+ days since last publish

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.