swap
Request someone to cover one of your upcoming on-call shifts. Lists your shifts, helps identify a candidate based on availability, and creates an override after explicit confirmation. Write action - never executes without confirming.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-11
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- swap
- description
- Request someone to cover one of your upcoming on-call shifts. Lists your shifts, helps identify a candidate based on availability, and creates an override after explicit confirmation. Write action - never executes without confirming.
- allowed-tools
- [ "mcp__rootly__*" ]
- argument-hint
- [ "optional shift selector — date or \"next\"" ]
- disable-model-invocation
- true
03 SKILL.md 正文
Shift Swap Request
You are helping the user offload one of their on-call shifts to someone else. This is a write action: you must show the proposed change and get explicit user confirmation before calling mcp__rootly__createOverrideShift.
Workflow
1. Identify the user
Call mcp__rootly__getCurrentUser. Capture user_id.
2. List the user's shifts
Call mcp__rootly__listShifts (or list_shifts) scoped to:
- The current user
- Next 14 days
If the MCP doesn't expose user-level filtering, call the broader listShifts and filter client-side by user_id.
3. Pick the target shift
- If
$ARGUMENTSis empty: show the next 5 shifts and ask "Which shift do you want covered?" - If
$ARGUMENTSisnext: pick the soonest upcoming shift. - If
$ARGUMENTSis a date or shift identifier: try to match.
If no match, list options and ask.
4. Find candidate coverers
For the shift's schedule and time window:
- Call
mcp__rootly__create_override_recommendationif it accepts the shift parameters — this is the cleanest path; it returns suggested coverers. - Otherwise, fall back to
mcp__rootly__check_responder_availabilityagainst the relevant team/schedule and propose users withavailable=trueand no conflicting shifts. - Present up to 3 candidates with reasoning (workload, recent shifts, conflicts).
If no candidates are available, surface that and stop.
5. Show the proposal
**Proposed shift swap:**
- **Shift**: [Schedule name] [start] → [end] ([duration])
- **Currently assigned**: you ([your name])
- **Proposed coverer**: [candidate name]
- **Why**: [reason — e.g. "no shifts this week, on team rotation"]
**Alternatives**:
- [other candidate] — [reason]
- [other candidate] — [reason]
Confirm to create the override? (yes / no / pick another)
6. Wait for confirmation
yes→ callmcp__rootly__createOverrideShiftwith this shape:
{
"schedule_id": "[schedule_id]",
"data": {
"type": "shifts",
"attributes": {
"starts_at": "[shift start ISO8601]",
"ends_at": "[shift end ISO8601]",
"user_id": [coverer user id]
}
}
}
Echo the resulting override ID and a confirmation line.
pick anotheror naming a different candidate → revise the proposal and re-confirm. Do not execute on the first reply if the user is changing the candidate.noor any other answer → acknowledge and stop. Do not call the create tool.
7. After the override is created
Output:
✅ Override created.
- ID: [uuid]
- Coverer: [name]
- Window: [start] → [end]
Recommended next steps:
- Notify the coverer in Slack / your team channel.
- The original on-call schedule will route alerts to the coverer for this window.
8. Guidelines
- Never call
createOverrideShiftwithout confirmation. The "yes" must come from the user, not be inferred. - If
create_override_recommendationis unavailable, lean oncheck_responder_availabilityrather than guessing. Don't propose a coverer you can't verify is available. - If the user's shift is in the past or already started, refuse with a helpful message — overrides for the present moment are usually a different operation.
- Show timezone explicitly in the proposal. Ambiguous times cause mistakes.
04 同仓库更多 Skills
trend
Reliability trend summary for a service, team, or the whole org. Reports incident volume, severity mix, and MTTR direction over a window (default 30 days). Use for standups, 1-on-1s, or quarterly reviews.
test
Simple test skill
status
Show a compact service health overview including active incidents by severity. Use for a quick health check of your services.
setup
Set up the Rootly plugin. Verifies MCP server connection via OAuth2 or API token and guides through configuration. Run this after installing the plugin.
retro
[experimental] Generate a structured post-incident retrospective from incident data. Forked-subagent flow may not have MCP access in all Claude Code contexts.
respond
[experimental] Investigate and respond to a production incident. Pulls context, finds similar past incidents, suggests solutions, and enables coordination. Forked-subagent flow may not have MCP access in all Claude Code contexts -- prefer /rootly:status + /rootly:brief for now.