From review-toolkit
Post a GitHub PR review with inline comments. Runs dual analysis (/branch-review + /final-review in parallel), cross-validates every finding against actual code/docs/running systems, presents draft to user for approval, then publishes via GitHub API. Designed to catch AI hallucinations — every claim must have evidence.
How this skill is triggered — by the user, by Claude, or both
Slash command
/review-toolkit:pr-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**CRITICAL**: This skill produces a PUBLISHED GitHub review visible to the PR author and all watchers. Every word matters. Every claim must be proven. User MUST approve the text before publishing.
CRITICAL: This skill produces a PUBLISHED GitHub review visible to the PR author and all watchers. Every word matters. Every claim must be proven. User MUST approve the text before publishing.
Parse $ARGUMENTS for:
gh pr view --json number --jq .number 2>/dev/null--approve — submit as APPROVE instead of REQUEST_CHANGES (only if no blockers found)--target — target branch override (passed through to sub-reviews)If no PR number and no PR exists for current branch, report error and stop.
Before any analysis, ensure local branch matches the remote PR head:
# Get PR head ref
PR_BRANCH=$(gh pr view $PR_NUMBER --json headRefName --jq .headRefName)
# Fetch and reset to remote
git fetch origin $PR_BRANCH
git reset --hard origin/$PR_BRANCH
Print the current commit hash and message so the user can confirm this is the right state.
Launch BOTH skills simultaneously using the Agent tool:
/branch-review --target <target> — branch-level analysis with full codebase context/final-review $PR_NUMBER — PR-focused review with business context and dual-model (Claude + Codex)Wait for both to complete. Collect all findings from both.
Build a unified list of all unique findings from both analyses. For each finding, record:
Deduplicate findings that describe the same issue from different angles — keep the most precise description.
CRITICAL: AI models hallucinate. Blind trust in AI findings destroys reviewer credibility. Every claim must be proven with evidence before inclusion.
For EACH finding, perform mandatory verification:
After verification, each finding gets one of:
Only CONFIRMED findings proceed to the review.
Each confirmed finding becomes one of:
Will cause real problems if merged:
Real issues worth noting but not blocking:
Improvements the author could consider:
Compose the review for user approval. The review consists of:
Short summary: what the PR does well, what needs attention. No fluff. 2-3 sentences max.
If there are blockers: state how many and that they need fixing. If no blockers: acknowledge the good work briefly.
Each finding becomes an inline comment on the specific file and line. Format:
For blockers:
[description of the problem]
[evidence: why this is a real issue — specific code paths, docs, or system behavior that proves it]
[suggested fix or approach]
For observations:
Observation (non-blocking): [description]
For suggestions:
Suggestion (non-blocking): [description]
REQUEST_CHANGES--approve flag AND no blockers: APPROVECOMMENTCRITICAL: NEVER publish without user approval. This is a public action visible to the PR author.
Present the complete review to the user:
Ask: "Publish this review?" and wait for explicit confirmation.
If the user requests changes to the review text — apply them and re-present.
Use the GitHub API to submit the review. Use python3 with json module to properly serialize the payload (shell escaping of complex review bodies is unreliable):
import json, subprocess
review = {
"commit_id": "<latest PR head SHA>",
"event": "REQUEST_CHANGES", # or APPROVE or COMMENT
"body": "<review body>",
"comments": [
{
"path": "path/to/file.ext",
"line": 42,
"body": "<comment text>"
}
]
}
subprocess.run(
["gh", "api", f"repos/{owner}/{repo}/pulls/{pr_number}/reviews",
"--method", "POST", "--input", "-"],
input=json.dumps(review), text=True
)
After publishing, print the review URL so the user can verify it rendered correctly.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub lexfrei/ccc --plugin review-toolkit