home / skills / dimitrigilbert / task-o-matic / code-reviewer

code-reviewer skill

/docs/skills/code-reviewer

This skill reviews code against task requirements and PRD, identifies defects, and generates actionable fix tasks to improve quality.

npx playbooks add skill dimitrigilbert/task-o-matic --skill code-reviewer

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.6 KB
---
name: code-reviewer
description: Expert code review agent. Validates implementation against requirements, catches bugs, ensures patterns, and generates actionable fix tasks.
---

# Code Reviewer

**Goal**: Ensure implementation matches requirements (Task & PRD) and maintains quality.

## Review Checklist

### 1. Requirements Check
- [ ] Does code satisfy `Task.description`?
- [ ] Does code satisfy `Task.prdRequirement` (if linked)?
- [ ] Are all acceptance criteria met?

### 2. Quality Check
- [ ] **Critical**: Security holes, crashes, data loss, broken build.
- [ ] **Major**: Logic errors, missing requirements, poor performance.
- [ ] **Minor**: Naming, comments, style (let linter handle most).

## Workflow

### 1. Analyze Context
```bash
# Get Task & PRD Requirements
npx task-o-matic tasks show --id <id>
```

### 2. Inspect Changes
```bash
# Review diff since start of task
git diff <base-branch>...HEAD
```

### 3. Generate Actions
**Don't just complain—create work.**

For every Critical/Major issue, create a **Fix Subtask**:

```bash
npx task-o-matic tasks create \
  --parent-id <current_task_id> \
  --title "Fix: <concise_issue_description>" \
  --content "<detailed_fix_instructions>" \
  --effort small
```

### 4. Output Summary
Generate a review summary (Markdown):

```markdown
## Review: [Task Title]
**Status**: [Approved | Request Changes]

### 🚫 Critical Fixes (Blocking)
- Issue 1 (Task Created: ID-1)
- Issue 2 (Task Created: ID-2)

### ⚠️ Improvements (Non-blocking but recommended)
- Suggestion 1

### ✅ Verified
- Requirement A met
- Requirement B met
```

Overview

This skill is an expert code review agent for TypeScript projects that validates implementations against task requirements and product specs. It catches security holes, crashes, logic bugs, and style issues, then produces actionable fix tasks. The skill focuses on outcomes: safe builds, satisfied acceptance criteria, and clear remediation steps.

How this skill works

The agent reads the task description and any linked PRD, inspects diffs or commits for changes, and runs a checklist across requirements, critical failures, major logic problems, and minor style issues. For each Critical or Major problem it constructs a precise Fix Subtask with step-by-step instructions and estimated effort. Finally it emits a structured review summary that lists blocking fixes, recommended improvements, and verified items.

When to use it

  • Before merging a feature branch or PR to ensure requirements are met
  • When a task links to a PRD and acceptance criteria must be verified
  • After automated tests pass but before release to catch logic/security regressions
  • When onboarding new contributors to enforce project patterns and prevent rework

Best practices

  • Always start by loading the Task description and any PRD to ground the review in requirements
  • Run diffs against the base branch and focus first on Critical issues that break builds or cause data loss
  • For each blocking issue create a small, actionable fix subtask with detailed reproduction steps and code pointers
  • Distinguish Major (functional) from Minor (style) problems and let linting handle most stylistic items
  • Keep review comments concise and solution-oriented: link to specific lines, suggest code snippets, and cite tests to add

Example use cases

  • A new payment integration branch should be reviewed for security, transaction rollback, and acceptance criteria compliance
  • A refactor that touches core utilities needs logic and performance validation to prevent regressions
  • Pull requests that touch authentication, encryption, or data persistence should be scanned for critical issues
  • Feature tasks with linked PRDs require mapping each acceptance criterion to verified code paths

FAQ

How are blocking issues reported?

Every Critical or Major issue is turned into a Fix Subtask with a concise title, detailed fix instructions, and an effort estimate.

Does the agent fix code automatically?

No. It generates actionable subtasks and precise instructions for developers to implement fixes; automation can be used separately if desired.