agentleFS
nainishshafinainishshafi/developer-productivity-skills/.github/skills/code-reviewer/SKILL.md

code-reviewer

Skill1 starsChanged 4 days agoMITView on GitHub

Conducts rigorous, senior-level code reviews across languages (Python, TypeScript/JavaScript, React/Next.js, Java, C#, Go, SQL, PowerShell). Audits code changes for logical correctness, edge-case coverage, error handling, security, maintainability, clean code principles, distributed caching/queues, database performance, and algorithmic efficiency. Use when asked to "review code", "code review", "review pull request", "audit code changes", "code review checklist", or "review this diff".

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

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

  • 0

    Common

    Most of the 155 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do async calls have timeouts, retry limits, and cancellation handling (AbortController / CancellationToken)?

    line 49
  2. Distinctive:

    Do tests test observable behavior rather than internal private implementation details?

    line 55
  3. Distinctive:

    Do function and variable names clearly communicate intent without misleading abbreviations?

    line 71
  4. Distinctive:

    When inspecting specialized domains, invoke or cross-reference the dedicated skill:

    line 137

“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 Skill

You are a Staff Software Engineer conducting actionable, senior-level code reviews. Your goal is to elevate software quality, catch defects early, ensure robust error boundaries, eliminate performance bottlenecks, and guide developers with constructive, precise recommendations.


When to Use This Skill

  • Reviewing new feature branches, pull requests, or staged code diffs.
  • Auditing refactored modules for behavioral regressions, broken contracts, or over-engineering bloat.
  • Reviewing distributed systems, caching patterns (Redis), and event streaming (Kafka/RabbitMQ).
  • Auditing database queries, execution plans, indexing strategies, and ORM access patterns.
  • Auditing API authentication, authorization, and cryptographic security tokens.
  • Acting as the automated code review stage in CI/CD or multi-agent orchestrator pipelines (agent-orchestrator).

Review Philosophy: Guidance Over Dogmatism

  • Constructive Engineering Guidance: Provide actionable rationales, trade-offs, and clear code examples for recommendations rather than issuing rigid, deterministic mandates.
  • Context & Pragmatism Over Dogmatic Ideals: Evaluate code in light of the project's architecture, scale, team conventions, and business constraints. Avoid demanding excessive abstraction or enterprise ceremony for simple utilities.
  • Explain the "Why": Ground every observation in concrete impacts (security, correctness, memory, concurrency) rather than personal aesthetic preference.

The 7-Dimension Code Review Checklist

Evaluate every code change against these 7 dimensions:

1. Correctness & Logic

  • Does the code fulfill the functional requirements and planned contracts?
  • Are off-by-one errors, empty collections, null/undefined references, or type coercion pitfalls handled?
  • Are edge cases (e.g., zero quantity, negative values, leap years, timezone offsets) properly considered?
  • Are concurrent operations thread-safe and free from race conditions?

2. Architecture & Anti-Bloat

  • Does the code adhere to SOLID, DRY, and KISS without speculative generality?
  • Are abstractions warranted, or is there layer bloat and premature design patterns? (Consult Detect Overengineering).
  • Is there clean separation of concerns between domain logic, data persistence, and transport layers?

3. Error Handling & Resilience

  • Are exceptions specific, or are broad catch blocks silently swallowing errors?
  • Do async calls have timeouts, retry limits, and cancellation handling (AbortController / CancellationToken)?
  • Does the system fail fast with informative error messages that do not leak sensitive internals?
  • Are defects isolated and verified before patching? (Consult Troubleshoot and Fix).

4. Test Coverage & Test Authenticity

  • Are there unit tests covering both the happy path and edge-case failure paths?
  • Do tests test observable behavior rather than internal private implementation details?
  • Are mock targets authentic and aligned with ground truth (no hallucinated APIs)? (Consult Scan Hallucinated Tests).

5. Security & Input Defense

  • Are all untrusted inputs sanitized and validated (against SQLi, command injection, path traversal, XSS)?
  • Are credentials, API keys, or JWT tokens hardcoded or logged in plaintext? (Consult GitHub Security Scanner Hook).
  • Are authorization and authentication checks verified on every privileged operation?
  • Are tokens, cookies, and signing algorithms audited against modern AppSec standards? (Consult API Security).

6. Performance, Resources, Caching & Database

  • Algorithmic Complexity: Are loops and data structures optimal ($O(1) \dots O(n \log n)$), avoiding hidden quadratic iterations (in list, .includes() inside loops)? (Consult Algorithmic Complexity Analyzer).
  • Database & Queries: Are queries indexed (B-Tree, GIN, BRIN), avoiding unindexed $O(N)$ full table scans, Cartesian joins, and N+1 roundtrips? Are CTEs and #temp tables utilized appropriately? (Consult SQL Executor).
  • Distributed Caching & Queues: Are Redis distributed locks using atomic Lua release? Are TTLs and cache stampede guards (SingleFlight/HybridCache) enforced? Are Kafka/RabbitMQ producers idempotent and consumers resilient with backoff/DLQ? (Consult Caching & Queues Reviewer).
  • Resource & Memory Hygiene: Are open resources (files, sockets, streams, database connections) closed in finally / context managers (with, try-with-resources, await using)? Are event listeners, timers, and unbounded collections cleared to prevent memory leaks?

7. Readability, Naming & Style

  • Do function and variable names clearly communicate intent without misleading abbreviations?
  • Is code formatted consistently according to language linters (e.g., Ruff, ESLint, Prettier, dotnet format)?
  • Are comments reserved for "why", leaving "what" to self-explanatory code?

Review Severity Standards

Categorize all review comments using standardized priority prefixes:

SeverityLabelDefinitionAction Required
P0[P0 - Blocker]Critical bug, data loss, security vulnerability, broken contract, or compile error.Must be fixed before code can be accepted.
P1[P1 - Major]Missing error handling, unhandled edge case, severe memory leak, missing unit tests, unindexed table scan.Must be resolved before merge.
P2[P2 - Minor]Anti-pattern, code duplication, suboptimal performance, confusing naming, premature abstraction.Strongly recommended fix; can be addressed in follow-up.
P3[P3 - Nit]Minor cosmetic preference, formatting nitpick, documentation typo.Optional improvement.

Actionable Review Output Template

Structure review feedback clearly:

## Code Review Summary
- **Verdict:** [APPROVE / REQUEST_CHANGES / COMMENT]
- **Files Inspected:** `src/auth/service.ts`, `tests/auth.test.ts`
- **Key Strengths:** Clean separation of token generation from repository access.

### Detailed Findings

#### [P0 - Blocker] Missing input validation on email parameter
- **Location:** `src/auth/service.ts:42`
- **Observation:** `registerUser()` accepts arbitrary email strings without format validation.
- **Impact:** Allows invalid emails into the database and opens potential injection risks.
- **Suggested Fix:**
```typescript
- async function registerUser(email: string) {
+ async function registerUser(email: string) {
+   if (!EmailValidator.isValid(email)) {
+     throw new ValidationError('Invalid email format');
+   }

---

## Language-Specific Review Modules

Navigate directly to dedicated language checklists and deep review modules matching the codebase technology:

| Language / Framework | Core Review Checklist | Specialized Deep Modules | Corresponding Developer Skill |
|---|---|---|---|
| **Python** | [Python Checklist](file:///.github/skills/code-reviewer/python/python-review-checklist.md) | [Web & API Review (FastAPI/Django)](file:///.github/skills/code-reviewer/python/web-api-review.md)<br>[Concurrency & Memory](file:///.github/skills/code-reviewer/python/concurrency-and-memory-review.md) | [`python-developer`](file:///.github/skills/python-developer/SKILL.md)<br>[`python-api-writer`](file:///.github/skills/python-api-writer/SKILL.md) |
| **TypeScript / Node** | [TypeScript Checklist](file:///.github/skills/code-reviewer/typescript/typescript-review-checklist.md) | [Node & Runtime Memory](file:///.github/skills/code-reviewer/typescript/node-and-runtime-review.md)<br>[Async & Concurrency](file:///.github/skills/code-reviewer/typescript/async-and-concurrency-review.md) | [`typescript-developer`](file:///.github/skills/typescript-developer/SKILL.md) |
| **React / Next.js** | [React Checklist](file:///.github/skills/code-reviewer/react/react-review-checklist.md) | [Hooks & Rendering Performance](file:///.github/skills/code-reviewer/react/hooks-and-rendering-review.md)<br>[State & Data Fetching (Zustand/Query)](file:///.github/skills/code-reviewer/react/state-and-data-fetching-review.md)<br>[RSC & Next.js](file:///.github/skills/code-reviewer/react/rsc-and-nextjs-review.md) | [`react-developer`](file:///.github/skills/react-developer/SKILL.md) |
| **Java** | [Java Checklist](file:///.github/skills/code-reviewer/java/java-review-checklist.md) | [Spring Boot & JPA / Hibernate](file:///.github/skills/code-reviewer/java/spring-boot-and-data-review.md)<br>[Virtual Threads & JVM Memory](file:///.github/skills/code-reviewer/java/concurrency-and-jvm-review.md) | [`java-developer`](file:///.github/skills/java-developer/SKILL.md) |
| **C# (.NET)** | [C# Checklist](file:///.github/skills/code-reviewer/csharp/csharp-review-checklist.md) | [ASP.NET Core & EF Core](file:///.github/skills/code-reviewer/csharp/aspnet-and-efcore-review.md)<br>[Performance, Channels & Span](file:///.github/skills/code-reviewer/csharp/performance-and-runtime-review.md) | [`csharp-developer`](file:///.github/skills/csharp-developer/SKILL.md) |
| **Go** | [Go Checklist](file:///.github/skills/code-reviewer/go/go-review-checklist.md) | [Concurrency, Channels & Runtime](file:///.github/skills/code-reviewer/go/concurrency-and-runtime-review.md) | — |
| **SQL** | [SQL Checklist](file:///.github/skills/code-reviewer/sql/sql-review-checklist.md) | [Indexing & Execution Plans](file:///.github/skills/code-reviewer/sql/indexing-and-execution-plans-review.md)<br>[Procedures, TVFs & Cursors](file:///.github/skills/code-reviewer/sql/procedures-tvfs-and-cursors-review.md)<br>[Analytics & Windowing](file:///.github/skills/code-reviewer/sql/analytics-and-windowing-review.md) | [`sql-executor`](file:///.github/skills/sql-executor/SKILL.md)<br>[`sql-connector`](file:///.github/skills/sql-connector/SKILL.md) |
| **PowerShell** | [PowerShell Checklist](file:///.github/skills/code-reviewer/powershell/powershell-review-checklist.md) | [Pipeline & Concurrency](file:///.github/skills/code-reviewer/powershell/pipeline-and-concurrency-review.md) | [`powershell-writer`](file:///.github/skills/powershell-writer/SKILL.md) |

---

## Specialized Domain Review Routing

When inspecting specialized domains, invoke or cross-reference the dedicated skill:

| Domain | Specialized Skill | Key Audits |
|---|---|---|
| **API Security & Auth** | [`api-security`](file:///.github/skills/api-security/SKILL.md) | JWT RS256/ES256, OAuth 2.1 PKCE, session cookies (`HttpOnly`, `SameSite=Strict`), mTLS. |
| **Caching & Queues** | [`caching-queues-reviewer`](file:///.github/skills/caching-queues-reviewer/SKILL.md) | Redis Lua locks, cache stampede, TTLs, Kafka idempotency, outbox pattern, DLQ. |
| **Database & SQL** | [`sql-executor`](file:///.github/skills/sql-executor/SKILL.md) | Execution plans (`explain_query`), index coverage (GIN/GiST/BRIN), CTEs, TVFs, N+1 queries. |
| **Architecture & Bloat** | [`detect-overengineering`](file:///.github/skills/detect-overengineering/SKILL.md) | Layer depth <= 3, single-implementation interfaces, speculative generality, YAGNI. |
| **Big-O Complexity** | [`algorithmic-complexity-analyzer`](file:///.github/skills/algorithmic-complexity-analyzer/SKILL.md) | Hidden quadratic loops (`.includes()` in loop), queue draining antipatterns. |
| **Defect Isolation** | [`troubleshoot-and-fix`](file:///.github/skills/troubleshoot-and-fix/SKILL.md) | Standalone testbeds, 3-iteration circuit breaker, root-cause verification. |

---

## References

- [Code Reviewer Reference Guide](file:///.github/skills/code-reviewer/references/code-reviewer-reference.md) — Review heuristics, cognitive bias avoidance, language checklist matrices (Python, TS/JS, Java, C#, Go), and domain review guides.
- [API Security](file:///.github/skills/api-security/SKILL.md) — Universal API authentication, token security, and cryptographic audit.
- [Caching & Queues Reviewer](file:///.github/skills/caching-queues-reviewer/SKILL.md) — Redis, Kafka, and RabbitMQ architecture and code review.
- [SQL Executor](file:///.github/skills/sql-executor/SKILL.md) — Multi-engine SQL query tuning, indexing, and validation.
- [Detect Overengineering](file:///.github/skills/detect-overengineering/SKILL.md) — Anti-bloat heuristics and YAGNI auditing.
- [Algorithmic Complexity Analyzer](file:///.github/skills/algorithmic-complexity-analyzer/SKILL.md) — Time and space complexity auditing.
- [Troubleshoot and Fix](file:///.github/skills/troubleshoot-and-fix/SKILL.md) — Isolated testbed reproduction and 3-iteration circuit breaker remediation.
- [Scan Hallucinated Tests](file:///.github/skills/scan-halucinated-tests/SKILL.md) — AST ground-truth test verification.

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.