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
Reference material for Claude Code internals — the on-disk layout under ~/.claude and project-scope .claude, the plugin cache, session-env propagation, and the full hook lifecycle. Auto-recall when working on Claude-Code-related tasks: writing or debugging hooks, authoring plugins, inspecting session state, troubleshooting why an env var is or isn't visible to a Bash tool call, or when paths under ~/.claude or ~/.claude/plugins/ come up.
development
Manage GitHub App installation tokens in Claude Code sessions. Use when tokens expire, auth errors occur in long-running sessions, or when setting up GitHub App credentials for agent teams. <example>my github token expired</example> <example>refresh the github app token</example> <example>check token status</example> <example>set up github app authentication for this session</example>
tools
Auto-detect project formatting tools and configure edit-utils settings
tools
Use this skill when the user asks about 1Password, secrets management, retrieving credentials, using op CLI, service accounts, secret references, vault operations, or any task involving the 1Password CLI (op). Also use when needing to inject secrets into environment variables, read passwords or API keys from 1Password, or manage 1Password items from the command line.