# Debug FigJam WebSocket Connections

FigJam plugin development can fail when the CLI, WebSocket server, and plugin consoles disagree. This skill gives a focused checklist for diagnosing connection, sync, and patch problems.

## Install

```bash
npx skillstore add 7nohe/debug-connection
```

## Metadata

- Status: approved
- Slug: 7nohe-debug-connection
- Skillstore revision: r1
- Version status: missing
- Tree hash: 44fcdb725c20f583932b1b63ccb853084549128034ee335cccdd541555327497
- Author: 7nohe
- GitHub username: 7nohe
- License: MIT
- Repository: https://github.com/7nohe/figram/tree/main/.claude/skills/debug-connection
- Ref: e9e4712298ed071d92417a41714be123eb8364fa
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 77
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/7nohe-debug-connection
- Manifest: https://skillstore.pages.dev/api/skills/7nohe-debug-connection/manifest

## Capabilities

- Explains the CLI, plugin UI, and plugin main connection flow.
- Maps common symptoms to likely causes and local checks.
- Guides inspection of CLI output, plugin UI console, and Figma development console.
- Documents WebSocket hello, full, patch, and request-full message flow.
- Lists JSON import expectations for DSL and IR node formats.
- Provides a quick local WebSocket test using the configured server port.

## Use Cases

- Restore Diagram Sync: Diagnose why diagram changes do not reach the FigJam canvas.
- Triage Console Errors: Compare CLI, plugin UI, and plugin main logs during connection failures.
- Validate WebSocket Setup: Check ports, secrets, document identifiers, and test client behavior.

## Prompt Templates

### Basic Connection Check

```
Help me debug a FigJam plugin that stays on Connecting. Ask for the CLI output, plugin UI console, and server port.
```

### Sync Failure Triage

```
A diagram connects but canvas updates do not appear. Walk through likely causes using the debug-connection checklist.
```

### Message Flow Review

```
Review my FigJam plugin WebSocket flow. Check hello, full, patch, and reconnect behavior against the expected sequence.
```

### Full Incident Diagnosis

```
Create a step-by-step diagnosis plan for CLI errors, port conflicts, secret mismatch, docId mismatch, and patch failures.
```

## Limitations

- Does not include executable helper scripts or automated diagnostics.
- Assumes the project uses the FigJam plugin architecture described in the skill.
- Does not resolve WebSocket server bugs without access to project source code.
- Requires local tools such as Bun or a WebSocket client for some checks.

## Best Practices

- Check the CLI, plugin UI, and plugin main consoles before changing source code.
- Verify secrets, document identifiers, and ports with the same values on both sides.
- Reproduce failures with a minimal diagram before debugging complex content.

## Anti Patterns

- Assuming the canvas renderer is broken before checking connection state.
- Changing several connection settings at once during diagnosis.
- Ignoring validation errors from the CLI build step.

## Security Audit

- Audited at: 2026-07-04T17:27:11.74\+00:00
- Summary: All 13 static findings are false positives from Markdown code fences or inline literals in SKILL.md. The skill provides local WebSocket debugging guidance and hardcoded diagnostic commands; no prompt injection, exfiltration, or dynamic execution intent was found.

## Stats

- Views: 211
- Downloads: 15
- Favorites: 0
- Popularity score: 0
