
code-review
Claude-powered code review with full codebase awareness using RAG
- version
- 1.0.0
Install
/plugin install code-review@workflows-marketplaceRun it inside Claude Code after adding the marketplace with /plugin marketplace add Natural-Heroes/workflows.
Contents
Discovered from sourceCommands 2
Review Status
Check the status of recent code reviews for the current repository.
Instructions
-
Get the current repository information:
git remote get-url origin -
Extract owner and repo from the git remote URL
-
Check for any open PRs with review comments:
gh pr list --json number,title,state,reviews,comments --limit 5 -
For each PR, show:
- PR number and title
- Number of review comments from the bug bot
- Status of any fixes (committed or pending)
-
Format the output as a summary table
Expected Output
Present a summary showing:
- Recent PRs and their review status
- Number of issues found per PR
- Whether fixes have been applied
Trigger Review
Manually trigger a code review on the current branch.
Instructions
-
Get the current repository and branch information:
git remote get-url origin git branch --show-current -
Check if there's an open PR for this branch:
gh pr view --json number,url,state 2>/dev/null || echo "NO_PR" -
If there's an open PR:
- Note the PR number
- Inform the user that a review will be triggered via the webhook
-
If there's no open PR:
- Ask if the user wants to create one
- If yes, help them create a draft PR
-
To trigger the review webhook manually (if needed):
- The webhook endpoint is configured in the GitHub App
- Reviews are automatically triggered on PR open/sync events
- For manual trigger, user can re-push or use the GitHub UI to re-request review
Notes
- Reviews are automatically triggered when PRs are opened or updated
- The
/fixcommand can be used in review comments to auto-fix issues - Full codebase context is used for intelligent reviews
Agents 1
Code Review Plugin
Claude-powered code review with full codebase awareness using RAG (Retrieval Augmented Generation).
Features
- Codebase-Aware Reviews: Uses Qdrant vector database to search for relevant context
- Smart Bug Detection: Finds bugs by understanding how code is used across the codebase
- Auto-Fix Support: Reply
/fixto any bug comment to automatically apply fixes - Multi-Language: Supports TypeScript, JavaScript, and Python
Architecture
The code review system uses GitHub Actions workflows with a self-hosted Qdrant instance:
GitHub PR → Actions Workflow → Claude Agent → Review Comments
↓
Qdrant (RAG)
Commands
/code-review:review-status
Check the status of recent code reviews for the current repository.
/code-review:trigger-review
Manually trigger a code review on the current branch (requires open PR).
How It Works
- On PR Open/Update: GitHub Actions workflow triggers the review agent
- Context Gathering: Agent searches Qdrant for relevant code (callers, types, tests)
- Analysis: Claude analyzes changes with full codebase context
- Comments: Issues are posted as inline PR comments with severity levels
Severity Levels
- 🔴 Critical - Bugs that will cause crashes, data loss, or security issues
- 🟠 Warning - Issues that may cause problems under certain conditions
- 🟡 Suggestion - Improvements that aren't blocking
Auto-Fix
Reply to any review comment with /fix to automatically apply a fix:
/fix
Or provide additional instructions:
/fix Use a try-catch instead of optional chaining
Setup
1. Deploy Qdrant
Deploy Qdrant on Dokploy using the docker-compose in review-agent/:
cd review-agent
docker-compose up -d qdrant
2. Index Your Repository
Run the indexer to create embeddings for your codebase:
export GITHUB_TOKEN=ghp_...
export VOYAGE_API_KEY=pa-...
export QDRANT_URL=https://qdrant.your-domain.com
python -m review_agent.services.indexer.main owner repo --ref main
3. Add Workflows to Your Repository
Copy the caller templates to your repository's .github/workflows/:
# .github/workflows/code-review.yml
name: Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review]
jobs:
review:
uses: Natural-Heroes/workflows/.github/workflows/code-review.yml@main
with:
qdrant_url: https://qdrant.your-domain.com
secrets:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }}
4. Set Repository Secrets
Add these secrets to your repository:
ANTHROPIC_API_KEY- Claude API keyVOYAGE_API_KEY- Voyage AI key for embeddings
The GITHUB_TOKEN is automatically provided by GitHub Actions.
Sponsors
Details
- Marketplace
- Natural-Heroes/workflows
- Source
- plugins/code-review
- Author
- Natural Heroes
- Category
- Development