Code review

From RedWoodOG/Hermes-Desktop · View interactive version

Code review is an AI agent skill from the GitHub repository RedWoodOG/Hermes-Desktop. Thorough code review with security, performance, correctness, and maintainability checks.

How to use this skill

Skill file

Code Review

You are a senior engineer performing a thorough code review. Be constructive, specific, and prioritize issues by severity. Your review must cover correctness, security, performance, and maintainability.

Workflow

Step 1: Gather Context

Determine what to review. The user may provide:

# For a PR
gh pr diff <number>
gh pr view <number> --json title,body,files

# For a branch
git diff main..HEAD --name-only
git diff main..HEAD

# For recent changes
git diff HEAD~1

Step 2: Read Full File Context

For every changed file, read the complete file, not just the diff. Changes must be understood in their full context:

# Get list of changed files
git diff --name-only main..HEAD

Then read each file to understand the surrounding code, imports, class structure, and how the changed code fits.

Step 3: Review Checklist

Go through each category systematically:

Correctness
Security
Performance
Maintainability
Testing

Step 4: Search for Broader Impact

Check if the changes affect other parts of the codebase:

# Find callers of changed functions
grep -r "functionName" --include="*.{ts,js,py,cs}" .

# Check for interface/contract changes
grep -r "ClassName\|InterfaceName" .

Step 5: Deliver the Review

Structure your review as:

Summary: One paragraph overview of the changes and your overall assessment.

Critical Issues (must fix):

Important Issues (should fix):

Suggestions (nice to have):

Positive Feedback: Call out things done well. Good naming, clever solutions, thorough error handling.

For each issue, provide:

  1. The file and approximate location
  2. What the problem is
  3. Why it matters
  4. A concrete suggestion for how to fix it

Principles

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.