
PagerDuty
PluginPagerDuty 官方插件:结合服务的历史事故与变更事件分析当前 git diff,在提交前给出 0–5 级风险评分与改进建议,并可创建 PagerDuty SRE Agent 技能(需加入抢先体验计划)。需要 PagerDuty API Token。
PagerDuty Claude Code Plugins
PagerDuty's open source Claude Code plugins that bring operational intelligence into your development workflow.
Before you start: one-time admin step
A PagerDuty account admin must install the Claude Code app once per PagerDuty account. Until they do, nobody in the account can use this plugin.
Install the Claude Code app in PagerDuty (requires an account admin)
If the app is not installed, sign-in fails after you log in, with an error saying the app is not installed in the account. Send the link above to your PagerDuty admin, then try again.
With the admin step you do not need a client ID or client secret. See the CIMD clients guide for details.
Can't get the app installed?
Register your own OAuth app in PagerDuty and connect with its client ID and secret instead.
-
Register an OAuth app in PagerDuty with redirect URL
http://localhost:8080/callback. -
Add the server with your client ID and secret:
MCP_CLIENT_SECRET=<client-secret> claude mcp add-json pagerduty \ '{"type":"http","url":"https://mcp.pagerduty.com/mcp?tool_groups=full-tools,ai-agents","oauth":{"clientId":"<client-id>","callbackPort":8080}}' --client-secret -
Run
/mcp, selectpagerduty, and complete the browser sign-in.
See Use an OAuth client ID and client secret. Never put the client secret in a file in your repository.
Available plugins
| Plugin | Description |
|---|---|
| pre-commit-risk-scoring | Pre-commit risk assessment using PagerDuty incident history, change event correlation, and git diff analysis |
| investigate | Investigate a PagerDuty incident with the PagerDuty SRE Agent |
| on-call-handoff | Summarize incidents and on-call state for an on-call handoff |
Getting started
Prerequisites
- Claude Code v1.0.33 or later
1. Add the marketplace
Run this once in any Claude Code session:
/plugin marketplace add pagerduty/claude-code-plugins
2. Browse and install plugins
Open the plugin manager and go to the Discover tab to browse available plugins:
/plugin
Or install a plugin directly:
/plugin install pagerduty@pagerduty-claude-code-plugins
3. Sign in to PagerDuty
The plugin bundles one MCP server, pagerduty, pointing at the PagerDuty-hosted MCP server (https://mcp.pagerduty.com/mcp?tool_groups=full-tools,ai-agents). Git commit history is read directly from the local repository.
Once your admin has completed the one-time admin step, run /mcp, select pagerduty, and complete the browser sign-in.
Troubleshooting
| Symptom | Fix |
|---|---|
| Sign-in fails after login with an error that the app is not installed in the account | A PagerDuty account admin must install the Claude Code app once, then sign in again from /mcp. |
401 / unauthorized responses | Your session expired or was revoked. Run /mcp, select pagerduty, and re-authenticate. |
429 rate limit | The PagerDuty API is rate limiting requests. Wait a minute and retry. |
Restricting scopes
The Claude Code app requests all scopes. If your organization wants narrower scopes, register your own Scoped OAuth app and connect with it as described in Can't get the app installed?.
Set up for your team
You can configure a repository so team members are automatically prompted to add this marketplace when they trust the project folder. Add the following to your project's .claude/settings.json:
{
"extraKnownMarketplaces": {
"pagerduty-claude-code-plugins": {
"source": {
"source": "github",
"repo": "pagerduty/claude-code-plugins"
}
}
}
}
To also auto-enable specific plugins for the project:
{
"extraKnownMarketplaces": {
"pagerduty-claude-code-plugins": {
"source": {
"source": "github",
"repo": "pagerduty/claude-code-plugins"
}
}
},
"enabledPlugins": {
"pagerduty@pagerduty-claude-code-plugins": true
}
}
Managing plugins
Update the marketplace to get the latest plugins:
/plugin marketplace update pagerduty-claude-code-plugins
Disable a plugin without uninstalling:
/plugin disable pagerduty@pagerduty-claude-code-plugins
Uninstall a plugin:
/plugin uninstall pagerduty@pagerduty-claude-code-plugins
Plugin: Pre-Commit Risk Scoring
A plugin that assesses pre-commit risk by correlating PagerDuty incident history with current code changes.
The /pagerduty:pre-commit-risk-scoring command gathers PagerDuty incident data for your service, analyzes your current git diff, and looks for correlations between the areas you are changing and areas that have historically caused incidents. It surfaces active incidents, recent incident patterns, structural risk signals in the diff, and actionable recommendations.
Usage
With uncommitted changes in your working tree:
/pagerduty:pre-commit-risk-scoring
To assess every commit on your current branch against its base branch, as a reviewer would see it:
/pagerduty:pre-commit-risk-scoring --branch
If there are no uncommitted changes and you're on a feature branch, the command switches to branch mode automatically. After an assessment of uncommitted changes, it offers to assess the whole branch too.
In branch mode, the base branch is detected from the open pull request (via the GitHub MCP server if you have it installed, otherwise the gh CLI), then the upstream tracking branch, then main, master or develop. If none of these work, the command asks you.
On first run, the plugin resolves your repository to a PagerDuty service through a fallback chain:
- Explicit argument passed at invocation (one-time override, not cached)
- Cached config in
.pagerduty/pagerduty-risk-config.json - Backstage
catalog-info.yamlannotation (pagerduty.com/service-id) - Auto-detection by matching the repository name against PagerDuty services
- Manual input via interactive prompt
The resolved mapping is saved to .pagerduty/pagerduty-risk-config.json for subsequent runs.
If you used an earlier version of the plugin, a mapping saved in .claude/risk-config.json is copied to the new location on the next run. The old file is left in place, and you can delete it.
You can pass a service name as a one-time override. This takes highest priority, skipping cache and auto-detection, and will not update .pagerduty/pagerduty-risk-config.json. It can be combined with --branch:
/pagerduty:pre-commit-risk-scoring my-service-name
/pagerduty:pre-commit-risk-scoring --branch my-service-name
Output
The command produces a structured risk assessment containing:
- Active incidents for the mapped service (highest-priority signal)
- Incident history summary over the last 90 days
- Change analysis with file-level and structural risk signals
- Correlation findings between current changes and past incidents
- Risk score from 0 (no risk) to 5 (critical), based on incident correlation and change analysis
- Recommendations based on identified risk factors
Changing the mapped service
Delete .pagerduty/pagerduty-risk-config.json and re-run /pagerduty:pre-commit-risk-scoring to pick a different service.
Plugin structure
.claude-plugin/
marketplace.json # Marketplace registry
plugin.json # Plugin metadata
commands/
pre-commit-risk-scoring.md # Slash command definitions
investigate.md
on-call-handoff.md
.mcp.json # PagerDuty MCP server declaration
MCP servers
| Server | Declared in | Tools used |
|---|---|---|
| PagerDuty | .mcp.json (plugin-local) | browse_services (list, get), browse_incidents (list, list_notes), browse_change_events (list_service) |
| GitHub (optional) | Your own Claude Code config | list_pull_requests, to find the base branch in branch mode. Falls back to the gh CLI and git if unavailable |
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
相關資源

Engineering
Plugin软件工程日常插件:生成站会汇报、评审代码、结构化调试、写架构决策记录、处理线上故障与上线前检查。Anthropic 官方出品,主要面向 Cowork,也可在 Claude Code 使用。
anthropics/knowledge-work-plugins37.4k
GitLab
Plugin接入 GitLab 官方远程 MCP 服务(Beta),让 Claude 操作仓库、合并请求、CI/CD 流水线、议题与 Wiki;连接 GitLab.com,需在顶级群组开启 MCP 访问并经浏览器 OAuth 授权。收录于 Anthropic 官方插件市场。
anthropics/claude-plugins-official48.9k
GitHub
Plugin接入 GitHub 官方远程 MCP 服务器,在 Claude Code 里管理 Issue 与 PR、评审代码、搜索仓库并调用 GitHub API;需要配置 GITHUB_PERSONAL_ACCESS_TOKEN。
anthropics/claude-plugins-official48.9k
wshobson/agents
Plugin多宿主插件市场,含 90 余个单一用途插件、200 余个子代理与 180 余个技能,覆盖语言开发、运维、安全、数据与多代理编排;安装插件时只加载该插件的内容。
wshobson/agents43.1k
Claude Skills (Fullstack Dev Skills)
Plugin把 60 多个全栈专家技能打包成一个插件:Python、TypeScript、Go、Rust、Java 等 12 种语言专家,以及 React、Django、Spring Boot 等框架专家,按请求自动激活;另含对接 Jira / Confluence 的项目工作流命令(需 Atlassian MCP)。
Jeffallan/claude-skills12.6k
Azure Skills Plugin
Plugin微软官方 Azure 插件:打包 azure-prepare、azure-deploy、azure-diagnostics、azure-cost 等二十多个技能,并接入 Azure MCP 与 Foundry MCP,可查询资源、估算成本、部署与排障。需 Azure 订阅并用 az 登录。
microsoft/azure-skills1.7k