Claude Code Integration
Bring Octopus code reviews directly into Claude Code. Review PRs, auto-fix findings, and explore your codebase without leaving the terminal.
Overview
The Octopus plugin for Claude Code adds AI-powered code review as a native capability. It wraps the Octopus CLI so you can trigger reviews, fix findings, and interact with your codebase using natural language or slash commands.
Prerequisites
You need the Octopus CLI installed and authenticated before using the plugin.
1. Install the CLI
# macOS / Linux (x64 & ARM)
curl -fsSL https://octopus-review.ai/install.sh | sh
# Windows (PowerShell)
irm https://octopus-review.ai/install.ps1 | iex
# Windows ARM
npm install -g @octp/cli2. Authenticate
octopus login
# Or with a token
octopus login --token oct_your_token_here3. Verify
octopus whoamiInstall the Plugin
Install from the Claude Code Plugin Marketplace:
claude plugin install octopusOr from within a Claude Code session:
/plugin install octopusReview a Pull Request
Use the /review slash command to trigger a review on a pull request.
# Review current branch's PR (auto-detected)
/review
# Review by PR number
/review 42
# Review by URL
/review https://github.com/owner/repo/pull/42The review runs asynchronously. Once complete, findings appear as comments directly on the PR with severity levels:
Natural Language
You don't need to remember slash commands. Just ask Claude naturally and the plugin activates:
Autofix
The autofix skill scans your open PRs for unresolved octopus-review[bot] comments, presents them with a summary, and helps you fix them. Comments from other review tools (CodeRabbit, Greptile, etc.) are ignored.
# Trigger autofix
"Octopus autofix"
"Octopus fix"How it works
- Lists your open PRs and checks for
octopus-review[bot]comments - Skips PRs where the latest review shows 0 findings
- Presents a summary of actionable feedback and asks for confirmation
- Checks out each PR branch, applies fixes, and commits
- For valid suggestions: reacts with a thumbs up and replies with the fix
- For false positives: reacts with a thumbs down and explains why
- Pushes changes and posts a summary comment tagging @octopus
Autonomous Review-Fix Cycle
Combine the review and autofix skills for a fully autonomous workflow:
- Implement your feature or fix
- Ask:
"review my code" - Review findings are posted on the PR
- Ask:
"octopus fix" - Fixes are applied, pushed, and summarized on the PR
- Ask:
"review again"to verify
Repeat until the review comes back clean.
Other Capabilities
The plugin also supports these Octopus CLI commands:
octopus repo statusCheck indexing progress, analysis results, and auto-review status.
octopus repo indexTrigger code indexing for better review context.
octopus repo analyzeRun AI analysis to generate a codebase summary.
octopus repo chatInteractive Q&A about your codebase.
octopus usageCheck monthly token usage, spend limits, and credit balance.
Plugin Structure
The plugin is entirely Markdown-based with no compiled code. Claude Code reads these files and uses them as instructions.
.claude-plugin/
plugin.json # Plugin manifest
agents/
code-reviewer.md # Specialized code review agent
commands/
review.md # /review slash command
skills/
autofix/
SKILL.md # Autofix skill (scan PRs, fix review comments)
code-review/
SKILL.md # Code review skill (natural language triggers)Source Code
The plugin is open source. Contributions are welcome.
View on GitHub