Debug connection
全球最大的 Claude Code 技能聚合库 · 收录 3900+ 来自 12+ 来源的技能,提供在线搜索与趋势分析看板 / The world's largest Claude Code skill aggregation hub — 3900+ skills from 12+ sources with online search and trend dashboard
npx -y skills add bg-szy/TOP-SKILLS --skill debug-connectionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Debug WebSocket connection issues between CLI and FigJam plugin. Use when diagrams aren't syncing, connection fails, plugin shows "Connecting..." indefinitely, or patches aren't being applied to canvas.
SKILL.md
2.7 KB, 550 tokens by cl100k_base, as published. Nobody here has run it
WebSocket Connection Debugging
Architecture
CLI serve (Bun) ←── WebSocket ──→ Plugin UI (ui.ts) ←── postMessage ──→ Plugin Main (code.ts)
│ │ │
File watcher Browser APIs Figma API
YAML parsing WebSocket client Canvas rendering
Common Issues
| Issue | Symptom | Solution |
|---|---|---|
| CLI not running | "Connecting..." indefinitely | Start bun run packages/cli/src/index.ts serve diagram.yaml |
| Port in use | Connection refused | Check lsof -i :3456, use different port |
| Secret mismatch | Connects then immediately closes | Match --secret value in CLI and plugin |
| YAML errors | Connected but no updates | Fix validation errors in CLI output |
| docId mismatch | No response after hello | Ensure plugin docId matches YAML docId |
| Patches not applied | Connected, canvas unchanged | Check Plugin Main console for render errors |
Debugging Steps
- CLI side: Check terminal for errors, verify YAML with
bun run packages/cli/src/index.ts build diagram.yaml - Plugin UI: Right-click plugin → Inspect → Console for WebSocket events
- Plugin Main: Figma Desktop → Plugins → Development → Open console
Message Flow
Plugin CLI
│ │
│──── hello ─────────────────►│ {type:"hello", docId, secret?}
│◄──── full ─────────────────│ {type:"full", rev, ir}
│ │
│ [YAML changes] │
│◄──── patch ────────────────│ {type:"patch", baseRev, nextRev, ops}
│ │
│ [Reconnect] │
│──── requestFull ───────────►│ {type:"requestFull", docId}
│◄──── full ─────────────────│
JSON Import Errors
- JSON must be an object with
version,docId,nodes - DSL format:
nodesas array - IR format:
nodesas object (Record) - Validation errors shown in alert with path + message
Quick Test
# Start server
bun run packages/cli/src/index.ts serve examples/diagram.yaml
# Test with wscat
wscat -c ws://localhost:3456
> {"type":"hello","docId":"test"}
What ships with it: 1 file
18.2 KB alongside SKILL.md
- skill-report.json18.2 KB