
pagerduty-api
Query and manage PagerDuty — find out who's on call, list and manage incidents, read escalation policies and schedules, trace who got paged and why, acknowledge/resolve/snooze/escalate incidents, and create or update services. Use this whenever the user mentions PagerDuty, on-call, paging, escalation, an incident ID like PXXXXXX or Q..., asks "who's on call", "page the on-call", "ack this incident", "why wasn't I paged", or pastes a pagerduty.com URL — even if they don't say "API". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.
- Installs
- 41
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/anthropics/claude-tag-plugins --skill pagerduty-api- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pagerduty-api automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
PagerDuty exposes two distinct APIs:
- REST API at
https://api.pagerduty.com— read/manage everything (incidents, on-call, schedules, escalation policies, services, users, log entries). - Events API v2 at
https://events.pagerduty.com— trigger/acknowledge/resolve alerts programmatically. Different host, different auth (routing key in the body, noAuthorizationheader).
Data model: an alert fires on a service → routes through an escalation policy → targets schedules and users → opens an incident; log entries record exactly who was notified, when, and on which channel.
Request setup
Authentication is handled by the runtime — credentials are injected into outbound requests to this
API, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.
Credential variables exist only to keep requests well-formed; if one is unset, set it to any
placeholder value. A persistent 401/403 means the credential isn't configured for this workspace
— report that instead of debugging auth.
REST API (api.pagerduty.com) — header on every request is Authorization: Token token=<t>
(neither Bearer nor Basic):
export PAGERDUTY_TOKEN="placeholder" # injected by the runtime; any value works
Events API v2 (events.pagerduty.com) — addressed by an integration routing key (32 hex
chars) in the request body. No Authorization header.
export PD_ROUTING_KEY="placeholder" # injected by the runtime; any value works
Sanity check — confirm the workspace is wired up:
curl -sS -w '\nHTTP %{http_code}\n' "https://api.pagerduty.com/users/me" \
-H "Authorization: Token token=${PAGERDUTY_TOKEN}" \
-H "Content-Type: application/json"
200 → wired up; pipe through jq '.user | {id, name, email}'. 401/403 → credential not
configured (the body is often empty, which is why the status code is printed). /users/me works
only on user tokens; account-level tokens can verify with /abilities.
Helper used below (optional):
pagerduty() { curl -sS -g "$@" -H "Authorization: Token token=${PAGERDUTY_TOKEN}" \
-H "Accept: application/vnd.pagerduty+json;version=2" -H "Content-Type: application/json"; }
The -g matters: PagerDuty's array params use brackets (statuses[]=triggered), which older curl
glob-expands and fails on — see Pagination.
Response codes & bodies — applies to every recipe below:
- REST mutations:
200update,201create.401returns an empty body — when a write looks like it silently did nothing, check the HTTP status (-w '%{http_code}'). - Events v2 enqueue:
202accepted; a bad routing key is400with a plain-text bodyInvalid routing key(not JSON — don't pipe tojq). - Any reference to another object in a request body needs the form
{"id": "<id>", "type": "<x>_reference"}— omittingtypeis a400.
Core operations
1. Who's on call (scripts/pd_oncall.sh)
Answer "who is on call" through the bundled script (path is relative to this skill's directory):
it resolves service and user names to ids, queries /oncalls with the bracketed array filters,
pages on offset/limit while more is true, and emits TSV or JSONL.
scripts/pd_oncall.sh --service checkout --earliest
scripts/pd_oncall.sh --user alice@example.com --at 2026-06-01T09:00:00Z --json
--service NAME|IDscopes to one service. A value matching^P[A-Z0-9]{5,7}$is used as the id; anything else is looked up via/services?query=. The service's escalation policy is then passed asescalation_policy_ids[]—/oncallshas no service filter of its own.--policy ID/--schedule IDfilter directly (repeatable).--user QUERYresolves a name or email via/users?query=touser_ids[](repeatable). Name lookups (here and--service) must match exactly one result — pass the id for reliability.--at TIMEasks who is on call at an ISO-8601 instant (sets bothsinceanduntil);--earliestreturns only the next-up entry per policy.--limit Ncaps total entries (default 100,0= everything);--page-size Nsets the per-page size (max 100).--jsonemits one JSON object per entry instead of TSV with headerlevel, user, policy, schedule, until. Resolved ids and counts go to stderr. Instance specifics come fromPAGERDUTY_TOKENabove.- Exit codes:
0success,1request failed, API error, or bad arguments — the API's ownerror.code/error.messageis on stderr (a401body is empty, so the HTTP status is printed instead).
If the script errors, read it — it's plain curl + jq — and debug against references/api.md.
2. List open incidents
pagerduty "https://api.pagerduty.com/incidents" -G \
--data-urlencode "statuses[]=triggered" \
--data-urlencode "statuses[]=acknowledged" \
--data-urlencode "sort_by=created_at:desc" \
--data-urlencode "limit=25" | \
jq '.incidents[]? | {id, incident_number, title, status, urgency, service: .service.summary, created_at}'
Time-scope with since=/until= (ISO-8601); filter with service_ids[]=, team_ids[]=,
urgencies[]=high.
3. Get one incident
pagerduty "https://api.pagerduty.com/incidents/<incident_id>" | \
jq '.incident | {id, title, status, urgency, assignments, escalation_policy: .escalation_policy.summary}'
<incident_id> is the alphanumeric ID (P.../Q...), not incident_number. To look up by
number, list with date_range=all and filter client-side.
4. Who actually got paged? (log entries)
pagerduty "https://api.pagerduty.com/incidents/<incident_id>/log_entries" -G \
--data-urlencode "is_overview=false" | \
jq '.log_entries[]? | {type, at: .created_at, summary, channel: .channel.type}'
type values of interest: trigger_log_entry, notify_log_entry (who was paged, which channel),
acknowledge_log_entry, escalate_log_entry, assign_log_entry, resolve_log_entry. Pair with
/users/<id>/notification_rules to understand why a channel was (or wasn't) used.
5. Acknowledge / resolve / escalate / snooze / note
All incident mutations require a From: header containing the email of a real PagerDuty user in the
account — it attributes the action in the audit log. Missing or unknown email → 400.
pagerduty -X PUT "https://api.pagerduty.com/incidents/<incident_id>" \
-H "From: me@example.com" \
-d '{"incident": {"type": "incident_reference", "status": "acknowledged"}}'
- Acknowledge —
PUT /incidents/<id>:{"incident":{"type":"incident_reference","status":"acknowledged"}} - Resolve —
PUT /incidents/<id>:{"incident":{"type":"incident_reference","status":"resolved"}} - Escalate to level N —
PUT /incidents/<id>:{"incident":{"type":"incident_reference","escalation_level":N}} - Snooze —
POST /incidents/<id>/snooze:{"duration": <seconds>} - Add note —
POST /incidents/<id>/notes:{"note":{"content":"..."}}
6. Trace routing: service → escalation policy → schedule
# service → which policy
pagerduty "https://api.pagerduty.com/services/<service_id>?include[]=escalation_policies" | \
jq '.service | {name, escalation_policy}'
# policy → ordered rules and targets
pagerduty "https://api.pagerduty.com/escalation_policies/<policy_id>" | \
jq '.escalation_policy.escalation_rules[]? | {delay_min: .escalation_delay_in_minutes, targets: [.targets[]? | {type, summary}]}'
# schedule → rendered rotation for the next week (after overrides/layers)
# GNU date; on BSD/macOS use: date -u -v+7d +%Y-%m-%dT%H:%M:%SZ
pagerduty "https://api.pagerduty.com/schedules/<schedule_id>" -G \
--data-urlencode "since=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--data-urlencode "until=$(date -u -d '+7 days' +%Y-%m-%dT%H:%M:%SZ)" | \
jq '.schedule.final_schedule.rendered_schedule_entries[]? | {start, end, user: .user.summary}'
Most list endpoints take query= for substring name match, e.g.
GET /schedules?query=platform → jq '.schedules[]? | {id, name}'.
7. Create an incident
pagerduty -X POST "https://api.pagerduty.com/incidents" \
-H "From: me@example.com" \
-d '{
"incident": {
"type": "incident",
"title": "Payment gateway returning 500s",
"urgency": "high",
"service": {"id": "<service_id>", "type": "service_reference"},
"body": {"type": "incident_body", "details": "Seeing 40% error rate since 14:00 UTC."}
}
}'
Success is 201 — read .incident.id for follow-up calls (it's null on an error envelope;
check the status before reusing it).
8. Trigger an alert via Events API v2
curl -sS -X POST "https://events.pagerduty.com/v2/enqueue" \
-H "Content-Type: application/json" \
-d '{
"routing_key": "'"${PD_ROUTING_KEY}"'",
"event_action": "trigger",
"dedup_key": "db-latency-prod-us-east",
"payload": {
"summary": "DB p99 latency > 500ms in prod us-east",
"source": "prometheus:db_latency_p99",
"severity": "critical",
"custom_details": {"value_ms": 612}
}
}'
event_action ∈ trigger / acknowledge / resolve — send a later event with the same
dedup_key to close the loop. 202 returns {"status":"success","dedup_key":"..."}; keep the
dedup_key if PagerDuty generated it. Malformed payloads return 400 JSON with errors[].
Pagination
Classic offset/limit: limit (default 25, max 100) and offset (default 0); page while the
response has more: true, incrementing offset by limit. offset + limit is capped at
10,000 — narrow the time window or filters past that. Exceptions: /audit/records returns
next_cursor (pass back as cursor=); /analytics/raw/... takes starting_after in the POST body
(set to the previous response's last).
curl globbing trap. Array params use bracket syntax — statuses[]=, service_ids[]=,
team_ids[]=, include[]=. Older curl treats [ ] as glob characters and errors with
curl: (3) bad range; modern curl sends them literally. Always pass -g/--globoff (the helper
does) or percent-encode the brackets via -G --data-urlencode 'statuses[]=...' to be safe.
Rate limits
REST API: 960 requests/minute per token (a user's keys share one budget). Responses carry
ratelimit-limit, ratelimit-remaining, ratelimit-reset (seconds until reset). On 429
({"error":{"message":"Rate Limit Exceeded","code":2020}}) sleep ratelimit-reset seconds and
retry. Some endpoints add tighter per-operation limits; the headers reflect whichever is closest.
/oncalls and /schedules/{id} are relatively expensive — cache results if reused.
Events API v2 has a separate budget, ~120 events/minute per routing key. On 429, back off and
retry ~30s apart.
Error handling
Error bodies: {"error": {"message": "...", "code": N, "errors": ["field X is ..."]}}.
400— Bad request. Readerror.errors[]— names the bad field. Common: missingFrom:on a mutation, missingtypeon a reference object, bad ISO-8601 timestamp.401— Credential rejected. Body is empty — print the status. Header must beAuthorization: Token token=.... If it persists, the credential isn't configured — report it.403— Forbidden. Read-only credential mutating, or scoped to a team that doesn't own the resource.404— Not found. IDs are short alphanumerics (P.../Q...), not names orincident_number.429— Rate limited. Sleepratelimit-resetseconds, retry.
Going deeper
references/api.md has the full endpoint catalog — incidents (alerts, merges, responder requests,
priorities), services and integrations, escalation policies, schedules and overrides, users and
notification/contact methods, teams, maintenance windows, business services, event orchestration,
analytics, and the full Events API v2 payload shape. Read it when you need an endpoint beyond the
ones above.
FAQ
What does the pagerduty-api skill do?
Query and manage PagerDuty — find out who's on call, list and manage incidents, read escalation policies and schedules, trace who got paged and why, acknowledge/resolve/snooze/escalate incidents, and create or update services. Use this whenever the user mentions PagerDuty, on-call, paging, escalation, an incident ID like PXXXXXX or Q..., asks "who's on call", "page the on-call", "ack this incident", "why wasn't I paged", or pastes a pagerduty.com URL — even if they don't say "API". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.
How do I install pagerduty-api?
Run npx skills add https://github.com/anthropics/claude-tag-plugins --skill pagerduty-api in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pagerduty-api/ (personal) or .claude/skills/pagerduty-api/ (project).
Which AI agents can use pagerduty-api?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pagerduty-api safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pagerduty-api?
It is published by anthropics in anthropics/claude-tag-plugins. It has 41 recorded installs.
More from anthropics/claude-tag-plugins
graphing
anthropics/claude-tag-plugins
Compose polished charts (timeseries, bar, line, area, pie, scatter, or anything else the data calls for) from tabular data using the chartkit primitives, producing PNG, SVG, or self-contained interactive HTML. Use when the user asks to chart, graph, plot, or visualize data and wants something better than raw matplotlib defaults.
jira-api
anthropics/claude-tag-plugins
Read and manage Jira Cloud issues, projects, boards, sprints, comments, and transitions. Use this whenever the user wants to search issues with JQL, create or update a ticket, transition an issue (move to In Progress / Done), add a comment, check a sprint or board, look up a project, or ask "what's in my Jira queue" — even if they don't say "API". Also use it for any .atlassian.net URL, an issue key like "PROJ-123", or a JQL string. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.
hubspot-api
anthropics/claude-tag-plugins
Read, create, update, search, and associate HubSpot CRM records — contacts, companies, deals, tickets, and custom objects. Use this whenever the user wants to look up a contact, create a deal, update a company, search the CRM, link two records, or asks "what's in HubSpot" — even if they don't say "API". Also use it for any URL under app.hubspot.com or a mention of a HubSpot object/record ID. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.
asana-api
anthropics/claude-tag-plugins
Read and manage Asana tasks, projects, sections, comments, and workspaces. Use this whenever the user wants to list or search tasks, create or update a task, complete a task, comment on a task, move tasks between projects or sections, look up a project or workspace, or ask "what's on my Asana list" — even if they don't say "API". Also use it for any app.asana.com URL or an Asana task/project gid. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.
grafana-api
anthropics/claude-tag-plugins
Work with a Grafana instance — search and read dashboards, run datasource queries (Prometheus, Loki, PostgreSQL, etc.), inspect alert rules and silences, post annotations, and manage folders. Use this whenever the user mentions a Grafana dashboard, panel, or alert; pastes a Grafana URL; asks "what does this dashboard show", "query this metric in Grafana", "is this alert firing", "silence this alert", or wants to create/export a dashboard — even if they don't say "API". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.
google-drive-api
anthropics/claude-tag-plugins
Open the skill to read its SKILL.md instructions.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.