Skip to content

Commit 9a7b602

Browse files
committed
feat: add flashduty-statuspage agent skill
Adds the tenth agent skill, covering the statuspage command family (4 existing operations + 4 migration subcommands) for AI coding agents. - skills/flashduty-statuspage/SKILL.md: inline command docs for list/changes/create-incident/create-timeline plus migrate structure/email-subscribers/status/cancel. Three workflows: publish and manage an incident, full Atlassian-to-Flashduty migration (structure then subscribers), cancel a runaway migration. Description narrowly scoped to page management + migration to avoid triggering overlap with flashduty-shared. - README.md / README_zh.md: bump "9 agent skills" to "10", add row. Structural pattern matches flashduty-channel and flashduty-insight (inline command sections, no references/ subdirectory). Flag tables and component-status enumerations verified against live CLI help.
1 parent 2fa6f65 commit 9a7b602

3 files changed

Lines changed: 268 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Download the latest release for your platform from [GitHub Releases](https://git
4242
4343
## Agent Skills
4444
45-
Flashduty CLI ships with 9 agent skills that teach AI coding agents how to operate Flashduty from your terminal. Compatible with 41+ agents including Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, and more.
45+
Flashduty CLI ships with 10 agent skills that teach AI coding agents how to operate Flashduty from your terminal. Compatible with 41+ agents including Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, Windsurf, and more.
4646
4747
```bash
4848
npx skills add flashcatcloud/flashduty-cli -y -g
@@ -60,6 +60,7 @@ The installer auto-detects which agents you have and installs skills to all of t
6060
| `flashduty-change` | Change event tracking and deployment frequency trends |
6161
| `flashduty-oncall` | On-call schedule queries: who is on call, shift details |
6262
| `flashduty-channel` | Channel and escalation rule lookups |
63+
| `flashduty-statuspage` | Status page management and Atlassian → Flashduty migration |
6364
| `flashduty-insight` | Analytics: MTTA/MTTR, noise reduction, notification trends |
6465
| `flashduty-admin` | Team/member lookups and audit log search |
6566
| `flashduty-template` | Notification template validation and preview |

README_zh.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ go install github.com/flashcatcloud/flashduty-cli/cmd/flashduty@latest
4242
4343
## Agent Skills(AI 代理技能)
4444
45-
Flashduty CLI 内置 9 个代理技能,让 AI 编程代理能够通过 CLI 操作 Flashduty 平台。兼容 41+ 编程代理,包括 Claude Code、Cursor、GitHub Copilot、Codex、Gemini CLI、Windsurf 等。
45+
Flashduty CLI 内置 10 个代理技能,让 AI 编程代理能够通过 CLI 操作 Flashduty 平台。兼容 41+ 编程代理,包括 Claude Code、Cursor、GitHub Copilot、Codex、Gemini CLI、Windsurf 等。
4646
4747
```bash
4848
npx skills add flashcatcloud/flashduty-cli -y -g
@@ -60,6 +60,7 @@ npx skills add flashcatcloud/flashduty-cli -y -g
6060
| `flashduty-change` | 变更事件追踪与部署频率趋势 |
6161
| `flashduty-oncall` | 值班查询:当前值班人、排班详情 |
6262
| `flashduty-channel` | 协作空间与升级规则查询 |
63+
| `flashduty-statuspage` | 状态页管理以及从 Atlassian 迁移到 Flashduty |
6364
| `flashduty-insight` | 分析:MTTA/MTTR、降噪率、通知趋势 |
6465
| `flashduty-admin` | 团队/成员查询与审计日志搜索 |
6566
| `flashduty-template` | 通知模板验证与预览 |
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
---
2+
name: flashduty-statuspage
3+
version: 1.0.0
4+
description: "Flashduty status page management and one-time migration from external providers. Commands: statuspage list, changes, create-incident, create-timeline; statuspage migrate structure, email-subscribers, status, cancel. Use when publishing an incident or maintenance to a public status page, posting a timeline update, importing an existing Atlassian Statuspage (structure, history, or email subscribers) into Flashduty, or polling a migration job. Does not cover incident response workflows inside Flashduty — see flashduty-incident for that."
5+
metadata:
6+
requires:
7+
bins: ["flashduty"]
8+
cliHelp: "flashduty statuspage --help"
9+
---
10+
11+
# flashduty-statuspage
12+
13+
**CRITICAL** -- Before using this skill, read [`../flashduty-shared/SKILL.md`](../flashduty-shared/SKILL.md) for authentication, the 3-layer noise reduction model, global flags, and safety rules.
14+
15+
## Overview
16+
17+
Status pages are the public-facing communication layer: they let customers and internal stakeholders see current service health, ongoing incidents, and scheduled maintenance. This skill covers two distinct use cases:
18+
19+
1. **Day-to-day operations** on existing Flashduty status pages: listing pages, posting incidents and maintenance windows, updating timelines.
20+
2. **One-time migration** from an external provider (currently Atlassian Statuspage) into Flashduty: structure + history in one job, email subscribers in a separate job to control when verification emails go out.
21+
22+
Migration jobs are **asynchronous**. Start a job, poll its status, cancel if needed. The CLI never blocks waiting on a long-running migration.
23+
24+
## Quick Decision
25+
26+
| User wants to... | Command |
27+
|---|---|
28+
| See existing status pages | `statuspage list` |
29+
| See open incidents or maintenance on a page | `statuspage changes --page-id <id> --type incident` |
30+
| Publish a new incident | `statuspage create-incident --page-id <id> --title "..."` |
31+
| Update an ongoing incident | `statuspage create-timeline --page-id <id> --change <id> --message "..."` |
32+
| Migrate a page from Atlassian (contents first) | `statuspage migrate structure --from atlassian ...` |
33+
| Migrate subscribers (after structure) | `statuspage migrate email-subscribers --from atlassian ...` |
34+
| Check migration progress | `statuspage migrate status --job-id <id>` |
35+
| Stop a runaway migration | `statuspage migrate cancel --job-id <id>` |
36+
37+
## Commands
38+
39+
### statuspage list
40+
41+
List all status pages visible to the account.
42+
43+
```bash
44+
flashduty statuspage list [flags]
45+
```
46+
47+
| Flag | Type | Description |
48+
|------|------|-------------|
49+
| `--id` | string | Filter by page IDs (comma-separated) |
50+
51+
Output columns: ID, NAME, SLUG, STATUS, COMPONENTS.
52+
53+
Use this to look up page IDs for the other commands in this skill.
54+
55+
### statuspage changes
56+
57+
List active incidents or maintenance windows on a page.
58+
59+
```bash
60+
flashduty statuspage changes --page-id <id> --type <incident|maintenance>
61+
```
62+
63+
| Flag | Type | Description |
64+
|------|------|-------------|
65+
| `--page-id` | int | Page ID (**required**) |
66+
| `--type` | string | `incident` or `maintenance` (**required**) |
67+
68+
Output columns: ID, TITLE, TYPE, STATUS, CREATED, UPDATED.
69+
70+
"Active" means not yet resolved / not yet completed. Returns both incident and maintenance changes depending on `--type`.
71+
72+
### statuspage create-incident
73+
74+
Publish a new incident on a status page. The incident appears to subscribers and on the public page immediately.
75+
76+
```bash
77+
flashduty statuspage create-incident --page-id <id> --title <title> [flags]
78+
```
79+
80+
| Flag | Type | Description |
81+
|------|------|-------------|
82+
| `--page-id` | int | Page ID (**required**) |
83+
| `--title` | string | Incident title, max 255 chars (**required**) |
84+
| `--message` | string | Initial update message |
85+
| `--components` | string | `id1:status,id2:status` — statuses: `operational`, `degraded`, `partial_outage`, `full_outage` |
86+
| `--notify` | bool | Notify page subscribers (default: false) |
87+
88+
Use `--notify` deliberately — it sends email + push to every subscriber on the page.
89+
90+
### statuspage create-timeline
91+
92+
Add a timeline update to an existing incident or maintenance. Use this to move a change through its lifecycle (`investigating``identified``monitoring``resolved`).
93+
94+
```bash
95+
flashduty statuspage create-timeline --page-id <id> --change <id> --message <msg> [flags]
96+
```
97+
98+
| Flag | Type | Description |
99+
|------|------|-------------|
100+
| `--page-id` | int | Page ID (**required**) |
101+
| `--change` | int | Change ID (**required**) — get it from `statuspage changes` |
102+
| `--message` | string | Timeline message (**required**) |
103+
| `--status` | string | Incident: `investigating`, `identified`, `monitoring`, `resolved`; maintenance: `scheduled`, `ongoing`, `completed` |
104+
105+
The `--status` transition determines when a change is considered resolved / completed and stops appearing in `statuspage changes`.
106+
107+
### statuspage migrate structure
108+
109+
Start an asynchronous migration of status page **structure and history** from an external provider into a new Flashduty status page. Components, sections, past incidents, past maintenance windows, and notification templates are imported. **No emails are sent to subscribers.**
110+
111+
```bash
112+
flashduty statuspage migrate structure --from atlassian --source-page-id <id> --api-key <key>
113+
```
114+
115+
| Flag | Type | Description |
116+
|------|------|-------------|
117+
| `--from` | string | Source provider, currently only `atlassian` (**required**) |
118+
| `--source-page-id` | string | Page ID in the source provider (**required**) |
119+
| `--api-key` | string | Source provider API key (**required**) |
120+
121+
Returns a job ID plus the command to poll its status. Human output shows the new Flashduty `target_page_id` once the job reaches the `completed` phase — capture that for the subscriber migration.
122+
123+
### statuspage migrate email-subscribers
124+
125+
Start a **separate** migration of email subscribers from the external provider into an existing Flashduty status page. Split from `migrate structure` so that operators can verify imported content before waking up the subscriber list.
126+
127+
```bash
128+
flashduty statuspage migrate email-subscribers --from atlassian --source-page-id <id> --target-page-id <id> --api-key <key>
129+
```
130+
131+
| Flag | Type | Description |
132+
|------|------|-------------|
133+
| `--from` | string | Source provider, currently only `atlassian` (**required**) |
134+
| `--source-page-id` | string | Page ID in the source provider (**required**) |
135+
| `--target-page-id` | int | Flashduty page ID from `migrate structure` (**required**) |
136+
| `--api-key` | string | Source provider API key (**required**) |
137+
138+
### statuspage migrate status
139+
140+
Poll the progress of an async migration job.
141+
142+
```bash
143+
flashduty statuspage migrate status --job-id <id>
144+
```
145+
146+
| Flag | Type | Description |
147+
|------|------|-------------|
148+
| `--job-id` | string | Migration job ID (**required**) |
149+
150+
Human output prints the current phase, status, progress counters (components, sections, incidents, maintenances, subscribers, templates), and any accumulated warnings or a fatal error. Poll until `Status: completed`, `failed`, or `cancelled`.
151+
152+
### statuspage migrate cancel
153+
154+
Request cancellation of an in-flight migration job. Best-effort: jobs in their final phase may still complete.
155+
156+
```bash
157+
flashduty statuspage migrate cancel --job-id <id>
158+
```
159+
160+
| Flag | Type | Description |
161+
|------|------|-------------|
162+
| `--job-id` | string | Migration job ID (**required**) |
163+
164+
Returns a confirmation and the command to poll the final state.
165+
166+
## Workflows
167+
168+
### Workflow 1: Publish and Manage an Incident
169+
170+
Post a new incident, move it through investigation, resolve it.
171+
172+
```bash
173+
# 1. Find the page ID
174+
flashduty statuspage list
175+
176+
# 2. Create the incident (no notifications yet)
177+
flashduty statuspage create-incident \
178+
--page-id 42 \
179+
--title "Database latency elevated" \
180+
--message "We're investigating reports of slow database queries" \
181+
--components "comp_1:degraded"
182+
183+
# 3. See the change ID for follow-up updates
184+
flashduty statuspage changes --page-id 42 --type incident
185+
186+
# 4. Post updates as the incident progresses
187+
flashduty statuspage create-timeline \
188+
--page-id 42 --change 101 \
189+
--status identified \
190+
--message "Root cause: a runaway query. Rolling back now."
191+
192+
flashduty statuspage create-timeline \
193+
--page-id 42 --change 101 \
194+
--status monitoring \
195+
--message "Rollback complete. Monitoring for recurrence."
196+
197+
# 5. Resolve
198+
flashduty statuspage create-timeline \
199+
--page-id 42 --change 101 \
200+
--status resolved \
201+
--message "Latency back to baseline. Closing."
202+
```
203+
204+
### Workflow 2: Full Atlassian → Flashduty Migration
205+
206+
Import structure first, verify, then import subscribers.
207+
208+
```bash
209+
# 1. Start the structure + history migration
210+
flashduty statuspage migrate structure \
211+
--from atlassian \
212+
--source-page-id page_atl_123 \
213+
--api-key "$ATLASSIAN_STATUSPAGE_API_KEY"
214+
# → captures Job ID: str_abc
215+
216+
# 2. Poll until completed
217+
flashduty statuspage migrate status --job-id str_abc
218+
# Repeat until Status: completed.
219+
# Capture Target page ID from the completed job's output.
220+
221+
# 3. Sanity-check the imported page
222+
flashduty statuspage list --id <new_page_id>
223+
flashduty statuspage changes --page-id <new_page_id> --type incident
224+
225+
# 4. ONLY AFTER VERIFYING: start subscriber migration
226+
flashduty statuspage migrate email-subscribers \
227+
--from atlassian \
228+
--source-page-id page_atl_123 \
229+
--target-page-id <new_page_id> \
230+
--api-key "$ATLASSIAN_STATUSPAGE_API_KEY"
231+
# → captures Job ID: sub_xyz
232+
233+
# 5. Poll until completed
234+
flashduty statuspage migrate status --job-id sub_xyz
235+
```
236+
237+
### Workflow 3: Stop a Runaway Migration
238+
239+
```bash
240+
# Saw unexpected warnings or want to retry with a different config
241+
flashduty statuspage migrate cancel --job-id str_abc
242+
243+
# Confirm it reached a terminal state
244+
flashduty statuspage migrate status --job-id str_abc
245+
# Status should become cancelled.
246+
```
247+
248+
## Key Concepts
249+
250+
- **Page ID** (int) is the Flashduty status page primary key. **Change ID** (int) is the ID of an incident/maintenance within a page. Don't confuse them.
251+
- **Migration is async.** `migrate structure` and `migrate email-subscribers` return immediately with a job ID; the actual work happens on the backend.
252+
- **Two migration jobs, not one.** Structure + history run separately from subscribers. This is deliberate — subscriber import triggers verification emails, so operators verify content first.
253+
- **Migration phases** for the structure job progress in order: `components``sections``history` (incidents + maintenances) → `templates`. The subscribers job has a single `subscribers` phase.
254+
- **Terminal statuses:** `completed`, `failed`, `cancelled`. Stop polling once any of these appears.
255+
- **`--notify` is subscriber-visible.** In `create-incident`, omit or set `--notify=false` for silent incidents; set `--notify` when you want an announcement.
256+
- **Component statuses vary by change type.** Incident statuses: `operational`, `degraded`, `partial_outage`, `full_outage`. Maintenance statuses: `operational`, `under_maintenance`.
257+
- **Source provider support** is currently Atlassian Statuspage only. Other providers will require SDK + CLI updates.
258+
259+
## Cross-References
260+
261+
- **Prerequisites:** `flashduty-shared` — authentication, global flags (`--json`, `--no-trunc`), and safety rules.
262+
- **Related skills:**
263+
- `flashduty-incident` — internal Flashduty incident response (distinct from public status page incidents).
264+
- `flashduty-channel` — channels are how alerts are routed internally; status pages publish to customers. They can be wired together but are independent concepts.

0 commit comments

Comments
 (0)