-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
enhancementImprovement to existing featureImprovement to existing featuregood first issueGood for newcomersGood for newcomers
Description
Problem
Our local Claude Code environment has access to powerful pr-review-toolkit agents, but our GitHub Actions PR review workflow does not. This creates a significant capability gap.
Local environment has:
code-reviewer- Reviews code for adherence to guidelinescode-simplifier- Simplifies code while preserving functionalitycomment-analyzer- Analyzes comments for accuracypr-test-analyzer- Reviews test coverage qualitysilent-failure-hunter- Identifies silent failures and error handling issuestype-design-analyzer- Expert analysis of type design
GitHub Actions workflow currently:
- Relies only on prompt-based instructions
- No access to specialized agents
- Lower quality reviews compared to local
Proposed Solution: Vendor the Plugin
Instead of relying on marketplace URLs or remote installation, we can vendor the pr-review-toolkit directly into the repository and load it via the --plugin-dir flag.
Step 1: Add plugin to repository
# Copy the plugin from the official claude-code repo
mkdir -p .claude/plugins
# Clone just the pr-review-toolkit directoryThe plugin structure we need:
.claude/plugins/pr-review-toolkit/
├── .claude-plugin/
│ └── plugin.json
├── agents/
│ ├── code-reviewer.md
│ ├── code-simplifier.md
│ ├── comment-analyzer.md
│ ├── pr-test-analyzer.md
│ ├── silent-failure-hunter.md
│ └── type-design-analyzer.md
├── commands/
│ └── review-pr.md
└── README.md
Step 2: Update workflow to load the plugin
# .github/workflows/claude-code-review.yml
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# Load vendored plugin via --plugin-dir
claude_args: |
--plugin-dir .claude/plugins/pr-review-toolkit
--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),..."
prompt: |
You have access to the pr-review-toolkit agents. Use them for comprehensive review:
1. Use silent-failure-hunter to scan for error handling issues
2. Use type-design-analyzer to review any new TypeScript types
3. Use pr-test-analyzer to evaluate test coverage
4. Use code-reviewer for overall guideline adherenceAlternative: Standalone Agents (No Plugin Wrapper)
If --plugin-dir doesn't work with the action, we can copy just the agent markdown files:
.claude/agents/
├── code-reviewer.md
├── code-simplifier.md
├── comment-analyzer.md
├── pr-test-analyzer.md
├── silent-failure-hunter.md
└── type-design-analyzer.md
These would be available as standard agents without the plugin namespace.
Implementation Tasks
- Clone pr-review-toolkit from anthropics/claude-code/plugins/pr-review-toolkit
- Add to
.claude/plugins/ - Test
--plugin-dirflag works with claude-code-action - Update workflow to pass
--plugin-dirviaclaude_args - Update prompt to instruct Claude to use the agents
- Test on a real PR to verify agents are accessible
- Document the vendoring approach in CONTRIBUTING.md
Open Questions
- Does
--plugin-dirwork withclaude-code-action? Need to test. - Should we use git submodule (auto-updates) or vendored copy (stability)?
- Do we need to modify the plugin for CI context?
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementImprovement to existing featureImprovement to existing featuregood first issueGood for newcomersGood for newcomers