Skip to content

ci: Claude multi-agent PR review workflow#1

Merged
marcelosalloum merged 2 commits into
mainfrom
claude-multi-agent-review
May 21, 2026
Merged

ci: Claude multi-agent PR review workflow#1
marcelosalloum merged 2 commits into
mainfrom
claude-multi-agent-review

Conversation

@marcelosalloum
Copy link
Copy Markdown
Collaborator

Forked from stellar#67 to test on this fork before promoting upstream.

Summary

Adds .github/workflows/claude-review.yml — a swarm of five specialist Claude review agents that run in parallel on every PR, all on claude-haiku-4-5:

Agent Focus Skill
postgres Prisma, queries, migrations, pooling postgres-optimization, database-migrations
typescript Types, zod, async, Express 5, Node 22+ productionalize-node
docker Multi-stage layering, image size docker-patterns
security Secrets, injection, deps, CORS security-audit
docs README / .env.example / docs drift (prompt-only)

Skills are vendored under .claude/skills/ so the CI runner can load them.

Bugs fixed during review

Copilot caught two real bugs on stellar#67 before merge:

  1. Workflow-level concurrency.group used ${{ github.job }} (constant review across all matrix entries) → would collapse all five agents into one group and cancel them. Moved to job-level concurrency keyed on matrix.id.
  2. Pinned anthropics/claude-code-action from @v1 tag to commit SHA 20c8abf... to match the repo convention for third-party actions.

Plan

  1. Merge this on the fork.
  2. Open a trivial follow-up PR to verify all five agents fire end-to-end.
  3. Once happy, port the same workflow upstream via ci: Claude multi-agent PR review workflow stellar/laboratory-backend#67.

Test plan

  • Confirm ANTHROPIC_API_KEY is configured as a repo secret on this fork.
  • After merge, open a one-line follow-up PR and verify five jobs run + post summary comments.

Adds a swarm of five specialist Claude review agents that run in
parallel on each PR, one per concern (PostgreSQL, TypeScript, Docker,
security, docs). Each agent loads a domain-specific skill from
`.claude/skills/` and posts inline + summary comments scoped to its
lane. All agents run on `claude-haiku-4-5` to keep cost low.

Security model is borrowed from stellar/actions PR #103, but uses
`pull_request` (not `_target`) since this repo doesn't accept fork
contributions.

The five skills are vendored under `.claude/skills/` so the CI runner
can load them without external dependencies.
Addresses two issues Copilot caught on the PR:

1. The workflow-level concurrency.group used ${{ github.job }}, which
   resolves to the constant job id "review" for every matrix entry.
   All five agents shared one group and would have cancelled each
   other. Workflow-level concurrency can't reference matrix.*, so the
   group moves to the job level and keys on matrix.id.

2. Pin anthropics/claude-code-action to a commit SHA (matching the
   existing convention for third-party actions in this repo) to reduce
   supply-chain risk. SHA is the current v1 tag.
Copilot AI review requested due to automatic review settings May 21, 2026 18:23
@marcelosalloum marcelosalloum merged commit 62e46cb into main May 21, 2026
8 of 9 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow that runs five parallel Claude “specialist” review jobs on each non-draft PR, backed by vendored skill prompts in .claude/skills/ to standardize each agent’s review focus.

Changes:

  • Added .github/workflows/claude-review.yml to run a matrix of 5 review aspects (postgres/typescript/docker/security/docs) with per-aspect concurrency.
  • Vendored multiple Claude skill packs under .claude/skills/ (and productionalize-node reference docs) for consistent agent behavior.
  • Pinned anthropics/claude-code-action to a specific commit SHA.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/claude-review.yml New multi-agent PR review workflow with matrix, concurrency, and Claude Code action invocation.
.claude/skills/verification-before-completion/SKILL.md Adds a verification discipline skill prompt for agents.
.claude/skills/productionalize-node/SKILL.md Adds a production-hardening Node/TypeScript skill prompt.
.claude/skills/productionalize-node/references/tooling-defaults.md Reference doc listing default tooling choices used by the skill.
.claude/skills/productionalize-node/references/phase-8-final-review.md Reference doc for the skill’s final review phase and completion criteria.
.claude/skills/productionalize-node/references/phase-7-documentation.md Reference doc for documentation updates/verification in the skill.
.claude/skills/productionalize-node/references/phase-6-ci.md Reference doc for CI workflow guidance used by the skill.
.claude/skills/productionalize-node/references/phase-5-testing.md Reference doc for Vitest setup and coverage workflow in the skill.
.claude/skills/productionalize-node/references/phase-4-dependencies.md Reference doc for dependency audit/upgrades and “freshness” gate guidance.
.claude/skills/productionalize-node/references/phase-3-hardening/phase-3.5-cors-evaluation.md Reference doc for optional CORS evaluation/config guidance.
.claude/skills/productionalize-node/references/phase-3-hardening/phase-3.4-env-validation.md Reference doc for env validation via t3-env.
.claude/skills/productionalize-node/references/phase-3-hardening/phase-3.3-security.md Reference doc for helmet/rate-limit/secrets audit guidance.
.claude/skills/productionalize-node/references/phase-3-hardening/phase-3.2-input-validation.md Reference doc for Zod boundary validation guidance.
.claude/skills/productionalize-node/references/phase-3-hardening/phase-3.1-error-handling.md Reference doc for error hierarchy and Express error handling guidance.
.claude/skills/productionalize-node/references/phase-3-hardening/phase-3-hardening.md Reference doc tying together hardening sub-phases and verification.
.claude/skills/productionalize-node/references/phase-2-quality-infra.md Reference doc for ESLint/Prettier and logger setup guidance.
.claude/skills/productionalize-node/references/phase-1-foundation.md Reference doc for TS strict migration, scripts/Makefile, and repo hygiene.
.claude/skills/productionalize-node/references/assessment-checklist.md Reference assessment checklist used by the skill to evaluate a codebase.
.claude/skills/postgres-optimization/SKILL.md Adds a PostgreSQL optimization skill prompt.
.claude/skills/docker-patterns/SKILL.md Adds a Docker patterns skill prompt.
.claude/skills/database-migrations/SKILL.md Adds a DB migration best-practices skill prompt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

claude_args: |
--model claude-haiku-4-5
--max-turns 25
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment ${{ github.event.pull_request.number }}:*),Bash(gh pr diff ${{ github.event.pull_request.number }}:*),Bash(gh pr view ${{ github.event.pull_request.number }}:*),Bash(git log:*),Bash(git blame:*),Bash(git show:*),Bash(rg:*),Bash(cat:*),Bash(ls:*),Bash(find:*)"
permissions:
contents: read
pull-requests: write
id-token: write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants