agentleFS
YehudaFrankelYehudaFrankel/clankbrain/.claude/skills/code-reviewer/SKILL.md

code-reviewer

Skill16 starsChanged 7 months agoMITView on GitHub

Language-agnostic code review. Checks correctness, security, and consistency with project conventions. Triggers on "review this", "review [file]", "check this code", "code review".

182 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-doc-updater, git-precommit and 10 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.
  • u9401066Skill

    git-doc-updater

    Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.

    Also in 5 projects that use this

  • u9401066Skill

    git-precommit

    Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.

    Also in 5 projects that use this

  • JeffallanSkill

    shopify-expert

    Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or custom React storefronts, developing Shopify apps, implementing checkout UI extensions or Shopify Functions, optimizing performance, or integrating third-party services. Invoke for Liquid templating, Storefront API, app development, checkout customization, Shopify Plus features, App Bridge, Polaris, or Shopify CLI workflows.

    Also in 5 projects that use this

  • JeffallanSkill

    spec-miner

    Reverse-engineering specialist that extracts specifications from existing codebases. Use when working with legacy or undocumented systems, inherited projects, or old codebases with no documentation. Invoke to map code dependencies, generate API documentation from source, identify undocumented business logic, figure out what code does, or create architecture documentation from implementation. Trigger phrases: reverse engineer, old codebase, no docs, no documentation, figure out how this works, inherited project, legacy analysis, code archaeology, undocumented features.

    Also in 6 projects that use this

  • +4 more from u9401066
  • +4 more from Jeffallan

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 155 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check for each of these files and read them if they exist:

    line 17
  2. Very specific:

    Add each one as a custom checklist item under a ### Project Lessons section

    line 21
  3. Distinctive:

    Add violations of these as automatic failures regardless of the standard checklist

    line 26
  4. Distinctive:

    Read the detected stack — use it to enable the right checklist sections:

    line 29
  5. Very specific:

    If none of these files exist yet: skip Step 0, run the standard checklist only, and note at the top: No project context loaded — running …

    line 36
  6. Distinctive:

    Read the file(s) being reviewed in full.

    line 42
  7. Distinctive:

    Run every applicable section.

    line 48
  8. Distinctive:

    If no project context exists yet, say so at the top — don't silently skip it

    line 131
  9. Very specific:

    After finding a new pattern, suggest adding it to lessons.md via /learn

    line 132

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

Skill: code-reviewer

Trigger: "review this" · "review [file]" · "check this code" · "code review"


Steps

Step 0 — Load project context (before looking at any code)

Check for each of these files and read them if they exist:

memory/lessons.md

  • Extract any lines flagged as mistakes, anti-patterns, or corrections
  • Add each one as a custom checklist item under a ### Project Lessons section
  • Example: "never use addRow on IDENTITY tables" → becomes a checklist item

memory/decisions.md

  • Extract locked architectural decisions the code must follow
  • Add violations of these as automatic failures regardless of the standard checklist

memory/complexity_profile.md (written by map-codebase)

  • Read the detected stack — use it to enable the right checklist sections:
    • SQL / ORM detected → enable Data Layer section
    • Auth middleware detected → enable API / Endpoints section
    • Frontend JS detected → enable JS Patterns section
    • Python detected → enable Python Patterns section
    • Java detected → enable Java Patterns section

If none of these files exist yet: skip Step 0, run the standard checklist only, and note at the top: No project context loaded — running generic checklist. Run map-codebase and a session to sharpen this.


Step 1 — Read the file(s)

Read the file(s) being reviewed in full. If a file is too large, grep for the patterns most likely to fail first.


Step 2 — Run checklist

Run every applicable section. Report every issue with file + line number. Report clean sections explicitly — never skip them silently.


Standard Checklist

Security

  • No SQL / command injection — user input is quoted or parameterized before DB/shell use
  • No secrets or API keys hardcoded
  • Auth checks present on protected routes/endpoints
  • User input validated at system boundaries (not trusted internally)

Correctness

  • Null / undefined / empty checks before dereferencing
  • Array bounds safe — no off-by-one
  • Error paths return or throw — never fall through silently
  • Async operations awaited or .then()-chained correctly (JS) / try-catch present (Java/Python)

Data Layer (enabled if SQL/ORM detected)

  • No SELECT * — explicit column list
  • Single-row queries check for results before accessing
  • Loop queries don't issue N+1 DB calls — pre-load with a map if needed
  • INSERT/UPDATE includes required audit fields (created_at, created_by, org/tenant id)

API / Endpoints (enabled if auth/routing detected)

  • Public endpoints registered correctly (auth-bypass list if applicable)
  • Both success and error paths return a valid response
  • Error messages don't expose stack traces or internal details
  • Response shape matches what the frontend expects

JS Patterns (enabled if frontend JS detected)

  • No var in module scope leaking globals unintentionally
  • DOM access uses getElementById / querySelector — not jQuery unless project uses it
  • No inline event handlers in dynamically generated HTML
  • User data escaped before innerHTML — never raw interpolation

Java Patterns (enabled if Java detected)

  • No raw types — generics used properly
  • Resources closed in finally or try-with-resources
  • No swallowed exceptions (catch (Exception e) {})
  • Null checks before dereferencing

Python Patterns (enabled if Python detected)

  • No mutable default arguments (def f(x=[]))
  • with used for file/connection handling
  • No bare except: — always catch specific exceptions

Production Survival (always on — AI-generated code fails here most)

  • Silent error swallowing — catch blocks that return null, log nothing, and send no alert. Failures must surface. return null in a catch is a red flag.
  • Race conditions — concurrent writes to shared state, unguarded async flows, double-submission on payment/booking/signup. Check: can two requests hit this at the same time?
  • Naive retry logic — retries with no backoff (fixed for i < 3 loop). Under load this hammers a degraded API. Requires: exponential backoff + jitter + max delay cap.
  • Missing idempotency — charge/webhook/insert that can run twice and cause a double-charge or duplicate record. Check: is there a uniqueness guard, a processed flag, or an idempotency key?
  • State assumptions — code that assumes clean initial state (empty arrays, zero counters, fresh DB). Production has 3 years of dirty edge cases. Check: what happens if this runs on an existing record?

Code Quality

  • No duplicate logic that already exists elsewhere — reuse helpers
  • No hardcoded values that should be constants or config
  • Exceptions caught and handled — no swallowed errors
  • Resources closed after use

Project Lessons (populated from lessons.md at runtime)

This section is built dynamically from your project's memory. Empty on first session.


Report Format

Context loaded: lessons.md (N patterns), decisions.md (N decisions), stack: [detected]

❌ [file]:[line] — [issue]
   Fix: [specific fix]

✅ [section] — clean

End with: N issues found or Clean — no issues.


Notes

  • Security and correctness first — style is secondary
  • If no project context exists yet, say so at the top — don't silently skip it
  • After finding a new pattern, suggest adding it to lessons.md via /learn

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.