Skip to content
Agent Orchestration
Skill

/code-review

Thorough code review with security, performance, correctness, and maintainability checks.

BOOST
From plugin
hermes-desktop
17790 skills
Install
$ npx -y skills add redwoodog/hermes-desktop --skill code-review --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/code-review

Context preview

The summary Claude sees to decide when to auto-load this skill.

Thorough code review with security, performance, correctness, and maintainability checks.

SKILL.md

code-review.SKILL.md
name: code-review
description: Thorough code review with security, performance, correctness, and maintainability checks.
tools: bash, read_file, grep, glob, agent

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:

  • A PR number (use `gh pr diff <number>` and `gh pr view <number>`)
  • A branch name (use `git diff main..<branch>`)
  • Specific files
  • Recent commits (use `git diff HEAD~N`)
# 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

  • Does the code do what it claims to do?
  • Are edge cases handled (null, empty, boundary values, overflow)?
  • Are error paths handled properly (try/catch, error returns, fallbacks)?
  • Is the logic sound? Trace through key code paths mentally.
  • Are race conditions possible in concurrent code?
  • Do loops terminate? Are off-by-one errors present?

Security

  • Is user input validated and sanitized before use?
  • Are SQL queries parameterized (no string concatenation)?
  • Is output properly escaped to prevent XSS?
  • Are authentication/authorization checks in place?
  • Are secrets hardcoded anywhere?
  • Are file paths validated (no path traversal)?
  • Are dependencies up to date and free of known vulnerabilities?
  • Is sensitive data logged or exposed in error messages?

Performance

  • Are there N+1 query patterns (queries inside loops)?
  • Could any operations be batched?
  • Are there unnecessary allocations in hot paths?
  • Is caching used appropriately?
  • Are large collections processed efficiently?
  • Could expensive computations be lazy or deferred?

Maintainability

  • Are names clear and descriptive?
  • Is the code DRY (Don't Repeat Yourself)?
  • Are functions focused on a single responsibility?
  • Is the code testable? Are dependencies injectable?
  • Are public APIs documented?
  • Is the abstraction level consistent within each function?

Testing

  • Are there tests for the new/changed code?
  • Do tests cover happy paths AND error paths?
  • Are edge cases tested?
  • Are tests isolated (no shared mutable state)?
  • Do test names describe the scenario being tested?

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):

  • Security vulnerabilities
  • Correctness bugs
  • Data loss risks

**Important Issues** (should fix):

  • Performance problems
  • Missing error handling
  • Missing tests for critical paths

**Suggestions** (nice to have):

  • Readability improvements
  • Minor refactoring opportunities
  • Documentation gaps

**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

  • Be specific. "This could be better" is not useful. "This loop on line 45 is O(n^2) because it calls indexOf inside the loop; using a Set would make it O(n)" is useful.
  • Be constructive. Suggest fixes, not just problems.
  • Distinguish severity. Not every issue is critical.
  • Acknowledge good work. Positive feedback is part of a good review.
  • Consider the author's intent. If something looks wrong, consider that you might be missing context before declaring it a bug.
Read more
Ships withhermes-desktop

A Windows-native AI agent that lives on your desktop. Chat with it, give it tools, let it learn who you are. Built with WinUI 3 and .NET 10.

Get the whole plugin

Other skills on hermes-desktop.