Skip to main content
The cubic Claude plugin brings cubic’s AI code review insights, codebase documentation, and team learnings directly into your Claude Code workflow. Access review comments, run local reviews, query your AI wiki, and apply team conventions without leaving your editor. The plugin connects to cubic’s MCP server to surface contextual information as you work — review issues appear when you’re on a PR branch, wiki pages load when you ask about architecture, and team learnings apply when you’re writing code.
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-review command. Install via curl -fsSL https://cubic.dev/install | bash

Installation

1

Add the cubic marketplace

Run the following command in Claude Code to add the cubic plugin marketplace:
/plugin marketplace add mrge-io/cubic-claude-plugin
2

Install the plugin

Install the cubic plugin:
/plugin install cubic@cubic

Team installation

To automatically install the plugin for all team members, add it to your project’s .claude/settings.json:
{
  "extraKnownMarketplaces": {
    "cubic": {
      "source": {
        "source": "github",
        "repo": "mrge-io/cubic-claude-plugin"
      }
    }
  },
  "enabledPlugins": {
    "cubic@cubic": true
  }
}
Commit this file to your repository. When team members open the project in Claude Code and trust the repository, they’ll be prompted to install the plugin.

Setup

1

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.
2

Set the environment variable

Add your API key to your shell configuration:
export CUBIC_API_KEY=cbk_your_api_key_here
Add this to your ~/.zshrc, ~/.bashrc, or equivalent to persist across sessions.
Or tell Claude Code “set up my cubic key” and paste your key. The env-setup skill auto-detects your OS and shell (macOS, Linux, and Windows via Git Bash) and saves the key to the correct config file.
3

Restart Claude Code

Restart Claude Code for the environment variable to take effect. If you used the env-setup skill, the key is already active in the current session.

Commands

The plugin provides five commands for accessing cubic features:
CommandDescription
/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

# View review comments for the current PR
/cubic:comments

# View review comments for a specific PR
/cubic:comments 123

# Run a review on uncommitted changes
/cubic:run-review

# Run a review comparing against main branch
/cubic:run-review --base main

# List available wiki pages
/cubic:wiki

# View a specific wiki page
/cubic:wiki authentication-system

# List recent codebase scans
/cubic:scan

# View a specific scan
/cubic:scan scan_abc123

# List team learnings
/cubic:learnings

# View a specific learning
/cubic:learnings learning_xyz789

Skills

The plugin includes four skills that activate automatically based on context:
SkillActivates WhenPurpose
review-issuesWorking on a PR branch or fixing review commentsSurfaces relevant cubic review issues for files you’re editing
codebase-contextAsking about architecture or how things workQueries the cubic AI Wiki for architectural context
review-patternsWriting or reviewing codePulls team learnings to apply coding conventions
env-setupSetting up cubic or pasting an API keyDetects OS and shell, persists API key to shell config
Skills run in the background and provide contextual information without explicit commands. For example, when you ask “How does authentication work?”, the 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
For complete documentation on MCP tools, parameters, and workflows, see the MCP server docs.

Troubleshooting

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
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 variable
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
The /cubic:run-review command requires the cubic CLI to be installed. Install it via:
curl -fsSL https://cubic.dev/install | bash
Verify installation with cubic --version.