agentleFS
iamcaominhtieniamcaominhtien/kanban-board-mcp/.github/skills/hand-drawn-diagrams/AGENTS.md

kanban-board-mcp / hand-drawn-diagrams

AGENTS.md1 starsChanged 3 days agoMITView on GitHub

AI skill that converts natural language prompts into hand-drawn Excalidraw diagrams with hosted edit URLs, animated SVGs, and PNGs. This skill follows a strict 3-step process. Never skip steps or reorder them. Load references/activation-routing.xml and references/fundamental-shapes.md first, then one route guide from references/. Both files must exist before Step 3 begins. Deliver the full Edit URL as a clickable link. Offer animation at the end. Write to workspace only if the user specifies a path or explicitly asks.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write two files (in /tmp/hand-drawn-diagrams/<slug>/ by default):

    line 28
  2. Distinctive:

    Use when available for PNG and animated SVG rendering:

    line 60
  3. Distinctive:

    Write to workspace only if the user specifies a path or explicitly asks.

    line 82
  4. Very specific:

    Run open_diagram.py — opens browser with open.html launcher.

    line 96
  5. Very specific:

    If in /tmp, offer: "Want me to save the source file to your project?"

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Project: hand-drawn-diagrams

AI skill that converts natural language prompts into hand-drawn Excalidraw diagrams with hosted edit URLs, animated SVGs, and PNGs.

Agent Workflow

This skill follows a strict 3-step process. Never skip steps or reorder them.

Step 1 — Route (steps/step-01-route.md)

Pick one diagram type from the routing table:

RouteKeywords
teachersteach, explain simply, lesson, compare, ELI5
ideationbrainstorm, cluster notes, opportunity map
uxjourney, wireflow, sitemap, screen flow
sales-funnelfunnel, drop-off, conversion, leads
technical-explainerarchitecture, API, protocol, event flow
medicalcondition, diagnosis, treatment, patient
creative-rawopen/explicit creative mode
page-mockupwebpage, dashboard, landing page, UI

Load references/activation-routing.xml and references/fundamental-shapes.md first, then one route guide from references/.

Step 2 — Draw (steps/step-02-draw.md)

Write two files (in /tmp/hand-drawn-diagrams/<slug>/ by default):

  1. diagram.excalidraw — complete .excalidraw JSON with non-empty elements array
  2. diagram.animationinfo.json — animation spec with story pattern and element order

Both files must exist before Step 3 begins.

Step 3 — Validate & Deliver (steps/step-03-validate.md)

# 1. Validate first — fix all errors before proceeding
cd scripts && uv run python validate_excalidraw.py "/tmp/hand-drawn-diagrams/<slug>/diagram.excalidraw"

# 2. Generate hosted URLs only after validation passes
cd scripts && uv run python get_excalidraw_urls.py "/tmp/hand-drawn-diagrams/<slug>/diagram.excalidraw"

Deliver the full Edit URL as a clickable link. Offer animation at the end.

Tool Usage

Rendering tools (always cd scripts first, use uv run)

ToolWhen to use
validate_excalidraw.pyAlways — before URL generation
open_diagram.pyAfter validation — writes open.html, opens browser, prints short local path
get_excalidraw_urls.pyFallback only — prints raw hosted URLs when open_diagram.py unavailable
edit_excalidraw.pyOpen diagram directly in hosted editor (legacy)
render_excalidraw.pyPNG export (Playwright fallback)
render_animated_svg.pyAnimated SVG (Playwright fallback)

Chrome DevTools MCP (preferred over Playwright)

Use when available for PNG and animated SVG rendering:

  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__new_page
  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__navigate_page
  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__wait_for
  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__evaluate_script (extract SVG)
  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__take_screenshot (PNG)
  • mcp__plugin_chrome-devtools-mcp_chrome-devtools__close_page

Excalidraw MCP (for checkpointing)

  • mcp__claude_ai_excalidraw__export_to_excalidraw
  • mcp__claude_ai_excalidraw__create_view
  • mcp__claude_ai_excalidraw__save_checkpoint / read_checkpoint

File Location Rules

ArtifactDefault location
.excalidraw/tmp/hand-drawn-diagrams/<slug>/diagram.excalidraw
.animationinfo.json/tmp/hand-drawn-diagrams/<slug>/diagram.animationinfo.json
.animated.svgUser's current project/workspace directory
.pngUser's current project/workspace directory

Write to workspace only if the user specifies a path or explicitly asks.

Diagram Rules

  • Monochrome by default — no fills unless essential for clarity
  • Sketch font — same font across all elements
  • 1–5 word labels — never write sentences or paragraphs inside shapes
  • No floating arrows — bind with startBinding/endBinding
  • Bind text to containers — use containerId + boundElements
  • One concept per box — split instead of cramming
  • Non-overlapping layout — use grid from references/element-templates.md

Delivery Pattern

  1. Run open_diagram.py — opens browser with open.html launcher. Deliver the printed local path as [Open diagram](file:///tmp/.../open.html). Never paste the raw hosted URL — it is too long to be usable.
  2. Offer: "Want a video version? I can render it as an animated diagram (~10s)"
  3. If in /tmp, offer: "Want me to save the source file to your project?"
  4. PNG only if user explicitly asked for an image

Critical Rules

  1. Never render before the .excalidraw file exists and validates clean
  2. Never run get_excalidraw_urls.py before validate_excalidraw.py exits 0
  3. Never write source files to the user's workspace without being asked
  4. Always write .animated.svg to the user's workspace (it is the video deliverable)
  5. Never skip or reorder the 3 steps — even if video was the original request

Testing

cd scripts
uv run pytest                   # full test suite
uv run pytest -m "not slow"     # skip Playwright/Chromium browser tests

References

  • references/index.md — index of all reference documents
  • references/activation-routing.xml — full routing rules
  • references/fundamental-shapes.md — shape vocabulary
  • references/json-schema.md — .excalidraw JSON format
  • references/element-templates.md — grid layout + element templates
  • references/animation-spec.md — animation story patterns
  • references/quality-checklist.md — diagram quality criteria

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.