Monodraw llm
Turn ASCII architecture diagrams into native, editable Monodraw documents with Codex or Claude Code.
npx -y skills add p404/monodraw-llm --skill monodraw-llmAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Turn natural-language descriptions, ASCII/text diagrams, screenshots, and existing `.monopic` or `.monojson` files into native editable Monodraw documents. Create, reconstruct, inspect, validate, and regression-test complex diagrams with separate resizable frames, nested groups, attached or free-endpoint connectors, arrows, shadows, z-order, and pinned connector labels. Use whenever an LLM should sketch a diagram in ASCII and export it to Monodraw, recreate a screenshot or legacy v3/current v5 document 1:1, or diagnose Monodraw serialization and editability.
SKILL.md
6.3 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Monodraw LLM
Generate Monodraw v5 object graphs with editable frames, containers, text, shadows, borders, connectors, free endpoints, and line-pinned labels. Emit both native .monopic and inspectable .monojson files.
Choose the workflow
- Create a new diagram from a description: when useful, draft an ASCII preview first, then write a compact JSON spec, use automatic ranking where useful, and generate both outputs.
- Convert an ASCII diagram: treat it as a visual and semantic blueprint, translate its objects into native frames/groups/connectors, and preserve its relative layout with explicit geometry.
- Recreate an existing
.monopic: runextract-spec, preserve explicit geometry andz_order, regenerate, then compare with Monodraw's renderer. - Recreate a screenshot: inspect the screenshot, write explicit positions/sizes/styles, generate, open in Monodraw, and iterate from a new screenshot.
- Diagnose a file: run
inspect,unpack, andvalidatebefore editing. - Verify many files: run
regressand require an exact-render report or clearly report remaining diffs.
Resolve the directory containing this SKILL.md as SKILL_DIR. Claude Code exposes it as ${CLAUDE_SKILL_DIR}; in Codex, use the discovered skill path. Then use the bundled wrapper:
CLI="$SKILL_DIR/scripts/monodraw-llm"
Convert an ASCII sketch to editable Monodraw
When the user asks for an ASCII diagram and a Monodraw export, use this two-stage workflow:
- Draft or refine the text diagram in the conversation. If the user already supplied one, use it as the design contract.
- Map every box to a
nodeorgroup; map nested boundaries to parent/child groups. - Map arrows and lines to
edges, including direction, attachment sides, labels, dashed styles, and deliberately free endpoints. - Preserve horizontal/vertical ordering and whitespace relationships with explicit
position,width, andheightvalues when layout fidelity matters. - For a label that must move with its connector, add a
line_positionsentry plus a node or annotation with a matchingpin. An edgelabelalone creates an editable but absolutely positioned midpoint label. - Generate, validate, and open or render the result when Monodraw is available.
Do not paste the full ASCII drawing into one Monodraw text frame. The goal is a diagram made from separate editable native objects. The LLM performs the semantic translation; the CLI performs deterministic serialization.
Create a new editable diagram
- Read
references/spec.mdbefore writing a non-trivial spec. - Use concise multiline labels and stable semantic IDs.
- Represent visual boundaries as
groups; represent components asnodes. - Attach edges to frame sides. Use free points only when a connector deliberately ends in open space.
- Use explicit positions for screenshot fidelity. Use ranks/automatic layout for a new architecture.
- Generate and validate:
"$CLI" generate diagram.json -o diagram.monopic
"$CLI" validate diagram.monopic
open -a Monodraw diagram.monopic
The generate command writes the .monopic plus a readable .monojson sibling unless --monopic-only is passed.
Use assets/multi-region-checkout.json as the primary complex authored example. It exercises nested regions, service and data tiers, shadows, routed incident paths, and pinned labels. For a 1:1 example, extract any existing .monopic and preserve the resulting explicit geometry and z-order.
Recreate an existing document 1:1
Extract a source spec instead of manually reverse-engineering its internal IDs:
"$CLI" extract-spec source.monopic -o source.spec.json
"$CLI" generate source.spec.json -o recreated.monopic
monodraw -u -w source.monopic > original.txt
monodraw -u -w recreated.monopic > recreated.txt
diff -u original.txt recreated.txt
Preserve these fields when editing an extracted spec:
position,width, andheightfor exact geometry.- Separate
nameandlabelvalues when both exist. z_order, which Monodraw interprets front-to-back.line_positionsand framepinrecords for labels that follow connectors.- Explicit connector sides, arrows, free points, line style, and origin.
Do not claim 1:1 fidelity from structural validation alone. Require no renderer diff, or use screenshots when the installed renderer is unavailable.
Run corpus regression
Use Monodraw's renderer as the authoritative visual oracle:
"$CLI" regress path/to/files -o regression-output
The output contains, per case, the extracted spec, fresh v5 files, original/generated Unicode renders, and a unified diff. It also writes report.json and report.md.
Pass --open-failures only when visual inspection is useful; avoid opening every passing document.
Inspect and convert
"$CLI" inspect diagram.monopic
"$CLI" unpack diagram.monopic diagram.monojson
"$CLI" pack diagram.monojson diagram.monopic
"$CLI" validate diagram.monopic diagram.monojson
Use --force with pack only after deliberately accepting validation errors.
Preserve native editability
- Emit type-20 frames and type-5 connectors, not a raster image or one flattened text block.
- Keep connector endpoints attached to frame side records so dragging/resizing remains useful.
- Use type-24 line positions for pinned labels so labels move with their connectors.
- Place outer containers last in default
z_order; otherwise they mask their contents. - Retain the
.monojsonsibling as the reviewable source when practical. - Re-open the final
.monopicin Monodraw after any format-level change.
Load references selectively
- Read
references/spec.mdto author or modify diagram specs. - Read
references/format.mdwhen diagnosing serialization, object references, legacy v3 behavior, z-order, or pinned-label problems.
What ships with it: 8 files
40.5 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml255 B
assets/
- complex-observability.json6.3 KB
- diagram.schema.json8.3 KB
- multi-region-checkout.json11.0 KB
- pinned-label.json1.1 KB
scripts/
- monodraw-llmruns629 B