skills/7nohe/debug-connection/SKILL.md
Debug WebSocket connection issues between CLI and FigJam plugin. Use when diagrams aren't syncing or connection fails.
npx skillsauth add aiskillstore/marketplace debug-connectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
┌─────────────┐ WebSocket ┌─────────────────┐ postMessage ┌─────────────────┐
│ CLI serve │ ◄───────────────► │ Plugin UI │ ◄───────────────► │ Plugin Main │
│ (Bun) │ ws://...:3456 │ (ui.ts) │ │ (code.ts) │
└─────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ File watcher │ Browser APIs │ Figma API
│ YAML parsing │ WebSocket client │ Canvas rendering
└───────────────────────────────────┴─────────────────────────────────────┘
Symptoms: Plugin shows "Connecting..." indefinitely
Check:
# Is CLI serve running?
ps aux | grep "figram serve"
# Check port availability (default: 3456)
lsof -i :3456
Solution: Start CLI with bun run packages/cli/src/index.ts serve diagram.yaml
Symptoms: Works initially, then stops syncing
Check:
Solution: Check for YAML parse errors blocking updates
Symptoms: Connected but canvas doesn't update
Debug steps:
Symptoms: CLI shows validation errors
Solution: Validate YAML syntax and schema compliance
Symptoms: Connection established but immediately closed
Check: Ensure --secret flag value matches between CLI and plugin
Symptoms: Import dialog shows an error alert
Check:
version, docId, and nodes arrayversion, docId, and nodes objectSolution: Fix validation errors shown in the alert (path + message)
# Run with verbose output
DEBUG=* bun run packages/cli/src/index.ts serve diagram.yaml
# Specify custom port
bun run packages/cli/src/index.ts serve diagram.yaml --port 8080
# With authentication
bun run packages/cli/src/index.ts serve diagram.yaml --secret mysecret
// Connection initiation
interface HelloMessage {
type: "hello";
docId: string;
secret?: string; // If server requires authentication
}
// Request full sync (e.g., after reconnection)
interface RequestFullMessage {
type: "requestFull";
docId: string;
}
// Full document sync
interface FullMessage {
type: "full";
rev: number; // Current revision number
ir: IRDocument; // Complete normalized document
}
// Incremental update
interface PatchMessage {
type: "patch";
baseRev: number; // Expected current revision
nextRev: number; // New revision after applying
ops: PatchOp[]; // Operations to apply
}
// Error notification
interface ErrorMessage {
type: "error";
message: string;
}
type PatchOp =
| { op: "upsertNode"; node: IRNode }
| { op: "removeNode"; id: string }
| { op: "upsertEdge"; edge: IREdge }
| { op: "removeEdge"; id: string };
# 1. Start CLI serve (default port: 3456)
bun run packages/cli/src/index.ts serve examples/diagram.yaml
# 2. Test WebSocket with wscat (if installed)
wscat -c ws://localhost:3456
# 3. Send hello message
{"type":"hello","docId":"test"}
# 4. Check YAML is valid
bun run packages/cli/src/index.ts build examples/diagram.yaml
Plugin CLI
│ │
│──── HelloMessage ───────────►│ (docId, secret?)
│ │
│◄──── FullMessage ───────────│ (rev, ir)
│ │
│ [YAML file changes] │
│ │
│◄──── PatchMessage ──────────│ (baseRev, nextRev, ops)
│ │
│ [Plugin reconnects] │
│ │
│──── RequestFullMessage ─────►│ (docId)
│ │
│◄──── FullMessage ───────────│ (rev, ir)
│ │
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.