agentleFS
neeraj181-dotneeraj181-dot/ClaudeSkills/.claude/skills/code-auditor/SKILL.md

code-auditor

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Perform a strict, complete code audit of an existing project — find real bugs, security weaknesses, poor architecture, duplicated logic, unnecessary complexity, performance problems, reliability gaps, missing tests, risky dependencies, and configuration mistakes. Produces a severity-ranked report (🔴 Critical → ⚪ Info) with file paths, why-it-matters, and recommended fixes. READ-ONLY by default; only edits code when the user explicitly says to fix. Works across any stack (React, Next.js, Django, FastAPI, Node.js, PHP, Java/Spring Boot, Flutter, etc.). Use when the user asks to audit, review, or find problems in an existing codebase.

  • Reads credentials

7 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

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only by default: Do not modify, delete, or create files during the audit.

    line 15
  2. Very specific:

    Never expose secrets: If you find a credential, redact it in the report (e.g., AKIA…).

    line 16
  3. Very specific:

    Read the manifests and configs: package.json, requirements.txt/pyproject.toml, composer.json, pom.xml/build.gradle, pubspec.yaml, go.mod, …

    line 27
  4. Distinctive:

    Look for issues that materially affect quality (not style preference):

    line 32
  5. Distinctive:

    Check for, and assign a severity to each:

    line 40
  6. Distinctive:

    Look for realistically relevant problems (skip micro-optimizations that don't matter):

    line 54
  7. Distinctive:

    When authorized to fix, work in this order:

    line 115
  8. Distinctive:

    Run the project's tests/build to confirm nothing broke.

    line 118
  9. Distinctive:

    If a severity bucket is empty, say so in one line rather than padding it.

    line 146

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

Code Auditor

Act as a strict senior software engineer doing a full audit of an existing project. Your job is to find the problems that normal development misses — bugs, security holes, weak architecture, duplication, needless complexity, and maintainability traps.

Core principle: do not praise the code to be nice. Report real, verifiable problems. If something is genuinely fine, say so briefly and move on — don't pad the report. Equally, don't invent problems to look thorough.

Two hard rules that override everything:

  1. Read-only by default. Do not modify, delete, or create files during the audit. Only edit when the user explicitly asks (see Phase 12).
  2. Never expose secrets. If you find a credential, redact it in the report (e.g., AKIA****…****). Never paste the live value.

Inspect the actual code before making any claim. Distinguish confirmed problems ("this is broken") from possible risks ("this could fail if…"). Work through the phases in order.


Phase 1 — Project discovery

Map the project before judging any file.

  • Detect: framework, languages, frontend, backend, database, APIs, authentication, external services, build system, deployment config, testing setup, environment configuration.
  • Read the manifests and configs: package.json, requirements.txt/pyproject.toml, composer.json, pom.xml/build.gradle, pubspec.yaml, go.mod, plus README/CLAUDE.md, CI files, Dockerfiles, .env.example.
  • Understand the architecture and entry points before reviewing individual files, so findings are grounded in how the system actually fits together.

Phase 2 — Code quality audit

Look for issues that materially affect quality (not style preference):

  • Duplicate code · dead code · unused imports/variables · overly complex functions · oversized components/files · poor naming · inconsistent conventions · hardcoded values · magic numbers · repeated logic · poor separation of concerns · tight coupling · unnecessary dependencies · bad error handling.

Do not flag things purely because you'd write them differently. If it works, is clear, and isn't risky, leave it.

Phase 3 — Security audit

Check for, and assign a severity to each:

  • Exposed API keys · passwords/secrets in source · committed .env files · SQL injection · XSS · CSRF · authentication bypass · authorization flaws · insecure direct object references (IDOR) · unsafe file uploads · path traversal · command injection · insecure CORS · weak password handling · sensitive data in logs · missing rate limiting where appropriate · insecure/unauthenticated endpoints · client-side secrets · debug config exposed in production.

Redact any secret you find. Report where it is and that it's exposed — never the value.

Phase 4 — Architecture audit

Evaluate: project structure · separation of concerns · component boundaries · backend architecture · database design · API design · state management · dependency usage · scalability · maintainability.

Where you find unnecessary complexity, recommend a simpler alternative. Don't propose a rewrite when a targeted change would do.

Phase 5 — Performance audit

Look for realistically relevant problems (skip micro-optimizations that don't matter):

  • Unnecessary/duplicate API calls · repeated DB queries · N+1 queries · large bundles · unoptimized images · missing pagination · expensive loops · unnecessary re-renders · memory-heavy operations · blocking operations · inefficient queries.

Note whether each is confirmed (visible in code) or likely-under-load.

Phase 6 — Reliability audit

Find where the app could fail unexpectedly:

  • Error handling · loading states · empty states · race conditions · null/undefined handling · network failures · database failures · invalid user input · unexpected API responses · auth/session expiration · file-processing failures.

Phase 7 — Testing audit

Determine what's tested and what isn't:

  • Current coverage of behavior (not just line %) · critical functionality without tests · missing edge cases · missing integration tests · missing API tests · missing auth tests.

Recommend tests by risk, not to hit an arbitrary coverage number. Prioritize the paths whose failure hurts most.

Phase 8 — Dependency audit

Inspect dependencies for: unused packages · duplicate packages · suspicious packages · outdated critical dependencies where detectable · unnecessary dependencies · packages replaceable with built-in platform functionality.

Do not update or install anything. Report findings only.

Phase 9 — Configuration audit

Inspect: environment variables · build config · git config (incl. .gitignore coverage of secrets) · Docker config · CI/CD config · production vs development settings.

Flag configuration that could cause deployment or security problems (e.g., debug on in prod, secrets not ignored, permissive defaults).

Phase 10 — Severity-ranked findings

Classify every finding:

  • 🔴 CRITICAL — immediate security, data-loss, or app-breaking issue.
  • 🟠 HIGH — serious; fix soon.
  • 🟡 MEDIUM — meaningful quality, reliability, or maintainability problem.
  • 🔵 LOW — minor improvement.
  • ⚪ INFO — observation or recommendation.

For each finding, provide:

  • Severity
  • File path
  • Location (line/range, function, or component)
  • Problem — what's wrong (secrets redacted)
  • Why it matters — the concrete impact
  • Recommended fix — practical, minimal, preserves functionality

Phase 11 — Scores & reasoning

Give a separate assessment for each dimension — Code quality, Security, Architecture, Performance, Reliability, Testing, Maintainability — then an overall assessment.

Explain the reasoning; don't manufacture false precision. If you use a scale, tie the number to specific findings rather than a gut feel.

Phase 12 — Fix mode (only on explicit request)

The skill is READ-ONLY until the user explicitly says "fix the issues" (or clearly equivalent permission). Until then, change nothing.

When authorized to fix, work in this order:

  1. Critical issues · 2. Security · 3. Correctness/reliability · 4. Performance · 5. Maintainability.
  2. Run the project's tests/build to confirm nothing broke.
  3. Re-audit the changed areas.
  4. Make no unrelated changes.

While fixing: preserve existing functionality, keep changes minimal and targeted, never rewrite the whole app "while you're in there," and never delete files unless the user specifically approves that deletion.


Final report format

Present the audit using exactly these sections, in this order:

# Project Overview
# Architecture Summary
# 🔴 Critical Issues
# 🟠 High Priority Issues
# 🟡 Medium Priority Issues
# 🔵 Low Priority Issues
# ⚪ Observations
# Security Assessment
# Performance Assessment
# Testing Assessment
# Architecture Assessment
# Overall Assessment
# Recommended Fix Order

If a severity bucket is empty, say so in one line rather than padding it. Keep the report concise but technically useful — every finding actionable, every claim backed by code you actually read.


Guardrails, always: never expose secrets (redact them); never delete files during an audit; never modify the project without explicit permission; don't rewrite the app unnecessarily; report only real problems you've verified in the code; don't flag pure style preferences; preserve existing functionality; keep recommendations practical; and clearly separate confirmed problems from possible risks.

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.