> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubic.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills

> Review local changes, fix PR comments, and use cubic codebase context from your coding agent.

cubic skills give your coding agent instructions for reviewing code, handling PR comments,
and using your team's codebase context. Ask for a task in natural language, and your agent
can select the relevant skill. You can also name the skill explicitly.

Skills run in your coding agent. They use the [cubic CLI](/ide/cli-review) for local reviews,
the GitHub CLI for PR comment workflows, and the [MCP server](/ide/mcp-server) for wikis,
codebase scan findings, and review learnings.

## Before you start

Set up the tools needed for the workflows you want to use:

| Workflow                                  | Requirement                                                                                                                 |
| :---------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- |
| Local review                              | Install the [cubic CLI](/ide/cli-review#get-started) and sign in                                                            |
| PR comments and PR review loops           | Install the [GitHub CLI](https://cli.github.com), sign in with `gh auth login`, and open your repository locally            |
| Wiki, codebase scans, and review patterns | [Connect cubic's MCP server](/ide/mcp-server#install-and-log-in) with OAuth using an account that can access the repository |

<Tip>
  For local reviews, we recommend [connecting ChatGPT (Codex) or Claude
  Code](/ide/cli-review#bring-your-coding-subscription) for access to more capable review models.
  You can also use cubic's included model.
</Tip>

## Install skills

With Node.js and npm installed, run:

```bash theme={null}
npx @cubic-plugin/cubic-plugin install --skills-only
```

The installer detects supported agents from their configuration files in your home directory
and installs skills and commands for each one it finds. `--skills-only` leaves your MCP
configuration unchanged; authenticate MCP separately for the workflows that need it.

To choose one agent explicitly, add `--to`. For example, to install for Codex:

```bash theme={null}
npx @cubic-plugin/cubic-plugin install --to codex --skills-only
```

Supported targets are `claude`, `codex`, `cursor`, `gemini`, `opencode`, `droid`, and `pi`.
Use `--to universal` for agents that read `~/.agents/skills`; this target is opt-in.

<Accordion title="Install through Claude Code's plugin marketplace">
  You can also install the cubic plugin from inside Claude Code:

  ```text theme={null}
  /plugin marketplace add mrge-io/skills
  /plugin install cubic@cubic
  ```

  This includes skills, namespaced slash commands, and the MCP connection. Run `/mcp`,
  choose cubic, and complete the browser sign-in flow.
</Accordion>

### Check the installation

Check the installer's summary for your target and any errors. Start a new agent session in
your repository, then ask:

```text theme={null}
Use cubic's run-review skill to review my changes.
```

With the cubic CLI installed and signed in, the agent should run a local review, group
findings by priority, and offer to fix them. If your working tree is clean, the skill reviews
your branch against its base.

## Prompts to start with

| Prompt                                           | What happens                                                                                                          |
| :----------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- |
| "Review my code"                                 | Runs a local review, shows findings, and offers to fix them                                                           |
| "Loop until clean"                               | Reviews, fixes, commits, and repeats using local or PR review; see [review loops](#review-loops)                      |
| "Check cubic comments"                           | Investigates unresolved PR threads, fixes worthwhile issues, commits and pushes changes, and resolves handled threads |
| "Show open codebase scan findings for this repo" | Lists scan findings through MCP                                                                                       |
| "Fix the codebase scan issues in ./scan.csv"     | Loads full reports, checks the current code, and fixes the requested issues                                           |
| "How does authentication work in this repo?"     | Looks up cubic's AI Wiki to explain the codebase                                                                      |
| "What does this team care about in reviews?"     | Retrieves team review learnings                                                                                       |

### PR comments

"Check cubic comments" and the `comments` command both handle review feedback. They wait for
the review to finish, inspect unresolved GitHub review threads, apply and verify worthwhile
fixes, then commit and push if code changed. They resolve handled threads, including findings
confirmed as false positives or already fixed, without posting replies by default.

To only read cubic's open findings, ask your agent to use the MCP tool directly:

```text theme={null}
Use cubic's get_pr_issues tool to summarize the open findings on this PR. Do not change anything.
```

### Review loops

The `cubic-loop` skill uses PR review when the current branch has an open PR or you request
PR mode. Otherwise, it runs local CLI reviews. It commits fixes between iterations and pushes
the branch in PR mode.

The default limit is five iterations. The loop can stop earlier when no issues remain or
when only low-priority P3 findings remain. Check the final summary for remaining findings.

### Codebase scan findings

You can provide a repository, a scan issue ID, or an exported CSV. Listing findings does not
change your code. When you request fixes, the skill verifies each finding against your current
checkout before editing. Commits, pushes, PR creation, and scan triage updates require a
separate request.

## Available skills

| Skill                  | Purpose                                                                |
| :--------------------- | :--------------------------------------------------------------------- |
| `run-review`           | Review uncommitted changes or the current branch through the cubic CLI |
| `check-pr-comments`    | Investigate and handle unresolved PR review feedback                   |
| `cubic-loop`           | Repeat review and fixes up to an iteration limit                       |
| `codebase-context`     | Retrieve architectural context from cubic's AI Wiki                    |
| `review-patterns`      | Apply team review learnings while writing or reviewing code            |
| `handle-codebase-scan` | Inspect scan findings and fix requested issues                         |

## Slash commands

Command names depend on the agent and how you installed cubic:

| Installation                                                      | Example             |
| :---------------------------------------------------------------- | :------------------ |
| Claude Code plugin marketplace                                    | `/cubic:run-review` |
| Claude Code with the CLI installer                                | `/run-review`       |
| Cursor, OpenCode, Droid, Gemini CLI, or Pi with the CLI installer | `/cubic-run-review` |

In Codex, use the installed skills by name or describe the task in natural language.
[Custom prompt slash commands are deprecated](https://developers.openai.com/codex/custom-prompts).

The same naming pattern applies to these commands:

| Command                   | What it does                                                                                                                                            |
| :------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `run-review [flags]`      | Run a local review and offer to fix findings; accepts cubic CLI review flags                                                                            |
| `comments [pr-number]`    | Investigate PR comments, fix worthwhile issues, commit and push changes, and resolve handled threads; detects the PR from the current branch if omitted |
| `wiki [page-name]`        | Browse codebase documentation                                                                                                                           |
| `scan [issue-id]`         | List codebase scan findings or read a full issue report                                                                                                 |
| `learnings [learning-id]` | Read team review learnings                                                                                                                              |

## Troubleshooting

<AccordionGroup>
  <Accordion title="The installer did not detect my agent">
    Start the agent once so it creates its configuration, or specify the target explicitly with
    `--to`, for example `--to codex`.
  </Accordion>

  <Accordion title="My agent cannot find the skills">
    Check the installer's summary for the target you use, then restart your agent session. If
    needed, reinstall for that target with `--force`:

    ```bash theme={null}
    npx @cubic-plugin/cubic-plugin install --to codex --skills-only --force
    ```
  </Accordion>

  <Accordion title="A workflow cannot access its tools">
    For local reviews, complete [CLI setup](/ide/cli-review#get-started). For PR comment
    workflows, run `gh auth status`. For wiki, scan, or learning requests, check your agent's
    MCP connection and complete OAuth if prompted.
  </Accordion>
</AccordionGroup>

See [Local CLI review](/ide/cli-review#review-with-your-coding-agent) for copy-paste
`AGENTS.md` and `CLAUDE.md` workflow instructions.
