---
name: opencognitos-agent-review
title: agent review
kind: skill
description: >
  Review another agent's changes like a careful senior engineer - read the diff,
  run the checks, rank findings by severity. Use when asked to review a branch,
  pull request or another agent's work, or as a second opinion before merging.
  Works best when the reviewer is a different model or CLI than the author.
updated: 2026-12-05
authored_by: OpenCognitOS
author_url: https://github.com/OpenCognitOS
source_url: https://github.com/OpenCognitOS/skills/tree/HEAD/agent-review
brought_by: kt
license: MIT
---

# Agent review

An agent reviewing its own work misses the same things it missed while writing. A second agent, ideally a different model, catches different mistakes. This skill makes that review thorough and useful.

## Setup

- Prefer a different CLI than the author: Codex reviews Claude's work, Claude reviews Gemini's, and so on. In OpenCognit, start the reviewer in its own session on the same branch or worktree.
- The reviewer does **not** fix things unless asked. It reports.

## 1. Understand the intent

Read the task, issue or PR description first. Without knowing the goal you cannot judge the change. If there is none, ask or infer it from the commits and say what you assumed.

## 2. Read the whole diff

```bash
git diff main...HEAD --stat
git diff main...HEAD
```

Read every changed file, not only the summary. Open surrounding code where a change touches existing behaviour.

## 3. Run the checks

Run tests, type check, linter and build. Report what ran and the result. A review without running anything is a reading exercise, say so if you could not run them.

## 4. Look for

In this order:

1. **Correctness**: logic errors, wrong conditions, off-by-one, unhandled null/undefined, race conditions, missing `await`.
2. **Does it do what was asked?** Missing parts, scope creep, changed behaviour nobody requested.
3. **Security**: injection, secrets in code, missing auth checks, unsafe file paths, user input in shell commands.
4. **Data loss and breaking changes**: migrations, deleted fields, changed APIs, config format changes.
5. **Tests**: do they test the change, or only exist? Would they fail if the code were wrong?
6. **Maintainability**: duplication, dead code, unclear names, comments that lie.

Ignore pure style preferences the linter does not enforce.

## 5. Report

Rank findings by severity and give each a concrete location and scenario:

```markdown
## Review: <branch>  ·  Verdict: approve | changes needed | blocked

Checks: tests ✓ (142 passed) · types ✓ · lint ✓ · build ✓

### Must fix
1. `src/queue.ts:88` — `retry()` never resets `attempts`, so after the first failure every job fails immediately. Scenario: job fails once, succeeds on retry, next job → 0 retries left.

### Should fix
...

### Nits
...

### Good
- <one or two things done well, so they are kept>
```

Every finding must name a file and line and explain what goes wrong. "Consider improving error handling" is not a finding. If you are unsure, mark it as a question, not a bug.
