clean-code-reviewer
Installation
SKILL.md
Clean Code Reviewer
Orchestrates a full code review by inspecting the diff, selecting relevant skills, and dispatching concurrent review passes for style and correctness.
Review Target
If the user specifies what to review, use that target exactly. Valid targets include specific files, directories, commit ranges, branches, pull requests, changed files, or the full codebase.
If the user does not specify a target, follow Diff Detection below to determine what to review. Before starting, state the selected target briefly. Ask only when no meaningful target can be inferred.
Diff Detection
For diff-based review targets, determine the comparison to inspect:
- Run
git status. If there are staged or unstaged changes, review the working tree diff (git diffandgit diff --cached). - If the working tree is clean, find the base branch. Detect it with
git symbolic-ref refs/remotes/origin/HEAD(strips therefs/remotes/origin/prefix), falling back tomainthenmasterif that fails. Diff the current branch against it:git diff $(git merge-base HEAD <base>)..HEAD. - If the branch has no commits ahead of the base, there is nothing to auto-detect. Ask the user what they want reviewed: specific files, a directory, or the full codebase.
- Run
git diff --name-only(with the appropriate target) to get the list of changed files.