| name | claude-review-workflow |
| description | Add or update claude-review workflow. |
| user-invocable | true |
| allowed-tools | ["Read","Edit","Write","Bash"] |
claude-review-workflow
Sets up or edits the Claude PR review workflow (.github/workflows/claude-code-review.yml or .github/workflows/claude-review.yml),
which delegates to the reusable claude-code-review.yml workflow from Morrison-Lab/gha.
For the agent workflow that edits files in response to @claude mentions,
use claude-agent-workflow.
Path: .github/workflows/claude-code-review.yml (or .github/workflows/claude-review.yml)
Standard caller stub
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
workflow_dispatch:
inputs:
pr_number:
description: 'Pull request number to review'
required: true
type: string
jobs:
gather-context:
runs-on: ubuntu-latest
permissions:
issues: read
outputs:
prior-reviews: ${{ steps.fetch.outputs.prior-reviews }}
steps:
- id: fetch
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
REPO: ${{ github.repository }}
run: |
REVIEWS=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" \
--jq '[.[] | select(.user.login == "claude[bot]")] | .[-3:] |
.[] | "=== Review posted \(.created_at) ===\n\(.body)\n"' \
2>/dev/null | head -c 12000 || true)
{
echo 'prior-reviews<<__REVIEWS_EOF__'
echo "$REVIEWS"
echo '__REVIEWS_EOF__'
} >> "$GITHUB_OUTPUT"
review:
needs: gather-context
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
actions: read
uses: Morrison-Lab/gha/.github/workflows/claude-code-review.yml@v2
secrets: inherit
with:
pr-number: ${{ github.event.pull_request.number || inputs.pr_number }}
Load-bearing pieces (managed by Morrison-Lab/gha)
By delegating to Morrison-Lab/gha/.github/workflows/claude-code-review.yml@v2,
the consumer repo automatically inherits:
- History preservation: Fresh review comment posted per run without deleting prior review history.
- Inline comment prompt: Pushes review findings toward line-anchored comments via
mcp__github_inline_comment__create_inline_comment.
- Dispatch and event-gating: Handles both
pull_request and workflow_dispatch triggers, with branch-anchored dispatch resolution.
- Draft and fork guards: Skips unready drafts, Dependabot PRs, and tokenless fork PRs while executing dispatched runs.
- Concurrency & self-cancellation safety: Concurrency group keyed per PR with
cancel-in-progress: true.
- Package customization: Supports
apt-packages and pip-packages (e.g. maxima, sympy) for CAS-driven mathematical verification when needed.
- Prompt extensions: Custom repo-level instructions passed via
prompt-addendum.
Inputs and customization
pr-number: Required PR number passed from caller.
prompt-addendum: Repo-specific review instructions (e.g. Quarto/R checks, domain invariants).
apt-packages / pip-packages: Optional system/Python packages for verification (e.g. CAS engines).
setup-r: Set true if R packages or renv environment need initialization during review.
Setting up in a new repo
- Confirm
CLAUDE_CODE_OAUTH_TOKEN secret exists in repo/org secrets (gh secret list).
- Add the caller stub at
.github/workflows/claude-code-review.yml.
- Ensure required permissions (
contents: read, pull-requests: write, issues: write, id-token: write, actions: read) are declared on the caller job.
- Pass any project-specific guidance via
prompt-addendum.
Relationship to other skills
claude-agent-workflow — Companion skill for the interactive editing agent workflow.
upgrade-to-gha — Migration guidelines for upgrading standalone workflows to Morrison-Lab/gha.
config-ai — Router for AI workflow capability requests.