plugins/scm-utils/skills/code-review/SKILL.md
Code review a pull request. Triggers on "review this PR", "code review", "review PR #123", "request a review", "review bot", "code review CI", "automated PR review", "claude review workflow", or when the user wants to add automated code review to a repository.
npx skillsauth add nsheaps/ai-mktpl code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Note: This skill covers CI-based automated review via
claude-code-actionand is maintained for backward compatibility with Henry's CI review workflow. For new review workflows, usescm-utils:automated-code-review. For manual/interactive code review scoring, seesdlc-utils:review.
An automated PR review system powered by claude-code-action running in GitHub Actions. It reviews PRs for code quality, security, performance, and maintainability, posting structured inline feedback via GitHub's review API.
When the user asks to review a PR:
Resolve the PR: Determine the PR number from the argument ($ARGUMENTS), current branch, or ask the user.
Check if CI review bot is available: Look for .github/workflows/claude-code-review.yaml in the repository.
If review bot workflow exists:
request-review label to the PR to trigger the CI review bot:
gh pr edit <PR_NUMBER> --add-label "request-review"
If review bot workflow does NOT exist:
pr-review-toolkit:review-pr skill or the code-review:code-review agentNotes:
request-review label is automatically removed once the review startsrequest-review label triggers a one-time review; use always-review for persistent review on draftsclaude-code-action runs with the prompt, using MCP tools to read the PR and post review comments| Condition | Behavior |
| ---------------------------- | ------------------------------------ |
| Non-draft PR opened/updated | Automatic review |
| request-review label added | One-time review (label auto-removed) |
| always-review label on PR | Review on every push, even drafts |
| Draft PR (no label) | Skipped |
| Secret | Purpose |
| ------------------------------------------------- | --------------------------------------------------------- |
| REVIEW_GITHUB_APP_ID | GitHub App ID for posting reviews |
| REVIEW_GITHUB_APP_PRIVATE_KEY | GitHub App private key |
| REVIEW_ANTHROPIC_API_KEY or ANTHROPIC_API_KEY | Anthropic API key for Claude |
| CLAUDE_CODE_OAUTH_TOKEN | Alternative: Claude Code OAuth token (used if no API key) |
The GitHub App needs:
references/workflow-template.yaml to .github/workflows/claude-code-review.yamlreferences/prompt-template.md to .github/prompts/claude-code-review.mdreferences/labels.yaml and apply them (or merge into existing .github/labels.yaml)nsheaps/github-actions/.github/actions/checkout-as-app — authenticates as a GitHub App and checks out the repo.github/actions/interpolate-prompt/ — reads a prompt template and interpolates env vars with envsubstThe bot follows a structured review process:
| Verdict | When |
| ----------------- | --------------------------------------------------------------- |
| APPROVE | No outstanding issues, ready to merge |
| COMMENT | Only P2 follow-ups remain (won't break if merged) |
| REQUEST_CHANGES | Must fix before merge (security, correctness, breaking changes) |
Reviews use a collapsible <details>/<summary> format with:
✅ checked, ❔ question, ⚠️ warning, ❌ problemThe workflow uses concurrency groups to prevent overlapping reviews on the same PR:
concurrency:
group: claude-review-{PR_NUMBER}
cancel-in-progress: false
cancel-in-progress: false ensures a running review finishes before a new one starts.
Edit .github/prompts/claude-code-review.md. Environment variables available for interpolation:
${REPO} — repository full name (owner/repo)${PR_NUMBER} — pull request number${JOB_CONTEXT} — JSON with job metadata (run URL, etc.)The workflow's settings JSON controls which tools the bot can use. Key sections:
permissions.allow — tools and bash commands the bot can usepermissions.deny — explicitly blocked tools (e.g., CI status checks, git push)env — environment variables for the claude-code sessionThe allowed_bots input controls which bot accounts the review bot recognizes when managing previous comments. Add bot names as comma-separated values.
| Issue | Solution |
| ------------------------------------ | ---------------------------------------------------------------------------------------- |
| Bot doesn't review draft PRs | Add request-review label, or use always-review label |
| Bot can't post reviews | Check GitHub App permissions and secrets |
| Reviews are too verbose | Adjust the prompt template in .github/prompts/claude-code-review.md |
| Bot reviews its own workflow changes | This is by design for security — consider using copilot instructions to handle this case |
references/workflow-template.yaml — Complete GitHub Actions workflowreferences/prompt-template.md — Review prompt with interpolation variablesreferences/labels.yaml — GitHub labels for controlling review triggersreferences/copilot-instructions.md — Fallback instructions for when the review workflow itself is modifiedtools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su