← ClaudeAtlas

arrow-diagramlisted

Render ASCII arrow/flow diagrams (fan-out, fan-in, decision trees, retry loops) from a small JSON spec — use whenever an answer needs an arrow-based flow or topology diagram instead of hand-aligning box characters. Triggers on "arrow diagram", "ascii diagram", "flow diagram", "draw the pipeline", "conversation flow".
apresmoi/skills · ★ 2 · AI & Automation · score 73
Install: claude install-skill apresmoi/skills
# arrow-diagram — JSON in, aligned ASCII diagram out Never hand-align `┌ ├ └ →` characters. Emit a small JSON spec and run `render.mjs` from this skill's directory: ```bash node render.mjs graph.json # spec from a file node render.mjs '{"flow":[…]}' # inline JSON echo '{"flow":[…]}' | node render.mjs node render.mjs --help ``` ## Know the width of the destination first A diagram wider than the box it lands in soft-wraps and turns into garbage. The renderer plans against a column budget: `--width N` on the CLI, else `"width": N` in the spec, else **80**. Before rendering, decide the budget: | Destination | Budget | |---|---| | Chat UI code block (Claude, ChatGPT, Slack, GitHub comment) | 80, the default | | Terminal | `$COLUMNS`, or `tput cols` | | Markdown file, README | 80 to 100 | With no `dir`, the renderer picks the first mode that fits, in this order: `lr`, a wrapped chain (plain chains without loops), `tree` (no loops), `tb` (plain fans, no branch). An explicit `dir` is always honoured, but an overflow prints a warning on stderr naming which modes would fit. When nothing fits, it exits 2 listing why each mode failed: shorten labels, raise the budget, or split the diagram. A wrapped chain snakes onto the next row: ``` receive request ─→ validate schema ─→ authenticate caller ─┐ ┌──────────────────────────────────────────────────────────┘ └─→ load tenant config ─→ apply rate limit ─→ send ``` The diagram goes to stdout. Exit 0 on success; exit 2 wit