Skip to main content
skill CX Codex

code-review · jwynia — Claude Code skill: structured code review

A skill that gives code review a shape: what to check for correctness, security and performance, how to phrase comments, when a PR is too big.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jwynia/agent-skills --skill code-review -a claude-code
Open on GitHub

What code-review does

The skill lays out a review method rather than running a linter. It names four focus areas: correctness, maintainability, performance and security. Each comes with questions to ask of a diff and with red flags such as N+1 queries, unbounded loops and synchronous I/O inside async code.

There is a code smell checklist with thresholds: a method past 50 lines, more than 5 parameters, duplication from 10 similar lines. Comments get severity tags — [BLOCKING], [MAJOR], [MINOR], [QUESTION] — and a pattern of observation, impact, suggestion. Tables cover cyclomatic and cognitive complexity ranges.

One point the skill keeps returning to: review effectiveness drops as the PR grows. Under 400 lines detection is at its best, past 800 it falls off by 90%. So a bloated diff is a reason to split it, not to read harder. The skill works with any programming language and pairs with github-agile for the PR workflow. It does not write new code or design architecture — other skills in the set handle that.

What it helps with

  • check a diff before merge against one list
  • tell a blocking issue from a style nit
  • write a review comment that is not just a preference
  • decide whether a large PR should be split
  • self-review code before asking anyone else

Example prompts for the agent

  • Review this PR with the code-review skill and sort findings by severity
  • Check src/orders/service.py for code smells and security problems
  • Rate the cyclomatic complexity of these methods and tell me what to refactor

How to install code-review

1Skills CLI (Vercel)

npx skills add jwynia/agent-skills --skill code-review -a claude-code

2Manually: put the files in place

~/.claude/skills/code-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-review

How do I install code-review in Claude?

Run npx skills add jwynia/agent-skills --skill code-review -a claude-code. The skill file lands at ~/.claude/skills/code-review/SKILL.md.

What does code-review do?

It supplies a review structure: focus areas, a code smell checklist, complexity thresholds and comment conventions. Both a human reviewer and an agent get a systematic way to read code.

Which languages does the skill support?

Any programming language. For the PR workflow it integrates with github-agile.

Source text

SKILL.md · MIT
---
name: code-review
description: "Provide structured code review guidance for catching defects and improving quality. This skill should be used when the user asks to 'review this code', 'check for issues', 'PR review', 'code quality check', or wants systematic code evaluation. Keywords: code review, PR, pull request, quality, defects, security, maintainability, performance."
license: MIT
compatibility: Works with any programming language. Integrates with github-agile for PR workflow.
metadata:
  author: jwynia
  version: "1.0"
  type: diagnostic
  mode: evaluative
  domain: development
---

# Code Review Diagnostic

Systematic code review catches 60-90% of defects before production, reduces maintenance costs by 40%, and serves as effective knowledge transfer. This skill provides structured review guidance for both human reviewers and AI agents.

## When to Use This Skill

Use this skill when:
- Reviewing code before merge
- Assessing code quality
- Preparing code for PR submission
- Self-reviewing before requesting review

Do NOT use this skill when:
- Writing new code (use implementation skills)
- Designing architecture (use system-design)
- Working on requirements (use requirements-analysis)

## Core Principle

**Review effectiveness degrades sharply with PR size.** Under 400 lines: highest defect detection. 400-800 lines: 50% less effective. 800+ lines: 90% less effective.

## Quick Reference: Review Effectiveness

| Factor | Optimal | Degraded |
|--------|---------|----------|
| PR size | < 400 lines | > 800 lines |
| Review time | < 60 minutes | > 90 minutes |
| Review speed | 200-400 LOC/hour | > 500 LOC/hour |
| Reviewers | 2 | 4+ (diminishing returns) |

## Quality Pyramid

| Level | Checks | Catches | Frequency |
|-------|--------|---------|-----------|
| 1. Automated | Lint, types, unit tests, security scan | 60% | Every commit |
| 2. Integration | Integration tests, contracts, performance | 25% | Every PR |
| 3. Human Review | Design, logic, maintainability, context | 15% | Significant changes |

## Review Focus Areas

### 1. Correctness

**Questions:**
- Does it solve the stated problem?
- Are edge cases handled?
- Is error handling complete?
- Are assumptions valid?

**Validation:** Test coverage, business logic, data integrity, concurrency handling

### 2. Maintainability

**Questions:**
- Is the code self-documenting?
- Can it be easily modified?
- Are abstractions appropriate?
- Is complexity justified?

**Indicators:** Clear naming, single responsibility, minimal coupling, high cohesion

### 3. Performance

**Questions:**
- Are there obvious bottlenecks?
- Is caching appropriate?
- Are queries optimized?
- Is memory managed?

**Red Flags:** N+1 queries, unbounded loops, synchronous I/O in async context, memory leaks

### 4. Security

**Questions:**
- Is input validated?
- Are secrets protected?
- Is authentication checked?
- Are permissions verified?

**Critical Checks:** No hardcoded secrets, SQL parameterized, XSS prevention, CSRF tokens

## Code Smells Checklist

### Method Level
| Smell | Threshold | Action |
|-------|-----------|--------|
| Long method | > 50 lines | Extract method |
| Long parameter list | > 5 params | Parameter object |
| Duplicate code | > 10 similar lines | Extract common |
| Dead code | Never called | Remove |

### Class Level
| Smell | Symptoms | Action |
|-------|----------|--------|
| God class | > 1000 lines, > 20 methods | Split class |
| Feature envy | Uses other class data excessively | Move method |
| Data clumps | Same parameter groups | Extract class |

### Architecture Level
| Smell | Detection | Action |
|-------|-----------|--------|
| Circular dependencies | Dependency cycles | Introduce interface |
| Unstable dependencies | Depends on volatile modules | Dependency inversion |

## Comment Guidelines

### Comment Types

**[BLOCKING]** - Must fix before merge
- Security vulnerabilities, data corruption risks, breaking API changes

**[MAJOR]** - Should fix before merge
- Missing tests, performance issues, code duplication

**[MINOR]** - Can fix in follow-up
- Style inconsistencies, documentation typos, naming improvements

**[QUESTION]** - Seeking clarification
- Design decisions, business logic, external dependencies

### Effective Comment Pattern

```
Observation + Impact + Suggestion

Example:
"This method is 200 lines long [observation].
This makes it hard to understand and test [impact].
Consider extracting helper methods [suggestion]."
```

### Avoid
- Vague: "This could be better"
- Personal: "I don't like this"
- Nitpicky: "Missing period in comment"
- Overwhelming: 50+ minor style issues

## Review Readiness Checklist

### Before Requesting Review
- [ ] Feature fully implemented
- [ ] All tests written and passing
- [ ] Self-review performed
- [ ] No commented code or debug statements
- [ ] Coverage threshold met
- [ ] Linting clean
- [ ] Build succeeds
- [ ] Documentation updated
- [ ] PR description explains problem and solution

### PR Description Should Include
- Problem statement (why this change?)
- Solution approach (how does it solve it?)
- Testing strategy (how verified?)
- Breaking changes (if any)
- Review focus areas (where to look closely?)

## Complexity Thresholds

### Cyclomatic Complexity
| Range | Classification | Action |
|-------|----------------|--------|
| 1-10 | Simple | OK |
| 11-20 | Moderate | Consider refactoring |
| 21-50 | Complex | Refactor required |
| > 50 | Untestable | Must decompose |

### Cognitive Complexity
| Range | Classification |
|-------|----------------|
| < 7 | Clear |
| 7-15 | Acceptable |
| > 15 | Confusing - refactor needed |

## Anti-Patterns

### Rubber Stamp
Approving without thorough review. "LGTM" in < 1 minute.
**Fix:** Minimum review time, required comments, random audits.

### Nitpicking
50+ style comments, missing real issues.
**Fix:** Automate style checks, focus on logic/design, limit minor comments.

### Big Bang Review
2000+ line PRs that overwhelm.
**Fix:** Stack small PRs, feature flags, review drafts early.

## Security Scanning Categories

### Severity Classification
| Level | Definition | SLA |
|-------|------------|-----|
| Critical | Remote code execution possible | Fix immediately |
| High | Data breach possible | Fix within 24 hours |
| Medium | Limited impact | Fix within sprint |
| Low | Minimal risk | Fix when convenient |

## Review Metrics

### Efficiency
| Metric | Target |
|--------|--------|
| First review turnaround | < 4 hours |
| Review cycles | < 3 |
| PR to merge time | < 24 hours |

### Quality
| Metric | Target |
|--------|--------|
| Defect detection rate | > 80% |
| Post-merge defects | < 0.5 per PR |
| Review coverage | 100% |

## Related Skills

- **github-agile** - PR workflow and GitHub integration
- **task-decomposition** - If PR too large, break it down
- **requirements-analysis** - For unclear requirements

© jwynia · MIT · jwynia/agent-skills

Similar skills

Everything for Code review and refactoring →

code-review by other authors comes first.

code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs code-review official anthropics The skill reviews diffs and pull requests for security, performance and correctness. Useful when a change needs a look before merging. CX Codex +1 9,900installs code-review agno-team Automated code inspection for style violations, bugs, and best-practice gaps. The skill runs linting, identifies issues, and delivers structured feedback with severity levels. CX Codex +1 472installs code-review coderabbitai Runs CodeRabbit CLI reviews and feeds structured findings back to the agent. Helpful for catching bugs, security risks, and code quality issues before merging. CX Codex +1 14,800installs code-review getsentry A skill that reviews pull requests and code changes against Sentry engineering practices: security, performance, tests, design. CX Codex +1 5,500installs code-review-and-quality addyosmani Five review axes and a limit on diff size, so an agent checks a change before merge instead of after. CX Codex +1 73,200installs code-review-quality proffesor-for-testing Reviews code for logic, security, testability and maintainability. Use it for PR feedback, change reviews, or setting review practices. CX Codex +1 1,500installs comprehensive-review Seth Hobson A Claude plugin that reviews your code from three angles at once: architecture, security and development practices. Useful before merging a large branch. CX Codex ★ 41,729repo stars self-eval Alireza Rezvani This skill rates AI work on two axes, checks for inflated scores, and keeps an evaluation history. Use it after a task, code review, or work session. 575installs quality-playbook official github Runs a six-phase quality audit over a codebase, each phase in its own context window. Useful when a normal review stops finding bugs. ★ 40,418repo stars evaluation-rubrics lyndonkl Builds a rubric with explicit criteria, a scale and level descriptors so the same work gets scored the same way twice. CX Codex +1 784installs

From the same set77

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor