agentleFS
TheophilusChinomonaTheophilusChinomona/idev/skills/coding-standards/SKILL.md

coding-standards

Skill0 starsChanged 5 months agoMITView on GitHub

Security-focused code review standards. Use when reviewing code for security issues, or when writing code that handles user input, authentication, secrets, file uploads, or database queries.

120 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use everything-claude-code, everything-claude-code-conventions and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • InfopibeSkill

    everything-claude-code

    Also in 9 projects that use this

  • mryeastcodeSkill

    everything-claude-code-conventions

    Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

    Also in 8 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 8 projects that use this

  • tpavanipradeepSkill

    nextjs-turbopack

    Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

    Also in 15 projects that use this

  • CodeWithBehnamSkill

    dmux-workflows

    Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.

    Also in 17 projects that use this

  • InfopibeSkill

    investor-outreach

    Draft cold emails, warm intro blurbs, follow-ups, update emails, and investor communications for fundraising. Use when the user wants outreach to angels, VCs, strategic investors, or accelerators and needs concise, personalized, investor-facing messaging.

    Also in 22 projects that use this

  • +1 more from Infopibe

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 14 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 104 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run these checks when writing or reviewing code that touches user input, auth, secrets, files, or data stores.

    line 16
  2. Distinctive:

    Never interpolate user input into queries — use parameterized queries, prepared statements, or the ORM's safe query API

    line 19
  3. Distinctive:

    Never pass user input to a shell — use exec APIs that take an argument array, and whitelist allowed commands

    line 20
  4. Distinctive:

    Never render user content as raw HTML — use text-content APIs, or sanitize with a vetted library before rendering

    line 21
  5. Distinctive:

    Treat template/eval-style APIs fed by user input as injection sinks

    line 22
  6. Distinctive:

    Verify tokens with secrets from configuration/environment, never hardcoded

    line 27
  7. Distinctive:

    Prefer httpOnly cookies over script-accessible storage for session tokens

    line 28
  8. Distinctive:

    Check object-level access: a valid user must not be able to read or mutate another user's records by changing an ID (IDOR)

    line 29
  9. Distinctive:

    No hardcoded API keys, passwords, connection strings, or tokens in source — load from environment or a secrets store

    line 32
  10. Distinctive:

    Never log secrets or tokens.

    line 33
  11. Distinctive:

    Do not return password hashes, tokens, or internal identifiers in API responses — select response fields explicitly

    line 34
  12. Distinctive:

    Avoid deserialization modes that instantiate arbitrary types from input

    line 40
  13. Distinctive:

    When a security issue is found, report it like this:

    line 51
  14. Distinctive:

    Before completing work that touches input, auth, secrets, files, or queries:

    line 68

“Common” is measured: kept by at least 6 in 10 of the 104 edited versions of this file we could read. “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

Coding Standards: Security Review

Scope

This skill covers security checks only. Style and structure conventions come from the project's own detected patterns — defer to the backend-patterns cache (.claude/idev/backend-patterns/cache.md) and frontend-patterns cache (.claude/idev/frontend-patterns/cache.md), not from this skill. Detect and follow project conventions; do not impose generic ones.


Security Checks

Run these checks when writing or reviewing code that touches user input, auth, secrets, files, or data stores. Wording is stack-agnostic — apply the equivalent in the project's language/framework.

1. Injection (SQL, NoSQL, command, XSS)

  • Never interpolate user input into queries — use parameterized queries, prepared statements, or the ORM's safe query API
  • Never pass user input to a shell — use exec APIs that take an argument array, and whitelist allowed commands
  • Never render user content as raw HTML — use text-content APIs, or sanitize with a vetted library before rendering
  • Treat template/eval-style APIs fed by user input as injection sinks

2. Authentication & authorization

  • Protected routes must enforce authentication; sensitive operations must also check authorization (role/ownership) server-side
  • Compare passwords only against salted hashes (bcrypt/argon2-class), never plain text
  • Verify tokens with secrets from configuration/environment, never hardcoded
  • Prefer httpOnly cookies over script-accessible storage for session tokens
  • Check object-level access: a valid user must not be able to read or mutate another user's records by changing an ID (IDOR)

3. Secrets handling

  • No hardcoded API keys, passwords, connection strings, or tokens in source — load from environment or a secrets store
  • Never log secrets or tokens; redact sensitive fields in structured logs
  • Do not return password hashes, tokens, or internal identifiers in API responses — select response fields explicitly

4. Input validation at boundaries

  • Validate all external input (request bodies, query params, headers, file uploads, webhook payloads) at the boundary, before business logic
  • Validate type, range, length, and format; reject rather than coerce on failure
  • File uploads: validate content type and size, strip path components from filenames, and resolve the final path to confirm it stays inside the intended directory (path traversal)
  • Avoid deserialization modes that instantiate arbitrary types from input

5. Error-message and data leakage

  • Error responses to clients must not expose stack traces, internal paths, query text, or framework internals — log details server-side, return a generic message
  • CORS: restrict to known origins; never wildcard with credentials
  • State-changing endpoints need CSRF protection when cookie-authenticated

Security Alert Format

When a security issue is found, report it like this:

SECURITY ALERT: [Vulnerability Type]
Location: [file:line]
Severity: CRITICAL | HIGH | MEDIUM | LOW
Issue: [brief description]
Risk: [what could happen if exploited]
Fix: [how to fix it]

Alert before writing the fix, so the user understands the risk even if they decline the change.


Security Checklist

Before completing work that touches input, auth, secrets, files, or queries:

  • No hardcoded secrets, keys, or passwords
  • All external input validated at the boundary
  • Queries parameterized; no string-built SQL/commands
  • No raw HTML rendering of user content (or sanitized)
  • Authentication enforced on protected routes
  • Authorization (role/ownership) checked before data access
  • Sensitive data absent from logs and responses
  • File uploads validated (type, size, name, resolved path)
  • Error messages do not leak internals
  • CORS/CSRF configured for the project's auth model

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.