agentleFS
jalbarrangjalbarrang/skills/code-reviewer/SKILL.md

code-reviewer

Skill2 starsChanged 3 months agoMITView on GitHub

Bug-focused code review driven by a per-project review context and optional multi-lens criteria. Requires one-time setup via init - all other commands hard-fail without it. Resolves a git diff target, loads lenses, runs a context-aware discovery pass and a skeptical verifier, then reports findings in severity tiers. Use when reviewing pull requests, branch diffs, uncommitted changes, or when the user asks for a bug-focused code review. Sub-commands - init, review, learn, status.

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

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

  • 0

    Common

    Most of the 155 edited versions we read keep these.

  • 0

    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. Very specific:

    Read .code-reviewer/context.md in the project root.

    line 17
  2. Very specific:

    When context.md says a pattern is intentional, the verifier must honor it — do not re-flag suppressed patterns.

    line 56
  3. Very specific:

    After a review, if the user says a finding was wrong (false positive) or names a bug you missed, offer /code-reviewer learn so the lesson …

    line 57

“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

A bug-focused review workflow whose signal comes from a per-project review context (.code-reviewer/context.md) plus optional lenses (.code-review/lenses/*.md). The context carries invariants, intentional patterns, and failure classes; lenses add criteria-specific evaluation. The context is mandatory: without it every command except init refuses to run — a generic review is worse than no review, because its findings look authoritative while carrying no project signal.

The context file is maintained by the anti-rot principle: durable invariants, one owner per fact, every line changes a review decision, and a learn loop that folds each miss back in. See references/CONTEXT-TEMPLATE.md for the shape.

Setup (run before any command)

  1. Read .code-reviewer/context.md in the project root.
    • Present → treat its invariants, intentional patterns, and severity calibration as authoritative.
    • Missing or unreadable → hard fail for every command except init. Do NOT auto-generate context, do NOT run a degraded review. Stop and tell the user: "code-reviewer is not initialized for this project — run /code-reviewer init first." (status may additionally report that nothing else is configured, then stop.)
  2. Parse the first argument word to pick a command (routing below). Everything after the command name is the target/argument.

Commands

CommandDescriptionReference
initInterview + codebase scan → write .code-reviewer/context.mdreferences/init.md
review [target]Resolve diff → load lenses → review → tiered findingsreferences/review.md
learn [note]Fold a false positive or a missed bug into the context (anti-rot)references/learn.md
statusReport what review context exists and whether it is stalereferences/status.md

Routing rules

  1. First word is init / review / learn / status → read that command's reference file and follow it. This is non-optional; the reference owns the flow.
  2. First word doesn't match a command → treat the entire argument as a review target (e.g. /code-reviewer src/auth → review scoped to src/auth). Load references/review.md.
  3. No argument → run review against the default target (uncommitted changes via scripts/target.mjs). (If context is missing this already hard-failed in Setup.)

Review mechanics (scripts)

Scripts are Node ≥ 20 ESM, invoked as node <skill-dir>/scripts/<name>.mjs from the project under review.

ScriptRole
scripts/target.mjsResolve git diff (--uncommitted default, --branch <base>, --commit <sha>), write full diff + file list to a temp file, print path + stat digest
scripts/lenses.mjsDiscover .code-review.json + .code-review/lenses/*.md, print applicable lens instructions (or a no-lenses example)

Severity / finding format conventions: references/severity.md.

Packaged lenses

The skill ships a lens catalog in <skill-dir>/lenses/ (clean-code, ddd, security, concurrency, api-compat). None are active by default — init offers them as a multi-select and copies the chosen ones into the project's .code-review/lenses/, recording them in .code-review.json defaultLenses. Copies are project-owned: users edit them freely and they are never auto-synced with the catalog. Hand-written custom lenses in the same directory are discovered identically. The review core stays methodology-neutral — with zero lenses selected, review is pure context-driven bug hunting.

Operating rules

  • Prioritize correctness and reliability bugs. Exclude style, naming, formatting, comments, docs, and optional refactors that are not bugs.
  • Be explicit and evidence-driven. Every finding cites file, line range, and a traceable reason.
  • When context.md says a pattern is intentional, the verifier must honor it — do not re-flag suppressed patterns.
  • After a review, if the user says a finding was wrong (false positive) or names a bug you missed, offer /code-reviewer learn so the lesson sticks.

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.