{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/logo.png\" alt=\"Rootly for Claude Code\" width=\"500\" />\n</p>\n\n<h1 align=\"center\">Rootly for Claude Code</h1>\n\n<p align=\"center\">\n  <strong>Incident management meets AI-powered development.</strong><br />\n  Prevent, respond, and learn from incidents -- without leaving your terminal.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://rootly.com/integrations/claude\"><img src=\"https://img.shields.io/badge/rootly-integration-D97757?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgZmlsbD0id2hpdGUiLz48L3N2Zz4=\" alt=\"Rootly Integration\" /></a>\n  <a href=\"https://github.com/Rootly-AI-Labs/rootly-claude-plugin/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square\" alt=\"License\" /></a>\n  <a href=\"#installation\"><img src=\"https://img.shields.io/badge/claude--code-plugin-4A154B?style=flat-square\" alt=\"Claude Code Plugin\" /></a>\n</p>\n\n<br />\n\n---\n\n## Why\n\nYou're in the zone writing code. Then:\n\n- You `git push` and realize there's a SEV-1 in progress\n- You get paged and scramble between Slack, Datadog, and your incident tool\n- The retro after an incident takes hours to compile\n\n**This plugin brings Rootly's incident lifecycle into Claude Code** -- so you can assess deployment risk, investigate incidents, check on-call, and generate retrospectives from the same terminal where you write code.\n\n---\n\n## What You Get\n\n<table>\n<tr>\n<td width=\"50%\">\n\n### Before You Deploy\n```\n> /rootly:deploy-check\n```\nAnalyzes your git diff against past incidents. Warns you if similar changes caused outages before. Checks if on-call coverage exists.\n\n</td>\n<td width=\"50%\">\n\n### When You Get Paged\n```\n> /rootly:respond INC-4521\n```\nPulls full incident context, finds similar past incidents, suggests proven solutions, and shows who's on-call -- all in one brief.\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### During Your Shift\n```\n> /rootly:oncall\n```\nSee who's on-call across all schedules, shift metrics, upcoming handoffs, and health risk indicators.\n\n</td>\n<td width=\"50%\">\n\n### Service Health Check\n```\n> /rootly:status\n```\nQuick overview of all services with active incidents grouped by severity and age.\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### Stakeholder Communication\n```\n> /rootly:brief INC-4521\n```\nGenerate executive-friendly incident summaries with impact, timeline, and current status for stakeholder updates.\n\n</td>\n<td width=\"50%\">\n\n### Shift Handoffs\n```\n> /rootly:handoff\n```\nCreate structured handoff documents for incident commanders or on-call transitions with context and next steps.\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### Ask Questions\n```\n> /rootly:ask \"incidents this week\"\n```\nNatural language queries about your incident data, on-call schedules, and service reliability patterns.\n\n</td>\n<td width=\"50%\">\n\n### After the Dust Settles\n```\n> /rootly:retro INC-4521\n```\nGenerates structured retrospectives from incident data: timeline, contributing factors, action items, and systemic patterns.\n\n</td>\n</tr>\n</table>\n\n## Installation\n\nYou can use this plugin in two ways:\n\n- **Marketplace install** for a persistent Claude Code installation\n- **Local `--plugin-dir` loading** for development and evaluation from source\n\n### Marketplace Install\n\nThis repository includes `.claude-plugin/marketplace.json`, so Claude Code can use the repo itself as a marketplace source.\n\n1. Add the marketplace:\n\n```text\n/plugin marketplace add Rootly-AI-Labs/rootly-claude-plugin\n```\n\n2. Open the plugin manager:\n\n```text\n/plugin\n```\n\n3. In the **Discover** tab, select `rootly` and install it to your preferred scope:\n\n- **User**: available across all your projects\n- **Project**: shared through this repository's `.claude/settings.json`\n- **Local**: only for you in this repository\n\n4. Reload plugins so the install takes effect immediately:\n\n```text\n/reload-plugins\n```\n\n5. Run setup -- Claude will automatically handle OAuth2 login when it connects to the MCP server:\n\n```text\n/rootly:setup\n```\n\nA browser window will open for you to log in to Rootly and grant access. No API token needed.\n\n### Local Source Loading\n\n#### Step 1: Clone the Plugin\n\n```bash\ngit clone https://github.com/Rootly-AI-Labs/rootly-claude-plugin.git\ncd rootly-claude-plugin\n```\n\n#### Step 2: Load It in Claude Code\n\n```bash\nclaude --plugin-dir .\n```\n\nClaude Code loads the plugin directly from this directory for the current session. This is the recommended flow for local development and evaluation. For a persistent install, use the marketplace flow above.\n\n#### Step 3: Verify\n\n```\n/rootly:setup\n```\n\n### Direct MCP Access\n\nThis repository is a Claude Code plugin. If you only want direct Rootly MCP access in Claude Desktop / Cowork, configure the MCP server separately:\n\n```json\n{\n  \"mcpServers\": {\n    \"rootly\": {\n      \"url\": \"https://mcp.rootly.com/mcp\"\n    }\n  }\n}\n```\n\nClaude will handle OAuth2 login automatically -- a browser window opens for you to authenticate with Rootly. No API token needed.\n\n---\n\n## Setup & Configuration\n\nAfter installation, run the setup command:\n```\n> /rootly:setup\n```\nFirst-time plugin setup with API token validation, service mapping, and quick-start guide.\n\n---\n\n## Authentication\n\n### OAuth2 (Recommended)\n\nMCP commands use OAuth2 automatically. When Claude connects to the Rootly MCP server, it handles the OAuth2 flow -- a browser window opens for you to log in and grant access. No configuration needed.\n\nTo re-authenticate, disconnect and reconnect the MCP server via `/mcp`.\n\n### API Token (Hook Scripts)\n\nHook scripts (active-incident warnings on commit/push) still use API tokens since they run outside the MCP context:\n\n```bash\n# Via plugin config (persistent)\n# Set ROOTLY_API_TOKEN in the plugin's userConfig prompt\n\n# Via env var (session-scoped)\nexport ROOTLY_API_TOKEN=\"your-token-here\"\n```\n\nGet a token from your Rootly dashboard under **Settings > API Keys**.\n\n---\n\n## Commands\n\n### Stable (inline, MCP-native)\n\n| Command | What It Does |\n|---------|-------------|\n| `/rootly:setup` | First-run configuration and connection check |\n| `/rootly:my` | Personal dashboard — your active incidents, action items, and upcoming on-call |\n| `/rootly:status [service]` | Service health overview — active incidents at a glance |\n| `/rootly:oncall [team]` | On-call dashboard with shift metrics |\n| `/rootly:alert [short-id]` | Triage a Rootly alert — events, group context, linked incident |\n| `/rootly:lookup [name]` | Look up a service, team, or catalog entity — owner, on-call, reliability |\n| `/rootly:trend [scope]` | 30-day reliability trend with prior-period comparison |\n| `/rootly:brief [id]` | Stakeholder summary for executives or customers |\n| `/rootly:handoff [id]` | Incident or on-call handoff documentation |\n| `/rootly:ask [question]` | Natural-language Q&A over your Rootly data |\n| `/rootly:action [list\\|add\\|done]` | Manage incident action items (write actions confirm before mutating) |\n| `/rootly:swap [date]` | Request someone cover one of your shifts (write, confirms first) |\n| `/rootly:cover [team]` | Offer to cover someone else's shift (write, confirms first) |\n| `/rootly:announce [id]` | Draft and post a stakeholder update on an incident (write, confirms first) |\n\n### Experimental (forked subagent — may not have MCP access in all contexts)\n\n| Command | What It Does |\n|---------|-------------|\n| `/rootly:respond [id]` | Deep incident investigation via the `incident-investigator` agent |\n| `/rootly:retro [id]` | Post-incident retrospective via the `retro-analyst` agent |\n| `/rootly:deploy-check` | Pre-deploy risk analysis via the `deploy-guardian` agent |\n\n> The experimental skills delegate to forked subagents. In some Claude Code contexts the subagent doesn't inherit the plugin's MCP server; when that happens it stops and reports rather than falling back to bash/curl (which would leak the API token). For reliable coverage of those workflows, prefer `/rootly:brief`, `/rootly:status`, and the inline alternatives above.\n\n### Natural Language Queries\n\n```\n/rootly:ask how many SEV-1 incidents did we have last month?\n/rootly:ask which service has the most incidents this quarter?\n/rootly:ask who's been on-call the most in the last 30 days?\n```\n\n---\n\n## Deep Investigation Agents\n\nWhen a slash command isn't enough, Claude automatically invokes specialized agents for deeper analysis:\n\n| Agent | Triggered When | What It Does |\n|-------|---------------|--------------|\n| **Incident Investigator** | You need root cause analysis beyond initial triage | Builds hypothesis trees, correlates alerts with code changes, traces causation chains |\n| **Deploy Guardian** | Multi-service deployments with cross-team impact | Maps blast radius across dependent services, evaluates downstream risk, builds coordination checklists |\n| **Retro Analyst** | You want to understand patterns across incidents | Clusters incidents by failure mode, calculates frequency trends, identifies systemic reliability issues |\n\n---\n\n## Automatic Hooks\n\nTwo lightweight hooks run in the background -- they **never block** your workflow:\n\n| Hook | When | What It Does |\n|------|------|--------------|\n| **Token check** | Session start | Validates your API token and nudges you to configure one if missing |\n| **Incident warning** | Before `git commit` / `git push` | Warns if there's an active critical incident -- so you don't deploy into a fire |\n\n---\n\n## Service Mapping\n\nMap your repository to Rootly services by creating `.claude/rootly-config.json`:\n\n```json\n{\n  \"services\": [\"auth-service\", \"auth-worker\"],\n  \"team\": \"platform-team\"\n}\n```\n\n`/rootly:setup` walks you through creating this. Without it, the plugin falls back to matching your git repo name against Rootly service names.\n\n---\n\n## Advanced\n\n<details>\n<summary><strong>Self-hosted Rootly</strong></summary>\n\n```bash\nexport ROOTLY_API_URL=\"https://rootly.internal.example.com\"\n```\n\nThis overrides the REST API base URL used by hook scripts. Configure the MCP endpoint separately in `.mcp.json`.\n</details>\n\n<details>\n<summary><strong>Local MCP server</strong></summary>\n\nReplace the HTTP transport in `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"rootly\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"rootly-mcp-server\", \"rootly-mcp-server\"],\n      \"env\": {\n        \"ROOTLY_API_TOKEN\": \"${user_config.ROOTLY_API_TOKEN}\"\n      }\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>CLI MCP setup</strong></summary>\n\n```bash\nclaude mcp add rootly --transport http https://mcp.rootly.com/mcp\n```\n\nOAuth2 login will be triggered automatically on first use.\n</details>\n\n<details>\n<summary><strong>Post-push deployment registration</strong></summary>\n\nAn optional script (`scripts/register-deploy.sh`) can register deployments with Rootly after `git push`. It is not enabled by default -- see the script header for hook configuration.\n</details>\n\n---\n\n## Troubleshooting\n\n| Problem | Fix |\n|---------|-----|\n| OAuth2 login doesn't open browser | Ensure your Rootly org has OAuth2 enabled. Try `/mcp` > disconnect > reconnect Rootly. |\n| \"No API token found\" (hook scripts) | This only affects commit/push warnings. Set `ROOTLY_API_TOKEN` in plugin config or env var. MCP commands use OAuth2 instead. |\n| MCP tools not responding | Disconnect and reconnect via `/mcp`, or reload with `/reload-plugins`. |\n| OAuth2 consent shows limited permissions | Your org's OAuth2 configuration may need updating -- contact your Rootly admin. |\n| Skills not appearing | Run `/reload-plugins`, then check the **Installed** tab in `/plugin`. |\n| Hook scripts not running | Run `chmod +x scripts/*.sh` and ensure `jq` or `python3` is available. |\n\n---\n\n## Architecture\n\nSee [ARCHITECTURE.md](ARCHITECTURE.md) for the full technical design: MCP integration, hook system, agent orchestration, and data flow.\n\n---\n\n## License\n\nApache 2.0 -- see [LICENSE](LICENSE).\n\n<p align=\"center\">\n  <sub>Built by <a href=\"https://rootly.com\">Rootly AI Labs</a></sub>\n</p>\n",
  "bytes": 12085,
  "sha": "ee21246d2c00e7b127f4602c28f324a1249b75f9220a43e5d502708d88fc7f0a",
  "repo_slug": "rootly-ai-labs/claude-rootly-plugin",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_rootly_ai_labs_claude_rootly_plugin_root_fea0d374/readme"
}