You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/ably-codebase-review/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,14 +132,14 @@ Launch these agents **in parallel**. Each agent gets a focused mandate and uses
132
132
- Subscribe/stream commands must have `durationFlag`
133
133
- Subscribe commands with replay must have `rewindFlag`
134
134
- History/stats commands must have `timeRangeFlags`
135
-
- Commands creating realtime connections or performing mutations (publish, update, delete, append) must have `clientIdFlag`
135
+
- Commands that perform writes (subscribe, publish, enter, set, acquire, update, delete, append) must have `clientIdFlag`; read-only queries (get, get-all, history, occupancy get) must NOT have `clientIdFlag`
136
136
- Control API commands must use `ControlBaseCommand.globalFlags`
137
137
138
138
**Method (LSP — for ambiguous cases):**
139
139
3. Use `LSP goToDefinition` on flag spread references to confirm they resolve to `src/flags.ts` (not a local redefinition)
140
140
141
141
**Reasoning guidance:**
142
-
- A command that creates a realtime client or performs a mutation (publish, update, delete, append) but doesn't have `clientIdFlag` is a deviation
142
+
- A write command (subscribe, publish, enter, set, acquire, update, delete, append) without `clientIdFlag` is a deviation; a read-only query (get, get-all, history, occupancy get) WITH `clientIdFlag` is also a deviation
143
143
- A non-subscribe command having `durationFlag` is suspicious but might be valid (e.g., presence enter)
144
144
- Control API commands should NOT have `productApiFlags`
Copy file name to clipboardExpand all lines: .claude/skills/ably-new-command/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ static flags = {
137
137
-`await this.requireAppId(flags)` — resolves and validates the app ID, returns `Promise<string>` (non-nullable). Calls `this.fail()` internally if no app found — no manual null check needed.
138
138
-`await this.runControlCommand(flags, api => api.method(appId))` — creates the Control API client, executes the call, and handles errors in one step. Returns `Promise<T>` (non-nullable). Useful for single API calls; for multi-step flows, use `this.createControlApi(flags)` directly.
139
139
140
-
**When to include `clientIdFlag`:** Add `...clientIdFlag`whenever the user might want to control which client identity performs the operation. This includes: presence enter/subscribe, spaces members, typing, cursors, publish, and any mutation where permissions may depend on the client (update, delete, annotate). The reason is that users may want to test auth scenarios — e.g., "can client B update client A's message?" — so they need the ability to set their client ID.
140
+
**When to include `clientIdFlag`:** Add `...clientIdFlag` to commands where client identity affects the operation: subscribe, publish, enter, set, acquire, update, delete, append, annotate. The reason is that users may want to test auth scenarios — e.g., "can client B update client A's message?" — so they need the ability to set their client ID. Do NOT add to read-only queries (get, get-all, history, occupancy get) — Ably capabilities are operation-based, not clientId-based, so client identity is irrelevant for pure reads.
Copy file name to clipboardExpand all lines: .claude/skills/ably-new-command/references/patterns.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,7 +253,7 @@ async run(): Promise<void> {
253
253
254
254
## Get Pattern
255
255
256
-
Get commands perform one-shot queries for current state. They use REST clients and don't need `clientIdFlag`, `durationFlag`, or `rewindFlag`.
256
+
Get commands perform one-shot read-only queries for current state. They don't need `clientIdFlag` (Ably capabilities are operation-based, not clientId-based — client identity is irrelevant for reads), `durationFlag`, or `rewindFlag`.
Copy file name to clipboardExpand all lines: .claude/skills/ably-review/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ For each changed command file, run the relevant checks. Spawn agents for paralle
110
110
**Flag architecture check (grep, with LSP for ambiguous cases):**
111
111
1. **Grep** for flag spreads (`productApiFlags`, `clientIdFlag`, `durationFlag`, `rewindFlag`, `timeRangeFlags`, `ControlBaseCommand.globalFlags`)
112
112
2. Verify correct flag sets per the skill rules
113
-
3. Check subscribe commands have `durationFlag`, `rewindFlag`, `clientIdFlag` as appropriate; mutation commands (publish, update, delete, append) should also have `clientIdFlag`
113
+
3. Check subscribe commands have `durationFlag`, `rewindFlag`, `clientIdFlag` as appropriate; write commands (publish, enter, set, acquire, update, delete, append) should also have `clientIdFlag`; read-only queries (get, get-all, history, occupancy get) must NOT have `clientIdFlag`
114
114
4. For ambiguous cases, use **LSP** `goToDefinition` to confirm flag imports resolve to `src/flags.ts`
0 commit comments