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

# Agent Plugins

> Bring Rootly incident response, on-call context, and retrospectives into Claude Code and Cursor with curated slash commands and automatic hooks.

## Introduction

Rootly agent plugins bring incident response, on-call context, and retrospective generation directly into the AI coding agents where engineers already work. Each plugin ships with curated slash commands and automatic hooks, all backed by [Rootly's hosted MCP service](/integrations/mcp-server).

## Why Use an Agent Plugin

Incident response has always required switching contexts: from your editor to Slack, to your incident tool, back to your terminal. By the time you've caught up on what's happening, you've already lost the thread of what you were building. Rootly's agent plugins close that gap — incident context, on-call state, and retrospective generation are available from the same environment where you write and ship code.

## Common Workflows

Across all agent plugins, you can:

* **Investigate incidents** — pull full incident context and find similar past incidents
* **Check on-call** — see current on-call state, upcoming handoffs, and health risk indicators
* **Draft status updates** — generate stakeholder-ready incident summaries
* **Run handoffs** — produce structured handoff documents for incident commander transitions
* **Generate retrospectives** — turn incident data into structured retrospectives
* **Run deploy checks** — analyze git diffs against past incidents to catch risky changes

## Claude Code

The Rootly Claude Code plugin brings incident response workflows directly into [Claude Code](https://claude.com/claude-code).

### Slash Commands

The plugin ships with nine slash commands:

| Command                  | Description                                                                                      |
| ------------------------ | ------------------------------------------------------------------------------------------------ |
| `/rootly:deploy-check`   | Analyzes your git diff against past incidents and warns if similar changes caused outages before |
| `/rootly:respond [id]`   | Pulls full incident context, finds similar past incidents, and shows who's on-call               |
| `/rootly:oncall`         | On-call dashboard with shift metrics, upcoming handoffs, and health risk indicators              |
| `/rootly:retro [id]`     | Generates a structured retrospective from incident data                                          |
| `/rootly:status`         | All services with active incidents grouped by severity                                           |
| `/rootly:ask [question]` | Natural language queries over your incident history                                              |
| `/rootly:brief [id]`     | Executive-ready incident summary for stakeholder updates                                         |
| `/rootly:handoff`        | Structured handoff document for incident commander transitions                                   |
| `/rootly:setup`          | First-run configuration and API token validation                                                 |

### Automatic Hooks

The plugin includes two automatic hooks:

* **Session-start token check** — verifies your Rootly API token is valid when Claude Code starts
* **Pre-commit / pre-push warning** — alerts you if there's an active critical incident in progress before you ship code

### Installation

Install the plugin through Rootly's custom plugin marketplace:

```bash theme={null}
/plugin marketplace add Rootly-AI-Labs/rootly-claude-plugin
/plugin install rootly@rootly-plugins
/reload-plugins
```

Then run the setup command — Claude handles OAuth2 login automatically:

```bash theme={null}
/rootly:setup
```

A browser window opens for you to authenticate with Rootly. No API token needed for MCP commands.

## Cursor

The Rootly Cursor plugin brings the same Rootly workflows into [Cursor](https://cursor.com), so incident investigation, on-call context, status drafting, handoffs, retrospectives, and deploy checks are available directly in the editor.

### Installation

Install the Rootly plugin from the public GitHub plugin source in the [`rootly-cursor-plugin`](https://github.com/Rootly-AI-Labs/rootly-cursor-plugin) repository.

### Configuration

Run the setup command in Cursor — OAuth2 login is handled automatically:

```bash theme={null}
/rootly-setup
```

**Fallback (environments without browser access):**

1. Generate an API token in **Account** > **Manage API keys** > **Generate New API Key**
2. Set it in the environment **before** launching Cursor:
   ```bash theme={null}
   export ROOTLY_API_TOKEN="<YOUR_ROOTLY_API_TOKEN>"
   ```
3. Restart Cursor so it inherits the variable
4. Run `/rootly-setup` to verify connectivity

## Authentication

Both plugins use **OAuth2** by default — your MCP client handles the login flow automatically when it connects to the Rootly MCP server. No API token needed.

For environments without browser access, use a Rootly API token as a fallback. Generate one in **Account** > **Manage API keys** > **Generate New API Key**.

Hook scripts (active-incident warnings on commit/push) also use API tokens since they run outside the MCP context.

<Callout icon="info-circle" color="#E0F2FE">
  All agent plugins are backed by Rootly's hosted MCP service. For direct MCP configuration with other clients (Windsurf, Gemini CLI, Claude Desktop, etc.), see the [MCP Server documentation](/integrations/mcp-server).
</Callout>

## Related

* [MCP Server](/integrations/mcp-server) — direct MCP configuration for any compatible client
* [Rootly CLI](/integrations/cli) — terminal-based access to Rootly resources
