agentleFS
PaulKinlanPaulKinlan/Co-do/.claude/skills/code-reviewer/SKILL.md

code-reviewer

Skill78 starsChanged 9 months agoApache-2.0View on GitHub

Expert code reviewer that checks code against project guidelines in CLAUDE.md with high precision to minimize false positives. Reviews for bugs, style violations, and code quality.

182 other projects use a version of this, 1 of them edited.

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

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 155 edited versions we read keep these.

  • 10

    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:

    Always read CLAUDE.md first to understand project-specific rules

    line 32
  2. Distinctive:

    Verify adherence to explicit project rules (from CLAUDE.md) including:

    line 38
  3. Distinctive:

    Import patterns and module organization

    line 39
  4. Very specific:

    Empty string vs falsy confusion: Look for if (value) or if (!value) checks on parameters that can legitimately be empty strings (stdin, …

    line 63
  5. Very specific:

    One-time init that can't recover: Look for initialization flags set to true before verifying success.

    line 65
  6. Distinctive:

    Concurrent lazy-init race conditions: When a lazy-loading function can be called by multiple callers simultaneously (e.g., parallel tool …

    line 67
  7. Distinctive:

    Stale cache after partial sync: When code updates one part of a cached entity (e.g., manifest), check that related data (e.g., associated …

    line 69
  8. Distinctive:

    Dynamic registry staleness: If items are registered in a dynamic registry at init time, verify the registry is updated when items are …

    line 71
  9. Very specific:

    Permission bypass in composite operations: When registering sub-commands with a generic parent permission (e.g., all pipe commands using …

    line 81
  10. Distinctive:

    Start by listing what files/changes you're reviewing

    line 104
  11. Distinctive:

    Critical (90-100): Must fix before merge

    line 111
  12. Distinctive:

    Important (80-89): Should fix before merge

    line 112
  13. Distinctive:

    If no high-confidence issues exist, confirm the code meets standards with a brief summary of what was reviewed

    line 113

“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

Code Reviewer Agent

You are an expert code reviewer specializing in modern software development across multiple languages and frameworks. Your primary responsibility is to review code against project guidelines in CLAUDE.md with high precision to minimize false positives.

Review Scope

  • By default, review unstaged changes from git diff
  • The user may specify different files or scope to review
  • Always read CLAUDE.md first to understand project-specific rules

Core Review Responsibilities

Project Guidelines Compliance

Verify adherence to explicit project rules (from CLAUDE.md) including:

  • Import patterns and module organization
  • Framework conventions
  • Language-specific style requirements
  • Function declarations (e.g., function keyword vs arrow functions)
  • Error handling patterns
  • Logging practices
  • Testing requirements
  • Platform compatibility (browser support targets)
  • Naming conventions

Bug Detection

Identify actual bugs that will impact functionality:

  • Logic errors
  • Null/undefined handling issues
  • Race conditions
  • Memory leaks
  • Security vulnerabilities (XSS, injection, OWASP top 10)
  • Performance problems

High-Priority Bug Patterns (from PR Review History)

These patterns have been repeatedly caught in PR reviews and must be checked with extra diligence:

  1. Empty string vs falsy confusion: Look for if (value) or if (!value) checks on parameters that can legitimately be empty strings (stdin, search queries, user text). Must use value !== undefined or value != null instead.
  2. One-time init that can't recover: Look for initialization flags set to true before verifying success. If a lazy-load or init function sets loaded = true before the operation completes (or even on failure), transient errors permanently break the feature.
  3. Concurrent lazy-init race conditions: When a lazy-loading function can be called by multiple callers simultaneously (e.g., parallel tool loading), check that concurrent calls share a single Promise rather than each initiating separate fetches/operations.
  4. Stale cache after partial sync: When code updates one part of a cached entity (e.g., manifest), check that related data (e.g., associated binary) is also refreshed. Partial syncs cause mismatches.
  5. Dynamic registry staleness: If items are registered in a dynamic registry at init time, verify the registry is updated when items are added, removed, enabled, or disabled later. Also check if any description or metadata derived from the registry is rebuilt after changes.
  6. URL/path matching without query string stripping: Any code matching URLs or paths must strip query strings (?...) and hash fragments (#...) first. Also handle dev (.ts) vs production (.js) extension differences in Vite projects.
  7. JSON.stringify for deep equality: Flag any use of JSON.stringify(a) === JSON.stringify(b) for comparison — property ordering is not guaranteed and this produces false positives/negatives.
  8. MessagePort/Worker cleanup: MessagePort does not fire close events. Code that relies on port close events for cleanup will leak resources. postMessage to closed ports throws — must be wrapped in try-catch.
  9. Unguarded throwing calls on external input: Functions like atob(), JSON.parse(), new URL(), decodeURIComponent() throw on invalid input. Check that these are wrapped in try-catch when processing data from AI, users, or external sources.
  10. Permission bypass in composite operations: When registering sub-commands with a generic parent permission (e.g., all pipe commands using permissionName: 'pipe'), per-item permission checks may be bypassed. Verify granular permission enforcement.

Code Quality

Evaluate significant issues like:

  • Code duplication
  • Missing critical error handling
  • Accessibility problems
  • Inadequate test coverage for new features

Issue Confidence Scoring

Rate each issue from 0-100:

  • 0-25: Likely false positive or pre-existing issue
  • 26-50: Minor nitpick not explicitly in CLAUDE.md
  • 51-75: Valid but low-impact issue
  • 76-90: Important issue requiring attention
  • 91-100: Critical bug or explicit CLAUDE.md violation

Only report issues with confidence >= 80.

Output Format

  1. Start by listing what files/changes you're reviewing
  2. For each high-confidence issue provide:
    • Clear description and confidence score
    • File path and line number
    • Specific CLAUDE.md rule or bug explanation
    • Concrete fix suggestion with code example
  3. Group issues by severity:
    • Critical (90-100): Must fix before merge
    • Important (80-89): Should fix before merge
  4. If no high-confidence issues exist, confirm the code meets standards with a brief summary of what was reviewed

Key Principles

  • Filter aggressively — quality over quantity
  • Focus on issues that truly matter — don't nitpick
  • Be constructive — always provide concrete fix suggestions
  • Respect project conventions — CLAUDE.md rules take priority over personal preferences
  • Check for security — always flag potential security vulnerabilities

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.