Skip to content
Back to skills

2594 Preview Guide 1f22c13f

ASecurity

After generating the diagram, offer the user a localhost preview for real-time iteration.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
toolspythonbashnode

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2594-preview-guide_1f22c13f --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2594 Preview Guide 1f22c13f?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2594 Preview Guide 1f22c13f
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2594-preview-guide-1f22c13f/badge)](https://www.skillsdirectory.com/skills/tools-only-2594-preview-guide-1f22c13f)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
<!-- Parent: sf-diagram-mermaid/SKILL.md -->
# Mermaid Preview Server Guide

After generating the diagram, offer the user a localhost preview for real-time iteration.

## Start Preview

1. Save Mermaid code to temporary file:
   ```
   Write: /tmp/mermaid-preview.mmd
   [Mermaid code content]
   ```

2. Start preview server (runs in background):
   ```bash
   # From marketplace folder (always available):
   python ~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/preview/mermaid_preview.py start --file /tmp/mermaid-preview.mmd

   # Or from project folder (if working locally):
   python [project-root]/sf-diagram-mermaid/preview/mermaid_preview.py start --file /tmp/mermaid-preview.mmd
   ```

3. Provide URL to user:
   > **Preview available**: http://localhost:8765
   >
   > The browser will auto-reload when you update the diagram.

## Iteration Workflow

- User views diagram in browser
- User requests changes ("make boxes pink", "add another node")
- You update `/tmp/mermaid-preview.mmd` using the Write tool
- Browser auto-reloads with new diagram (via SSE)
- Repeat until user is satisfied

## Stop Preview

When user is done:
```bash
python ~/.claude/plugins/marketplaces/sf-skills/sf-diagram-mermaid/preview/mermaid_preview.py stop
```

## Preview Server Features

- Live reload via Server-Sent Events (SSE)
- Dark/light theme auto-detection
- Copy Mermaid code button
- Download as SVG button
- Connection status indicator

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…