plan-deep-review
Installation
SKILL.md
Step 0: Detect Review Context
Determine what kind of plan you are reviewing. This shapes the entire review flow.
-
Git/PR context — There is a branch with commits, possibly an open PR.
- Check if a PR already exists:
gh pr view --json baseRefName -q .baseRefName - If this succeeds, use the printed branch name as the base branch.
- If no PR exists, detect the repo's default branch:
gh repo view --json defaultBranchRef -q .defaultBranchRef.name - If both commands fail, fall back to
main. - Print the detected base branch name. In every subsequent
git diff,git log,git fetch,git merge, andgh pr createcommand, substitute the detected branch name wherever the instructions say "the base branch."
- Check if a PR already exists:
-
Plan document context — The plan is in a document (TODOS.md, a design doc, or described in conversation) with no branch or commits yet.
- Skip git diff/log commands.
- Use the document content as the plan under review.
- System audit still applies — read CLAUDE.md, TODOS.md, and existing architecture docs for context.
-
Hybrid context — A plan document exists AND some implementation has started on a branch.
- Use both: review the plan document AND the branch diff for consistency.