agentleFS
jamestorrevillasjamestorrevillas/dev-skills/.github/skills/code-review/SKILL.md

code-review

Skill4 starsChanged 9 months agoMITView on GitHub

Use this skill when performing code reviews, security audits, architecture reviews, vulnerability analysis, or evaluating code quality. Trigger on keywords: code review, review, audit, security, vulnerability, OWASP, SQL injection, XSS, architecture review, refactor suggestion, quality check, static analysis.

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use close-spec, design-with-images 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.
  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 5 projects that use this

  • dzhngSkill

    design-with-images

    Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.

    Also in 5 projects that use this

  • PydanticSkill

    add-new-model

    Add support for a newly-released language or image generation model in pydantic-ai (e.g. openai:gpt-5.6, anthropic:claude-sonnet-5, openai:gpt-image-2). Use when a provider ships a new model id and you need to wire literals, profile flags, adapters, and tests to recognize it. Handles SDK-lag, gateway list conventions, capability probing, and direct image-model geometry. Also use when Anthropic, OpenAI or Google deprecates or retires a model, to update the deprecation tables.

    Also in 10 projects that use this

  • Microsoft AzureSkill

    azsdk-common-apiview-feedback-resolution

    Analyze and resolve APIView review feedback on Azure SDK PRs. **UTILITY SKILL**. USE FOR: APIView comments, API review feedback, SDK API surface changes. DO NOT USE FOR: general code review, non-APIView feedback. INVOKES: azure-sdk-mcp:azsdk_apiview_get_comments, azure-sdk-mcp:azsdk_customized_code_update, azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback, azure-sdk-mcp:azsdk_run_typespec_validation, azure-sdk-mcp:azsdk_package_generate_code.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    azsdk-common-generate-sdk-locally

    Generate and finalize Azure SDKs locally from TypeSpec, including build, checks, tests, changelog, metadata, and version updates by default. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "resolve SDK generation errors", "customize TypeSpec", "rename SDK client", "rename SDK model", "hide operation from SDK", "fix analyzer errors", "resolve customization drift", "create subclient", "update metadata", "update version". INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version.

    Also in 6 projects that use this

  • +4 more from dzhng
  • +3 more from Azure

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 186 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always tag review comments to set expectations:

    line 16
  2. Distinctive:

    When reviewing architectural decisions:

    line 95
  3. Distinctive:

    Run through this before requesting review:

    line 137

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

Review Philosophy

Review the code, not the person. The goal is to ship better software, not to win arguments. Every comment should make the codebase better or help the author learn — preferably both.


Feedback Categories

Always tag review comments to set expectations:

TagMeaningMust Fix?
BLOCKERBreaks functionality, security risk, violates standardsYes
WARNINGTechnical debt, potential issue, should be addressedRecommended
SUGGESTIONOptional improvement, alternative approachNo
QUESTIONAsking for clarification or understandingNo
NITPICKMinor style or preferenceAuthor decides
PRAISEAcknowledge good workN/A

Code Quality Checklist

Correctness

  • Does the code do what the ticket/story requires?
  • Are edge cases handled? (null, empty, boundary values)
  • Is error handling present and meaningful?
  • Are async operations awaited properly?
  • Are there any obvious race conditions?

Readability

  • Are variable and function names descriptive?
  • Is the code self-documenting (minimal need for comments)?
  • Are complex sections commented with the "why"?
  • Is there dead code or commented-out code that should be removed?
  • Is function length reasonable (< 40 lines as a guideline)?

Architecture

  • Does this follow the existing patterns in the codebase?
  • Is there unnecessary coupling between modules?
  • Is the change in the right layer (controller vs service vs repository)?
  • Would this be hard to test? (if yes, it needs refactoring)
  • Is this solving the right problem at the right level?

Performance

  • Are there N+1 query problems (loops that trigger individual DB queries)?
  • Are expensive operations cached where appropriate?
  • Is pagination implemented for list endpoints?
  • Are there unnecessary re-renders (frontend)?

Tests

  • Are tests included for new behavior?
  • Do tests cover the happy path AND error paths?
  • Are tests testing behavior, not implementation details?

Security Review (OWASP Top 10)

Apply a security persona when reviewing code that touches auth, data access, or user input.

Input Validation

  • Is all user input validated and sanitized before use?
  • Are parameterized queries / ORMs used? (never raw string concatenation in SQL)
  • Is output encoded before rendering to prevent XSS?

Authentication & Authorization

  • Are protected endpoints properly authenticated?
  • Is authorization checked at the right level (not just frontend)?
  • Are JWTs validated properly (signature, expiry, issuer)?
  • Is there rate limiting on auth endpoints?

Sensitive Data

  • Are secrets/credentials in environment variables, not hardcoded?
  • Is sensitive data (passwords, tokens) hashed or encrypted at rest?
  • Is sensitive data excluded from logs?
  • Does the API return only the data the client needs (no over-fetching)?

Dependencies

  • Are new dependencies well-maintained and trusted?
  • Is the dependency necessary, or can it be avoided?
  • Are there known vulnerabilities in the added version?

Architecture Review

When reviewing architectural decisions:

Questions to Ask

  1. Scalability — Will this work at 10x current load?
  2. Maintainability — Will a new developer understand this in 6 months?
  3. Testability — Can this be unit tested without complex setup?
  4. Reversibility — How hard is it to undo this decision?
  5. Consistency — Does this align with how the rest of the system works?

Red Flags

  • God classes / functions (doing too many things)
  • Deep inheritance hierarchies
  • Hardcoded configuration values
  • Direct cross-module database access
  • Synchronous calls to external services without timeout/retry
  • Missing abstractions that make testing impossible

Review Comment Examples

Good Comment (Specific + Constructive)

BLOCKER: This SQL query is vulnerable to injection. User input is concatenated 
directly into the query string. Use parameterized queries instead:

// Instead of:
db.query(`SELECT * FROM users WHERE id = ${userId}`)

// Use:
db.query('SELECT * FROM users WHERE id = $1', [userId])

Bad Comment (Vague + Unhelpful)

This doesn't look right.

Self-Review Checklist (Before Submitting a PR)

Run through this before requesting review:

  • I've reviewed my own diff line by line
  • Tests are passing locally
  • No debug logs or commented-out code left in
  • No hardcoded secrets or environment-specific values
  • PR description clearly explains what, why, and how
  • Scope is focused — no unrelated changes snuck in

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.