# Layered Code Review
Layered Code Review is an AI coding-assistant skill for developers who want an evidence-backed review tied to a specific commit; it is MIT-licensed and compatible with Claude Code, Cursor, OpenCode, and Codex.
## Purpose
Layered Code Review is a reusable code-review skill for Claude Code, Cursor, OpenCode, and Codex. It reviews changes in stages, records findings with file and line references, and produces a structured report tied to the reviewed commit.
## Quick start
In the project you want reviewed, follow the [Install](#install) steps, then ask Claude Code for a review using the prompt under [Usage](#usage).
## Features
- Compatible with Claude Code, Cursor, OpenCode, and Codex; the included non-interactive install command targets Claude Code.
- Runs the checks the current environment allows before asking a person to review; it distinguishes a pass from a blocked or unrun check.
- Separates finding candidate issues from challenging them. When a fresh reviewer is unavailable, it says that the review and the attempt to refute findings were not independent.
- Reports **Important**, **Nit**, and **Pre-existing** findings with a trigger, file and line, impact, and evidence; unverified suspicions stay labeled as unverified.
- Binds each report to the reviewed head SHA. Rereviews focus on the new diff and open important findings rather than repeating unchanged items.
- Defaults to a report only. It does not authorize code edits, pull request comments, approvals, merges, or protection-rule changes.
- Version 0.1.0 includes [the skill instructions](skills/layered-code-review/SKILL.md), [example prompts](skills/layered-code-review/references/invocations.md), [an illustrative report](skills/layered-code-review/references/example-report.md), a Python validator, and regression tests. The validator and tests use the Python standard library; GitHub Actions runs them with `contents: read` and no repository write permission.
## Install
First, list the skills the CLI can discover:
```bash
npx skills add LofiSu/layered-code-review --list
```
Install it into the current project for Claude Code:
```bash
npx skills add LofiSu/layered-code-review --skill layered-code-review -a claude-code -y
```
The CLI copies the skill to `.claude/skills/layered-code-review/SKILL.md`, keeps `references/` beside it, and writes `skills-lock.json` in the receiving project. The commands above use the default branch. To pin a specific commit, use its full SHA, for example `npx skills add LofiSu/layered-code-review@<sha> --skill layered-code-review -a claude-code -y`.
To install by hand from a clone of this repository, set `PROJECT` to the project that should load the skill and run:
```bash
mkdir -p "$PROJECT/.claude/skills"
cp -R skills/layered-code-review "$PROJECT/.claude/skills/layered-code-review"
```
## Usage
In Claude Code, ask for a review and state the boundaries you want respected. For example:
```text
Review this pull request with layered-code-review. Run the checks this environment allows, then write the report. Do not edit files, post comments, approve, or merge.
```
More request examples are in [references/invocations.md](skills/layered-code-review/references/invocations.md). The [example report](skills/layered-code-review/references/example-report.md) illustrates the format; it is not a real review.
To check this repository, run:
```bash
python3 scripts/validate_skill.py
python3 -m unittest discover -s tests -v
```
## Configuration
No environment variables or project-specific configuration are required. The skill follows the repository's existing rules and uses only the checks and actions allowed in the current session. A review does not grant permission to edit files, post comments, approve, merge, or change repository protections.
## License
[MIT](LICENSE) (`SPDX-License-Identifier: MIT`). Copyright (c) 2026 LofiSu.
## Contact
For project questions, contact [LofiSu on GitHub](https://github.com/LofiSu).