Skip to content

Commit 408862e

Browse files
committed
docs: update skills for team CRUD commands
- flashduty-admin: document team get/create/update/delete commands, all flags, team lifecycle workflow, and member replacement warning - flashduty-shared: add team get to reference lookups, add safety rules for team delete and member list replacement
1 parent c120fc7 commit 408862e

2 files changed

Lines changed: 113 additions & 7 deletions

File tree

skills/flashduty-admin/SKILL.md

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: flashduty-admin
33
version: 1.0.0
4-
description: "Flashduty administration: list teams and members, search audit logs for compliance and investigation. Commands: team list, member list, audit search. Use when looking up person IDs or team IDs for other commands, finding contact information, searching who performed specific actions, or reviewing audit trails for compliance."
4+
description: "Flashduty administration: manage teams (list, get, create, update, delete), list members, and search audit logs for compliance and investigation. Commands: team list/get/create/update/delete, member list, audit search. Use when managing team structure, looking up person IDs or team IDs for other commands, finding contact information, searching who performed specific actions, or reviewing audit trails for compliance."
55
metadata:
66
requires:
77
bins: ["flashduty"]
@@ -28,11 +28,82 @@ flashduty team list [flags]
2828

2929
| Flag | Type | Default | Description |
3030
|------|------|---------|-------------|
31-
| `--name` | string | | Search by team name |
31+
| `--name` | string | | Search by team name substring |
3232
| `--page` | int | 1 | Page number |
33+
| `--limit` | int | 20 | Page size, max 100 |
34+
| `--orderby` | string | | Sort field: `created_at`, `updated_at`, `team_name` |
35+
| `--asc` | bool | false | Sort in ascending order |
36+
| `--person-id` | int | 0 | Filter teams by member ID |
3337

3438
Output columns: ID, NAME, MEMBERS.
3539

40+
### team get
41+
42+
Get detailed information about a specific team. Specify the team by exactly one of `--id`, `--name`, or `--ref-id`.
43+
44+
```bash
45+
flashduty team get --id <team_id>
46+
flashduty team get --name "SRE Team"
47+
flashduty team get --ref-id "hr-dept-42"
48+
```
49+
50+
| Flag | Type | Description |
51+
|------|------|-------------|
52+
| `--id` | int | Team ID |
53+
| `--name` | string | Team name (exact match) |
54+
| `--ref-id` | string | External reference ID |
55+
56+
Output fields: ID, Name, Description, Status, Ref ID, Members, Created, Updated, Created By, Updated By.
57+
58+
### team create
59+
60+
Create a new team. The `--name` flag is required and must be unique (1-39 characters).
61+
62+
```bash
63+
flashduty team create --name "SRE Team" [flags]
64+
```
65+
66+
| Flag | Type | Description |
67+
|------|------|-------------|
68+
| `--name` | string | **Required.** Team name (1-39 characters) |
69+
| `--description` | string | Team description (max 500 characters) |
70+
| `--person-ids` | string | Comma-separated member person IDs |
71+
| `--emails` | string | Comma-separated email addresses to invite |
72+
| `--ref-id` | string | External reference ID for HR system integration |
73+
74+
### team update
75+
76+
Update an existing team. The `--id` flag is required. **WARNING:** `--person-ids` replaces the entire member list. Use `team get` to see current members before updating.
77+
78+
```bash
79+
flashduty team update --id <team_id> [flags]
80+
```
81+
82+
| Flag | Type | Description |
83+
|------|------|-------------|
84+
| `--id` | int | **Required.** Team ID |
85+
| `--name` | string | New team name (1-39 characters) |
86+
| `--description` | string | New description (max 500 characters) |
87+
| `--person-ids` | string | Comma-separated member person IDs (replaces entire member list) |
88+
| `--emails` | string | Comma-separated email addresses to invite |
89+
| `--ref-id` | string | External reference ID |
90+
91+
### team delete
92+
93+
Permanently delete a team. Specify the team by exactly one of `--id`, `--name`, or `--ref-id`. This action is **irreversible**. You will be prompted for confirmation unless `--force` is set.
94+
95+
```bash
96+
flashduty team delete --id <team_id>
97+
flashduty team delete --name "Old Team" --force
98+
```
99+
100+
| Flag | Type | Description |
101+
|------|------|-------------|
102+
| `--id` | int | Team ID |
103+
| `--name` | string | Team name |
104+
| `--ref-id` | string | External reference ID |
105+
| `--force` | bool | Skip confirmation prompt |
106+
36107
### member list
37108

38109
List organization members with contact details and status.
@@ -107,14 +178,44 @@ flashduty team list
107178

108179
# Search for a specific team by name
109180
flashduty team list --name "Platform"
181+
182+
# Get full detail for a specific team
183+
flashduty team get --id 123
184+
185+
# Look up a team by external reference ID
186+
flashduty team get --ref-id "hr-dept-42"
187+
```
188+
189+
### Team Lifecycle Management
190+
191+
```bash
192+
# Create a new team with initial members
193+
flashduty team create --name "SRE Team" --description "Site Reliability" --person-ids 1,2,3
194+
195+
# Create a team and invite members by email
196+
flashduty team create --name "Backend Team" --emails alice@example.com,bob@example.com
197+
198+
# Rename a team
199+
flashduty team update --id 123 --name "Platform SRE"
200+
201+
# Replace the entire member list (check current members first!)
202+
flashduty team get --id 123
203+
flashduty team update --id 123 --person-ids 1,2,3,4,5
204+
205+
# Delete a team (prompts for confirmation)
206+
flashduty team delete --id 123
207+
208+
# Delete without confirmation (for scripting)
209+
flashduty team delete --id 123 --force
110210
```
111211

112212
## Key Concepts
113213

114214
- **Member IDs** (int64) are used across many commands: incident assign/reassign, audit filters, oncall schedules.
115215
- **Team IDs** (int64) are used for filtering: oncall schedules, postmortem list, channels.
216+
- **Team update replaces members** -- `--person-ids` is a full replacement, not an append. Always check current members with `team get` before updating.
217+
- **Team delete is irreversible** -- requires confirmation in interactive mode; requires `--force` in non-interactive (CI/scripted) mode.
116218
- **Audit logs** track all mutations in the system -- useful for compliance, incident investigation, and change tracking.
117-
- All admin commands in the CLI are **read-only**.
118219

119220
## Cross-References
120221

skills/flashduty-shared/SKILL.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ flashduty member list --email "john@example.com"
179179
# Find a team ID
180180
flashduty team list --name "SRE"
181181

182+
# Get full team detail by ID, name, or ref-id
183+
flashduty team get --id 123
184+
182185
# Find a channel (collaboration space) ID
183186
flashduty channel list --name "Production"
184187

@@ -202,10 +205,12 @@ flashduty status-page list
202205
2. **NEVER** merge incidents or alerts without user confirmation -- merges are **irreversible**.
203206
3. **NEVER** snooze incidents unless the user specifies a duration.
204207
4. **NEVER** reassign or reopen incidents without user confirmation.
205-
5. **Always** show what will be affected before executing destructive or mutating operations.
206-
6. When in doubt about severity or scope, **list first, then act**.
207-
7. Prefer **read-only** operations (`list`, `get`, `detail`) unless the user explicitly requests a mutation.
208-
8. For bulk operations (multiple IDs), enumerate the targets and confirm before proceeding.
208+
5. **NEVER** delete a team without explicit user confirmation -- deletion is **irreversible**.
209+
6. **NEVER** update a team's member list without showing the current members first -- `--person-ids` replaces the entire list.
210+
7. **Always** show what will be affected before executing destructive or mutating operations.
211+
8. When in doubt about severity or scope, **list first, then act**.
212+
9. Prefer **read-only** operations (`list`, `get`, `detail`) unless the user explicitly requests a mutation.
213+
10. For bulk operations (multiple IDs), enumerate the targets and confirm before proceeding.
209214

210215
---
211216

0 commit comments

Comments
 (0)