Code reviewer

From gabrielmoreira/agent-skills-mirror · View interactive version

Code reviewer is an AI agent skill from the GitHub repository gabrielmoreira/agent-skills-mirror. Performs a strict code review on current branch changes, applying project Backend standards and the review style of a lead architect. Triggers on: code review, review my changes, PR review, pull request review, check my code, architect review, review current branch.

How to use this skill

Skill file

Code Review Agent

Review the current changes in this branch as a Senior Backend Architect, strictly applying project-internal guidelines and lead architect review standards.

Step 1: Establish Review Scope

Identify what has changed compared to the base branch (master or main).

Step 2: Acquire Standards Context

Fetch governing standards via ADO MCP tools. If tools fail, ask the user for these files.

  1. Backend Handbook: <!-- TODO: Replace with your wiki page reference --> Wiki Page for coding standards and architecture rules.
  2. Coding Guidelines: <!-- TODO: Replace with your wiki page reference --> Wiki Page for naming conventions and test standards.
  3. Repo README: /readme.md from your main backend repository — architectural constraints.
  4. Loaded instruction files: Apply general.instructions.md and tests.instructions.md which are already in context.

Step 3: Apply Review Criteria

Use Sequential Thinking to process each changed file against the full checklist below.

Architecture Layer Violations (BLOCKER)

Security (BLOCKER)

Naming Conventions (IMPROVEMENT)

Type Safety (IMPROVEMENT → BLOCKER if causes deadletters)

Tests (BLOCKER)

Configuration & Simplicity (IMPROVEMENT)

GraphQL Patterns (IMPROVEMENT)

Deprecation & Cleanup Hygiene (NITPICK)

Documentation (IMPROVEMENT)

Code Comments (CLEANUP)

Step 4: Comment Extraction

Before generating the review output, scan all new/changed files and:

  1. Extract every comment from added or modified lines (inline //, block /* */, XML doc ///).
  2. Group by file — list each comment with its file path and line number.
  3. Remove the comments from the source files (except the exclusions listed above).
  4. Compile the extracted comments into a ### 📝 Extracted Comments section in the review output (see format in Step 5). These comments should be included in the PR description so reviewers understand the developer's reasoning.

Step 5: Output Format

Generate the review in markdown:

## Architect Review

**Scope**: [N files changed, M lines added, K lines removed]

### 🚫 BLOCKER
- **[File:Line]**: [Issue description]
  > **Rule**: [Cite handbook rule, wiki link, or MS docs reference]
  > **Fix**: [Concrete fix suggestion]

### 🔧 IMPROVEMENT
- **[File:Line]**: [Suggestion]
  > **Reasoning**: [Why and reference if applicable]

### 💬 NITPICK
- **[File:Line]**: [Minor observation]

### ✅ Positive
- [Acknowledge well-done aspects of the PR]

### 📝 Extracted Comments (for PR description)
- **[File:Line]**: `// [original comment text]`
- ...

---
**Vote recommendation**: [Approve (10) | Approve with Suggestions (5) | Wait for Author (-5) | Reject (-10)]
- **10**: No blockers, code follows standards
- **5**: Minor improvements suggested, code is mergeable
- **-5**: Blockers found, wait for author to address
- **-10**: Fundamental architecture or security violations

Severity Classification Rules

| Severity | Criteria | Blocks merge? |

|---|---|---|

| BLOCKER | Architecture violations, security issues, skipped tests, deadletter risks | Yes |

| IMPROVEMENT | Naming, simplicity, patterns, documentation | No (but expected before next release) |

| NITPICK | Style preferences, pre-existing issues, minor suggestions | No |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.