The cubic Claude plugin is open source. View the code and contribute at
github.com/mrge-io/cubic-claude-plugin.
Prerequisites
Before installing the plugin, ensure you have:- Claude Code v1.0.33 or later - The plugin requires Claude Code’s marketplace support
- A cubic account - Sign up at cubic.dev if you don’t have one
- Active installation - Your repository must be connected to cubic
- API key - Generate a cubic API key (starts with
cbk_) from Settings → Integrations → MCP Configuration - cubic CLI (optional) - Required for
/cubic:run-reviewcommand. Install viacurl -fsSL https://cubic.dev/install | bash
Installation
Add the cubic marketplace
Run the following command in Claude Code to add the cubic plugin marketplace:
Team installation
To automatically install the plugin for all team members, add it to your project’s.claude/settings.json:
Setup
Generate an API key
Go to Settings → Integrations → MCP Configuration in cubic and click Generate API Key. Copy the key immediately — it’s only shown once.
API keys are personal to each user. Each team member generates their own key, which grants access only to repositories they’re authorized to view. Don’t share keys between team members.
Set the environment variable
Add your API key to your shell configuration:Add this to your
~/.zshrc, ~/.bashrc, or equivalent to persist across sessions.Commands
The plugin provides five commands for accessing cubic features:| Command | Description |
|---|---|
/cubic:comments [pr-number] | Show cubic’s review comments on the current PR (auto-detects branch) |
/cubic:run-review [flags] | Run a local cubic AI code review on uncommitted changes or branch diff |
/cubic:wiki [page-name] | Browse AI-generated codebase documentation |
/cubic:scan [scan-id] | View codebase security scan results and issues |
/cubic:learnings [learning-id] | Show team code review patterns and preferences |
Examples
Skills
The plugin includes four skills that activate automatically based on context:| Skill | Activates When | Purpose |
|---|---|---|
review-issues | Working on a PR branch or fixing review comments | Surfaces relevant cubic review issues for files you’re editing |
codebase-context | Asking about architecture or how things work | Queries the cubic AI Wiki for architectural context |
review-patterns | Writing or reviewing code | Pulls team learnings to apply coding conventions |
env-setup | Setting up cubic or pasting an API key | Detects OS and shell, persists API key to shell config |
codebase-context skill automatically queries your wiki for relevant pages.
MCP tools
The plugin connects to cubic’s MCP server, which provides nine tools for accessing cubic data:Tool categories
- Wiki tools -
list_wikis,list_wiki_pages,get_wiki_page - Codebase scan tools -
list_scans,get_scan,get_violation - Review learning tools -
list_learnings,get_learning - PR review tools -
get_pr_issues
Troubleshooting
Plugin not found
Plugin not found
Verify that:
- You’re running Claude Code v1.0.33 or later
- The marketplace was added correctly:
/plugin marketplace list - The marketplace URL is
mrge-io/cubic-claude-plugin
Authentication errors
Authentication errors
Check that: - Your
CUBIC_API_KEY environment variable is set - The API key starts with cbk_ -
The API key hasn’t been revoked in cubic settings - You restarted Claude Code after setting the
environment variableCommands not available
Commands not available
Check that: - Run
/plugin list to verify the plugin is installed - Check that the plugin shows
as “active” in the list - Try reinstalling: /plugin uninstall cubic@cubic then /plugin install cubic@cubic/cubic:run-review command fails
/cubic:run-review command fails
The Verify installation with
/cubic:run-review command requires the cubic CLI to be installed. Install it via:cubic --version.