# Code Review

> Adversarial code review that validates implemented work against a story/spec, acceptance criteria, and actual git changes. Use when the user asks to run a code review, review a diff/PR, verify tasks or acceptance criteria are done, or validate story claims versus code.

- Skill: `sungkhum/code-review` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add sungkhum/code-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sungkhum/code-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: sungkhum (https://skillmd.com/u/sungkhum)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/sungkhum/code-review

---


# Code Review

## Overview

Perform a rigorous, adversarial review that cross-checks story claims and acceptance criteria against the real code changes. Prioritize concrete, reproducible findings with file and line references. If the code is clean, explicitly say so.

## Quick Start

- Determine scope: story file + repository, or a diff/PR.
- Identify repo root (use git) and collect changed files via `git status --porcelain`, `git diff --name-only`, and `git diff --cached --name-only`.
- Load story/spec inputs if provided; otherwise ask for the story/spec or acceptance criteria.
- Exclude non-application files and folders (`.cursor/`, `.windsurf/`, `.claude/`, and other tooling/config folders unless explicitly requested).

## Workflow

Follow the detailed workflow in `references/workflow.md`. Use these guardrails when adapting it to a standalone repo:

- If `{project-root}/workflow-config.yaml` does not exist, treat config values as optional and ask the user for missing items that affect output (language, skill level, story path, etc.).
- If planning artifacts (architecture/ux/epics) are unavailable, proceed with the story/spec and code changes only; note missing context explicitly.
- If no story file exists, replace “story validation” with “requirements validation” using the user-provided criteria or a PR description.

## Review Expectations

- Validate each Acceptance Criterion and each task marked complete. Missing ACs are HIGH severity; tasks marked complete but not implemented are CRITICAL.
- Cross-check story File List against actual git changes; report discrepancies.
- Cover security, performance, error handling, test quality, and maintainability.
- If no issues remain after a second pass, report a clean review.

## Output

- Present findings grouped by severity with evidence (`file:line`), and a short impact statement.
- If asked, fix issues or create action items; otherwise provide a concise remediation list.
- When applicable, update story status and sprint status in accordance with the workflow.

## References

- `references/workflow.md` for the full standalone code review flow.
- `references/discover-inputs.md` for input discovery/loading strategy.
- `references/checklist.md` for the review completion checklist.

