agentleFS
GRIDLOCK-NYCGRIDLOCK-NYC/claude-skills/skills/code-security/SKILL.md

code-security

Skill0 starsChanged 7 months agoMITView on GitHub

Scan the current project for security issues, dead code, deprecated patterns, forgotten debug code, secrets in config, and hidden oddities. Use when user says 'scan for issues', 'find security problems', 'codebase audit', 'treasures', 'what's wrong with this codebase', 'find dead code', or 'security scan'. Do NOT use for code review of specific PRs (use review for that). Do NOT use for refactoring suggestions (use code-review for that).

  • Reads credentials

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 6

    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:

    Never modify any files. This is a read-only audit

    line 21
  2. Distinctive:

    Do not report style issues (formatting, naming).

    line 24
  3. Distinctive:

    Read the project structure.

    line 31
  4. Distinctive:

    Search for these patterns across the codebase:

    line 39
  5. Distinctive:

    Test files for deleted source files

    line 75
  6. Distinctive:

    After the report, offer:

    line 110

“Common” is measured: kept by at least 6 in 10 of the 4 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

Treasures

Scan the current project for security vulnerabilities, code quality issues, dead code, and hidden oddities. Output a severity-ranked report.

Important

  • Scan the ENTIRE project unless $ARGUMENTS specifies a scope (e.g., auth/, src/api/)
  • Never modify any files. This is a read-only audit
  • Rank every finding by severity: CRITICAL, HIGH, MEDIUM, LOW, INFO, FUN
  • Be specific — include file paths and line numbers for every finding
  • Do not report style issues (formatting, naming). Focus on correctness and security
  • False positives are worse than missed findings. Only report things you are confident about

Instructions

Step 1: Map the project

Read the project structure. Identify:

  • Language/framework (package.json, requirements.txt, go.mod, Cargo.toml, etc.)
  • Entry points (main files, route definitions, CLI entry)
  • Configuration files (.env.example, config/, settings files)
  • Test directories

Step 2: Security scan

Search for these patterns across the codebase:

CRITICAL / HIGH:

  • Auth bypass flags or backdoors (bypass, skip_auth, admin.*true, debug.*mode.*prod)
  • Hardcoded secrets, API keys, passwords (password\s*=, secret\s*=, api_key\s*=, token\s*= with actual values)
  • SQL injection vectors (string concatenation in queries, f-strings in SQL)
  • Command injection (exec(, eval(, child_process.exec with user input)
  • Unauthenticated endpoints that should require auth
  • Deprecated crypto (MD5, SHA1 for authentication/signing, DES)
  • Permissive CORS (Access-Control-Allow-Origin: * on authenticated endpoints)
  • Missing rate limiting on auth endpoints

MEDIUM:

  • Secrets in example/template files (.env.example with real values)
  • Hidden feature flags (DARK_LAUNCH, FEATURE_FLAG, BETA)
  • Overly permissive file permissions in scripts
  • Missing input validation on user-facing endpoints
  • Unencrypted sensitive data in logs

LOW / INFO:

  • Dead routes (defined but no callers)
  • Unused exports/functions (exported but never imported elsewhere)
  • TODO/HACK/FIXME comments that indicate known issues
  • Commented-out code blocks (>10 lines)
  • Stale dependencies (check for known-vulnerable versions if lockfile exists)

FUN:

  • Easter eggs, hidden messages, joke comments
  • Unusual file names or directories

Step 3: Dead code detection

Search for:

  • Exported functions/classes never imported by other files
  • Route handlers with no corresponding client calls (if both client and server are in repo)
  • Config values defined but never read
  • Test files for deleted source files

Step 4: Compile report

Output findings in this format:

TREASURES — [project-name] — [N] findings

CRITICAL ([count])
  * [file:line] [description]
    Evidence: [the matching code or pattern]
    Risk: [what could go wrong]

HIGH ([count])
  * [file:line] [description]
    ...

MEDIUM ([count])
  ...

LOW ([count])
  ...

INFO ([count])
  ...

FUN ([count])
  ...

SUMMARY: [1-2 sentence overall assessment]

Step 5: Offer next steps

After the report, offer:

  • "Fix critical/high issues now" — walk through fixes one at a time
  • "Create GitHub issues for HIGH+" — generate issue descriptions (if gh CLI available)
  • "Re-scan [specific area]" — deeper dive into a flagged area

Error Handling

  1. No source code found: Report "No scannable source files found in [path]. Is this the right directory?"
  2. Scope argument doesn't exist: Report "Directory $ARGUMENTS not found. Available top-level directories: [list]"
  3. Very large project (>1000 files): Scan top-level structure first, then focus on the most likely areas (auth, API, config, database)

Examples

Example 1: Full project scan

Input: /code-security Process: Scans entire project, finds 3 HIGH issues in auth module, 2 MEDIUM in config, 1 FUN easter egg Output: Severity-ranked report with file:line references

Example 2: Scoped scan

Input: /code-security src/auth/ Process: Deep scan of auth directory only Output: Focused report on auth-related findings

Example 3: Clean project

Input: /code-security Output: "TREASURES — acme-api — 0 critical/high findings. 2 LOW items (stale TODOs). Looking solid."

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.