hackmdio/hackmd-skills/visualize-hmd

Claude Code and agent skill by hackmdio/hackmd-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate an HTML/CSS visualization of the currently discussed plan, topic, architecture decisions, or trade-offs, then publish it to HackMD (My workspace). Runs a build step that converts standalone HTML to HackMD-compatible markup before publishing via CLI, API, or MCP. Use when the user says "visualize", "visualize with HTML/CSS", "show in HTML", "show me with a webpage", or any equivalent request to render a plan visually and publish to HackMD.

Install

npx vskill@latest install hackmdio/hackmd-skills/visualize-hmd

SKILL.md

Visualize — HackMD

Turns conversation context into HTML/CSS, builds HackMD-safe markup, publishes to HackMD.

Scope: User wants a generated visualization from the discussion. If they already have a file to upload, use push-to-hackmd instead.

Paths: In a monorepo checkout, set SKILL_DIR to this folder (e.g. hackmd-skills/visualize-hmd). Scripts live under $SKILL_DIR/scripts/.


For agents (workflow)

Step 1 — Analyze context

Identify: architecture trade-offs, phased plan, decision crux, or topic overview. Extract the crux (hardest tension) — it gets the most visual weight.

Step 2 — Layout selection (decision tree)
Exactly 2 competing options with clear pros/cons?
→ Trade-off map
4–6 sequential phases with distinct boundaries?
→ Phase runway
3+ independent decisions, no natural order?
→ Decision grid
Otherwise / mixed / overview only?
→ Brief (hero + sections); may embed another pattern in one section
Multiple patterns apply?
→ Pick the one that makes the crux most visible
PatternWhen to use
Trade-off mapTwo lanes + divider
Phase runway4–6 cards in a row
Decision grid2×N or 3×N cards
BriefGeneral overview

Use HTML fragments and tokens from reference.md — do not invent new CSS class names.

Step 3 — Write standalone HTML

Write /tmp/viz.html with <!DOCTYPE html>, <html>, <head> (Google Fonts <link>), <body>. No JavaScript. Avoid <main> (build script rewrites to <div>).

Step 4 — Build HackMD output
bash
SKILL_DIR="<path-to>/visualize-hmd"
python3 "$SKILL_DIR/scripts/to-hackmd.py" --strict /tmp/viz.html /tmp/viz-hackmd.html

Check $? — non-zero means conversion failed; do not publish.

One-shot create (optional):

bash
VIZ_TITLE="Visualization — <topic>" "$SKILL_DIR/scripts/publish-viz.sh" /tmp/viz.html /tmp/viz-hackmd.html
Step 5 — Publish channel selection
hackmd-cli in PATH and hackmd-cli whoami succeeds?
yes → CLI (preferred)
else HACKMD_API_TOKEN set?
yes → REST API (see push-to-hackmd / shared/references/api.md)
else HackMD MCP available?
yes → MCP create_note
else → stop; instruct user to hackmd-cli login or set token

Create vs update:

User intentAction
"visualize" (default)Create new note
"update" / provides note URL or idResolve id → export baseline → replace body via ../../shared/scripts/safe-sync.sh
Same title already existsWarn; ask before overwrite

For updates, follow ../../shared/README.md.

Step 6 — Custom CSS + size
  • Append or confirm reminder: <!-- Enable Custom CSS preview: paintbrush → Custom CSS -->
  • Tell the user to enable Custom CSS in the toolbar (required for <style> to apply).
  • If built output > 500 KB, warn; suggest more <details> or split notes.
Failure modes
FailureRecovery
to-hackmd.py --strict failsFix HTML (blank lines in body, <main>, unscoped body{}); rebuild
Publish failsDo not claim success; report CLI/API error
User sees unstyled noteCustom CSS not enabled — repeat step 6

For manual users

See README.md and reference.md for design tokens, patterns, and CLI examples.


Why blank lines break HackMD rendering

HackMD uses markdown-it (CommonMark). Type 6 HTML blocks (<div>, etc.) end at a blank line. The build script removes blank lines inside the body and strips 4-space indentation so content is not parsed as code blocks.


Antipatterns

  • Decorative sections that repeat card content
  • More than 3 accent colors
  • Omitting the crux when a hard trade-off exists
  • JavaScript (stripped by HackMD)

Related skills

Design system

See reference.md.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hackmdio/hackmd-skills/visualize-hmd/badge)](https://verified-skill.com/skills/hackmdio/hackmd-skills/visualize-hmd)

Something wrong with this skill or its page? Tell us.