Skip to content

Commit d5ff6ac

Browse files
authored
Merge pull request #3 from ably/feat/debugging-with-ably-cli
feat: add debugging-with-ably-cli implicit skill
2 parents 3908c60 + 0b935fb commit d5ff6ac

File tree

7 files changed

+309
-11
lines changed

7 files changed

+309
-11
lines changed

.claude-plugin/marketplace.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
"plugins": [
1414
{
1515
"name": "ably",
16-
"description": "Gives Claude expert knowledge of Ably's SDK architecture, auth patterns, and product selection - verified against live docs. Prevents common mistakes like deprecated API patterns and client-side key exposure.",
16+
"description": "Expert knowledge for building and debugging with AblySDK patterns, auth, product selection verified against live docs, and CLI-powered diagnostics for connection, messaging, and presence issues.",
1717
"source": "./",
1818
"strict": false,
1919
"skills": [
20-
"./skills/using-ably"
20+
"./skills/using-ably",
21+
"./skills/debugging-with-ably-cli"
2122
]
2223
}
2324
]

AGENTS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@ Cursor, GitHub Copilot, and other compatible agents.
1818
| Skill | Purpose | Trigger |
1919
|-------|---------|---------|
2020
| `using-ably` | Curated knowledge + code generation: product selection, SDK architecture, auth, channel design, live doc verification, post-generation checks | Any Ably-related work (always-on) |
21+
| `debugging-with-ably-cli` | Diagnostic decision trees, CLI capabilities, connection/channel state reference, environment-specific gotchas | Diagnosing Ably issues — messages not arriving, auth errors, connection failures, presence problems |
2122

2223
**`using-ably`** is the primary skill — it provides the domain knowledge agents get wrong (product selection, JWT auth, Chat attach lifecycle, React client creation, etc.) and enforces fetching current docs from `ably.com/llms.txt` before generating code, with a post-generation checklist to catch common mistakes.
2324

25+
**`debugging-with-ably-cli`** is the diagnostic skill — it teaches agents what's possible with the Ably CLI and when to use each capability for observing, simulating, and managing Ably resources during debugging.
26+
2427
## Skill Structure
2528

2629
```
2730
skills/
2831
{skill-name}/
2932
SKILL.md # Skill definition (frontmatter + instructions)
33+
AGENTS.md # Optional: agent guidance for maintaining this skill
34+
MAINTAINING.md # Optional: detailed maintenance guide (referenced from AGENTS.md)
3035
```
3136

3237
## Progressive Disclosure
@@ -39,7 +44,7 @@ Skills use a three-tier loading model to minimize context window usage:
3944

4045
## Key Design Principles
4146

42-
1. **Docs-first**Every skill fetches `https://ably.com/llms.txt` as its primary source. Web search supplements when needed.
47+
1. **Docs-first**Code-generation skills fetch `https://ably.com/llms.txt` as their primary source. Web search supplements when needed. Non-code-generation skills (e.g., debugging) may rely on other sources like CLI help and error reference pages.
4348
2. **Product-first rule** — Never build custom infrastructure when an Ably product handles it natively.
4449
3. **Focus on what LLMs can't know** — Skills provide channel layout patterns, common gotchas, and design guidance — not product docs the agent can fetch itself.
4550
4. **Graceful degradation** — If `llms.txt` is unavailable, skills fall back to web search or browsing `ably.com/docs` directly.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ Skills work with any [agentskills.io-compatible](https://agentskills.io) coding
99
| Skill | Purpose | Auto-triggers when |
1010
|-------|---------|-------------------|
1111
| `using-ably` | Product selection, SDK patterns, auth, channel design, common gotchas | Any Ably-related work |
12+
| `debugging-with-ably-cli` | Diagnostic decision trees, CLI capabilities, state reference, environment gotchas | Diagnosing Ably issues |
1213

1314
### `using-ably` — Primary Knowledge Skill
1415

1516
The core skill. Provides curated domain knowledge that agents frequently get wrong: choosing the right product/SDK, JWT vs token auth, modern v2.x patterns, Chat SDK lifecycle (attach before subscribe!), React integration pitfalls, and a production checklist.
1617

18+
### `debugging-with-ably-cli` — CLI Debugging Skill
19+
20+
Teaches agents what the Ably CLI can do and when to use each capability for diagnosing issues. Covers diagnostic reasoning (symptom → CLI approach), key debugging facts, connection/channel state machines, and environment-specific gotchas. Agents discover exact command syntax via `ably --help` at runtime.
21+
1722
## Installation
1823

1924
### Claude Code Plugin
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# debugging-with-ably-cli
2+
3+
Ably CLI debugging skill — teaches agents what's possible with the CLI and when to use each capability for diagnosing Ably issues.
4+
5+
## Before making changes
6+
7+
Read [MAINTAINING.md](./MAINTAINING.md) for design philosophy, maintenance triggers, what NOT to add, and the validation checklist. Every change to this skill should be checked against that guide.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Maintaining the debugging-with-ably-cli Skill
2+
3+
## Design Philosophy
4+
5+
This skill teaches agents **what's possible with the Ably CLI and when to use it** — not every command, flag, and argument. The CLI is self-documenting via `--help`; agents should discover exact syntax at runtime rather than relying on this skill for command references.
6+
7+
The skill focuses on:
8+
- **Categories of capability** (observe, simulate, manage, get help) — not individual commands
9+
- **Diagnostic reasoning** (symptom → approach) — not step-by-step procedures
10+
- **Domain knowledge agents lack** (state machines, persistence defaults, capability scoping, gotchas) — not documentation the CLI itself provides
11+
12+
## Maintenance Triggers
13+
14+
When the Ably CLI (`@ably/cli`) changes, check whether the skill needs updating:
15+
16+
1. **New top-level command group added** (e.g., a new product like `ably liveobjects`): Add to the relevant capability section (Observe, Simulate, or Manage) and to the diagnostic decision tree if it introduces new debugging scenarios.
17+
18+
2. **New capability within existing commands** (e.g., new flags, new subscribe targets): Usually NO skill update needed — agents discover flags via `--help`. Only update if the capability changes *what's possible* at a category level.
19+
20+
3. **Behavioral changes** (e.g., history retention changes, new connection/channel states, new error code ranges): Update the relevant reference table (connection states, channel states, key debugging facts, environment gotchas).
21+
22+
4. **Product changes** (e.g., new Ably product, product sunset): Update the diagnostic decision tree and capability sections.
23+
24+
## What NOT to Add
25+
26+
- Individual command syntax or flag listings — the CLI's `--help` handles this
27+
- Step-by-step procedural workflows — research shows these degrade agent performance
28+
- Content that duplicates the `using-ably` skill — this skill is for debugging, not building
29+
- Full documentation of the CLI — link to `ably --help` and let agents discover
30+
31+
## Validation Checklist
32+
33+
When updating, verify:
34+
- [ ] Skill stays under 500 lines — token budget matters, every token is loaded into agent context on every debugging session. Bloat degrades performance.
35+
- [ ] No command syntax is hardcoded that could go stale — capability descriptions only
36+
- [ ] Decision tree covers all Ably products the CLI supports
37+
- [ ] State reference tables match current SDK behavior
38+
- [ ] No overlap with `using-ably` skill content
39+
40+
## How to Check for CLI Changes
41+
42+
```bash
43+
# Check current CLI version and command groups
44+
ably --help
45+
46+
# Compare against the capability categories in SKILL.md
47+
# Look for new top-level commands not covered
48+
49+
# Check subcommands for each product
50+
ably channels --help
51+
ably rooms --help
52+
ably spaces --help
53+
ably logs --help
54+
ably bench --help
55+
ably integrations --help
56+
ably queues --help
57+
ably auth --help
58+
ably apps --help
59+
ably support --help
60+
```
61+
62+
If a new command group appears that isn't covered in the capability sections, the skill needs updating. If only flags/options change within existing commands, no update is needed.

0 commit comments

Comments
 (0)