agentleFS
kryptophonikkryptophonik/SRE-Skills/.claude/skills/sre-pagerduty-opsgenie/SKILL.md

sre-pagerduty-opsgenie

Skill4 starsChanged 25 days agoMITView on GitHub

Use for on-call, incident and handoff tasks in PagerDuty or Opsgenie: who is on call, open incidents/alerts, escalation policies, timelines, capped page counts. Writes need approval.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.

    line 12
  2. Distinctive:

    Never create test incidents on real services: Use a sandbox service / escalation policy.

    line 23
  3. Very specific:

    Use the bundled GET-only scripts.

    line 41
  4. Distinctive:

    Every script exits 2 with nothing on stdout when the key is missing, the region is wrong, the API is unreachable or it returns an HTTP …

    line 52
  5. Distinctive:

    If neither the MCP server nor the API keys are available, output the commands for the human and stop.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PagerDuty and Opsgenie

Safety gates (REQUIRED)

  1. Read-only diagnosis first.
  2. Propose each change with risk (low/med/high) and reversibility.
  3. Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
  4. Act only as approved, verify, and stop and escalate if anything gets worse.

Full rules: sre-safety-gates. Read-only MCP setup: sre-safety-gates/references/mcp.md.

Process skills: sre-incident-command, sre-oncall-handoff, sre-oncall-audit, sre-toil-review, sre-postmortem-templates. MCP setup detail: references/mcp-setup.md.

Rules

  • Confirm account and region before any write (US vs EU; which subdomain).
  • Never echo tokens or use curl -v (it prints auth headers). Use env vars.
  • Never create test incidents on real services. Use a sandbox service / escalation policy.

Writes needing approval

Acknowledge, resolve, reassign, add note, add responders, start incident workflow, create incident / trigger page, schedule overrides, status-page posts, team or service changes (create/update/delete), Opsgenie acknowledge/close/assign.

PagerDuty

MCP

  • Hosted MCP https://mcp.pagerduty.com/mcp (EU: https://mcp.eu.pagerduty.com/mcp) exposes read and write tools, e.g. manage_incidents (create/update/add_note/add_responders/start_workflow), manage_schedules (create_override), manage_status_pages, manage_teams (delete). It has no tool filtering: restrict it with a scoped OAuth client or a read-only user, and add Claude Code deny rules (sre-safety-gates/references/mcp.md). Source: https://support.pagerduty.com/main/docs/pagerduty-mcp-server
  • Auth: OAuth or header Authorization: Token token=<api-key>. No Dynamic Client Registration, so Claude Code OAuth needs a fixed clientId and callbackPort.
  • Archived local server (deprecated): package pagerduty-mcp, run uvx pagerduty-mcp, env PAGERDUTY_USER_API_KEY; read-only unless --enable-write-tools.

REST (read-only)

Env (one set for scripts and snippets): PD_API_KEY (read-only REST key), PD_REGION=us|eu, OG_API_KEY, OG_REGION=us|eu, PD_ROUTING_KEY (Events API only). Hosts and auth: references/regions-and-auth.md.

Use the bundled GET-only scripts. They send keys over stdin, retry HTTP 429, and cap pagination at MAX_PAGES (default 20 pages of 100):

bash scripts/pd_oncall.sh                                              # who is on call now
bash scripts/pd_incidents.sh --status triggered --status acknowledged  # open incidents (table)
bash scripts/pd_incidents.sh --since <ISO8601> --until <ISO8601> --json > "$W/pages.jsonl" && grep -c . "$W/pages.jsonl"   # page count; W="$(mktemp -d)"
bash scripts/pd_audit_schedules.sh --since <ISO8601> --until <ISO8601>  # see sre-oncall-audit
bash scripts/og_alerts.sh --query 'status:open'
bash scripts/og_oncall.sh --schedule <schedule-name>

Every script exits 2 with nothing on stdout when the key is missing, the region is wrong, the API is unreachable or it returns an HTTP error. Treat that as "data unavailable", never as nobody on call or zero incidents.

Raw REST calls (paginated, projected and capped helpers, plus marked writes): references/api-reference-pagerduty.md, references/api-reference-opsgenie.md. Run the offline tests with bash scripts/tests/run_tests.sh.

Paging (Events API v2, approval required)

Paging uses the Events API v2 with an integration routing key (PD_ROUTING_KEY, not the REST key). Always set a dedup_key; sandbox services only for tests. Details: references/events-api-v2.md.

Opsgenie

Lifecycle: end of sale 2025-06-04; end of support 2027-04-05, when access is shut off and unmigrated data is deleted. Source: https://www.atlassian.com/licensing/opsgenie. Migration plan and export: references/opsgenie-migration.md (time-bounded).

Auth Authorization: GenieKey $OG_API_KEY; OG_HOST always includes the scheme (https://api.opsgenie.com, EU https://api.eu.opsgenie.com). Acknowledge/close are writes and async (202 + requestId; check /v2/alerts/requests/<requestId>). The /v1/incidents?query= endpoint is unverified.

If neither the MCP server nor the API keys are available, output the commands for the human and stop.

Output

  • On-call names, incident/alert lists with IDs and links, timelines for postmortems, paginated page counts for handoff/toil

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.