Conduct code review round

From FerroxLabs/murage · View interactive version

Conduct code review round is an AI agent skill from the GitHub repository FerroxLabs/murage. Orchestrates a thorough code review process by chaining four engineering skills into a structured review pipeline. Covers code quality assessment, security review, performance analysis, and documentation of review findings with actionable feedback. Use when conducting a formal code review of a pull

How to use this skill

Skill file

Conduct Code Review Round

Estimated time: 1-4 hours per review round (depending on change size and complexity)

This workflow chains four atomic skills into a structured code review process that covers code quality, security, performance, and documentation completeness. It ensures reviews are thorough, actionable, and consistent rather than superficial approvals or nitpick-heavy criticism. The workflow produces specific, prioritized feedback that the author can act on immediately.

Critical note: Code review is a collaboration, not a gatekeeping exercise. The goal is to improve the code and share knowledge, not to prove the reviewer's superiority. Feedback should be specific, actionable, and tied to observable impact (correctness, security, performance, or maintainability).

When to Use

Prerequisites

Before starting this workflow, ensure:

  1. Pull request is ready for review: The author has marked the PR as ready, all CI checks pass, and the PR description explains the context and changes
  2. Review context is available: You can access the code diff, linked ticket or issue, related documentation, and any design decisions that informed the implementation
  3. Review guidelines exist: The team has documented review expectations (response time, required checks, feedback format) or you will follow this workflow's structure
  4. Testing is complete: The author's tests pass and the reviewer can run the code locally if needed for complex changes

Steps

Step 1: Review Code Quality and Correctness (uses: code-review-patterns)

Examine the code changes for correctness, readability, maintainability, and adherence to team conventions. This step covers the core review: does the code do what it should, and will the team be able to understand and maintain it.

Step 2: Check Security Implications (uses: devsecops-engineer)

Examine the changes specifically for security implications. This step catches vulnerabilities that general code review misses because they require security-specific knowledge.

Step 3: Assess Performance Impact (uses: performance-profiling)

Evaluate the performance implications of the code changes. This step catches performance regressions before they reach production.

Step 4: Document Review Findings (uses: technical-documentation)

Compile all findings into structured, actionable review feedback. This step ensures feedback is clear, prioritized, and easy for the author to address.

Decision Points

Failure Handling

Expected Outcome

When this workflow is complete, the user will have:

  1. A thorough code quality assessment covering correctness, readability, and team convention adherence
  2. A security review identifying input validation gaps, authentication issues, and sensitive data handling concerns
  3. A performance assessment flagging database query issues, algorithm complexity concerns, and resource usage risks
  4. Structured, prioritized review feedback with specific line references and actionable suggestions for every finding
  5. A clear recommendation (approve, request changes, or needs discussion) with rationale

Output Format

CODE REVIEW REPORT
===================

PR: #[number] [title]
Author: [name]
Reviewer: [name]
Review Date: [date]

Summary:
  Must-fix: [count]
  Should-fix: [count]
  Suggestions: [count]
  Praise: [count]

[ ] Step 1: Code Quality
    Correctness issues: [count]
    Convention violations: [count]
    Readability concerns: [count]

[ ] Step 2: Security
    Vulnerabilities found: [count]
    Data handling issues: [count]
    Dependency risks: [count]

[ ] Step 3: Performance
    Query issues: [count]
    Complexity concerns: [count]
    Resource risks: [count]

[ ] Step 4: Feedback
    Recommendation: [approve/request-changes/needs-discussion]
    Blocking issues: [list]
    Non-blocking suggestions: [list]

Overall Status: [APPROVED / CHANGES REQUESTED / NEEDS DISCUSSION]

Adaptation notes:

Edge Cases

Example

Scenario: "Review a pull request that adds a user search endpoint to a Node.js API. The PR changes 187 lines across 4 files: route handler, service layer, database query, and test file."

Input: PR #342: "Add user search endpoint with full-text search." Changes: new GET /v1/users/search endpoint with query parameter, service layer with Elasticsearch integration, database fallback for Elasticsearch downtime, 6 new tests. Team: TypeScript, Express, Elasticsearch, PostgreSQL.

Output: Structured review with 2 must-fix, 3 should-fix, 4 suggestions, and 2 praise items.

Step 1 (code-review-patterns): Correctness: search handler does not validate query parameter length (must-fix: empty string causes full-table scan, extremely long strings waste resources). Edge case: search with special characters (quotes, backslash) is not escaped before passing to Elasticsearch (must-fix: potential query injection). Readability: search service mixes Elasticsearch and PostgreSQL logic in the same method (should-fix: extract into separate strategies for clarity). Positive: fallback pattern from Elasticsearch to PostgreSQL is well-implemented with proper timeout handling.

Step 2 (devsecops-engineer): Input validation: query parameter is not sanitized for Elasticsearch special characters (already caught in Step 1, confirmed as security issue). Authentication: endpoint correctly requires authentication middleware. Data exposure: search results return full user objects including email addresses and internal IDs (should-fix: create a search-specific response schema that excludes sensitive fields). No new dependencies added.

Step 3 (performance-profiling): Database: PostgreSQL fallback query uses LIKE with leading wildcard (should-fix: leading wildcards prevent index usage, consider full-text search with tsvector for the fallback). No pagination on search results (suggestion: add LIMIT and offset/cursor to prevent returning thousands of results). Elasticsearch query uses match_all as fallback for empty query (suggestion: return empty results instead of all users when query is empty).

Step 4 (technical-documentation): Compiled 11 findings into structured review. Must-fix (2): input validation for query length and special characters. Should-fix (3): separate Elasticsearch/PostgreSQL strategies, reduce search response fields, add GIN index for PostgreSQL full-text fallback. Suggestions (4): add pagination, handle empty query gracefully, add search latency logging, document Elasticsearch configuration requirements. Praise (2): Elasticsearch-to-PostgreSQL fallback pattern, comprehensive test coverage for the happy path. Recommendation: request changes (must-fix items are blocking).

Result: Author addressed both must-fix items and 2 of 3 should-fix items in a follow-up commit. Created tickets for remaining should-fix (PostgreSQL index) and suggestions (pagination, logging). PR approved and merged on second review round.

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.