一键导入
debug-connection
Debug WebSocket connection issues between CLI and FigJam plugin. Use when diagrams aren't syncing or connection fails.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug WebSocket connection issues between CLI and FigJam plugin. Use when diagrams aren't syncing or connection fails.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | debug-connection |
| description | Debug WebSocket connection issues between CLI and FigJam plugin. Use when diagrams aren't syncing or connection fails. |
┌─────────────┐ 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)
│ │
A-share short-term trading decision skill for 1-5 day horizon. Use when you need real-data market sentiment, sector rotation, strong stock scanning, capital flow confirmation, date-based short-term signal scoring, prediction logging, and next-day market comparison for CN A-share momentum trading.
Generate agile release plans with sprints and roadmaps using unique sprint codes. Use when creating sprint schedules, product roadmaps, release planning, or when user mentions agile planning, sprints, roadmap, or release plans.
Change public APIs without breaking clients—versioning schemes, additive vs breaking changes, deprecation windows, and comms. Use when shipping breaking changes, sunsetting fields, or coordinating mobile/web SDK consumers.
Organizational coding standards and architectural patterns. References comprehensive skills for detailed patterns. Use when making architecture decisions or implementing features.
Search arXiv preprint repository for papers in physics, mathematics, computer science, quantitative biology, and related fields.
ATLAS Framework - Structured AI-assisted development methodology with GOTCHA 6-layer architecture and 5-step app building workflow. Use when building applications, creating workflows, or setting up agentic systems.