Generate or edit diagrams, visual assets, and image workflows, and perform reviewable self-checks and repair iterations on exported PNGs.
workflow route when Mermaid is unavailable or browser-specific lane/style delivery is required for process maps, approvals, automation runs, exception paths, and cyclical operating flows that need readable start/end, decision, actor, numbered-step, and summary treatment without requiring diagrams.net.ER diagrams, UML class diagrams, sequence diagrams, technical architecture diagrams, ML/deep learning, flow charts, etc., give priority to creating structured sources according to diagram-workflows.md.
For themed browser-ready system blueprints, architecture, workflow, sequence, data-flow and lifecycle diagrams, read html-technical-diagrams.md, then render JSON IR with tech-diagram-render.mjs. For process workflows, model participants as lanes, ordered actions as nodes, and exception or loop paths as edges with optional waypoints:
bash
node skills/fec-image-generation/scripts/tech-diagram-render.mjs --input diagram.json --output diagram.html --type architecture --manifest diagram.layout.json
For agent and memory diagrams, prefer architecture IR with semantic node types such as agent, model, memory, vectorstore, graphdb, tool, document, queue, browser, user, and gateway. Add connection flow values ( control, data, read, write, async, feedback) when arrow meaning matters; two or more flow types produce an automatic flow legend.
Use optional visual.style for source-owned theme direction: default, terminal, blueprint, minimal, glass, warm, openai, or editorial-dark. Treat these as delivery themes, not brand guarantees.
When README-friendly SVG, PNG, JPG, or JPEG artifacts are needed from generated HTML/SVG sources, export with export-diagram.mjs: bash
node skills/fec-image-generation/scripts/export-diagram.mjs --input diagram.html --format svg
node skills/fec-image-generation/scripts/export-diagram.mjs --input diagram.html --format png --output diagram.png --scale 2
For live interactive sketches, start interactive-diagram-server.mjs, open the served interactive-diagram.html page with a unique ?s=session-id, then POST small JSON commands to /cmd?s=session-id:
bash
node skills/fec-image-generation/scripts/interactive-diagram-server.mjs --port 6100
curl -s "http://127.0.0.1:6100/cmd?s=checkout-flow" -d '{"cmd":"init","title":"Checkout Flow","direction":"TB"}'
curl -s "http://127.0.0.1:6100/cmd?s=checkout-flow" -d '{"cmd":"node","id":"cart","label":"Review cart","type":"process"}'
Use the draw.io studio workflow instead when the priority is editable .drawio source, official diagrams.net shapes, or long-term manual editing.
Posters, UI mockups, product graphics, infographics, academic graphics, comics, avatars, storyboards, brand boards and image editing, press artifact-routing.md to choose generate, edit or hybrid routing.
Read the exported PNG before each delivery to check whether the main body is truly rendered, whether the text is truncated, whether the connections are stacked, and whether the nodes overlap.
Run when there is a layout manifest: bash
node skills/fec-image-generation/scripts/png-qa.mjs --png output.png --manifest layout.json --format markdown
Still running PNG basic checks without manifest: bash
node skills/fec-image-generation/scripts/png-qa.mjs --png output.png --format json
.drawio instead when official vendor icons or long-term manual editing are the priority..drawio when long-term source ownership matters.Produce editable source, final PNG or edited image with generated routes and QA results. Diagrams should be clearly structured, with uncensored labels and uncluttered connections; visual assets should match purpose, size, brand tone, and delivery path.
Prefer locally installed Mermaid for standard sequence diagrams and flowcharts. Reuse fec-drawio-studio for architecture that needs long-term manual editing; local Graphviz is optional for dense topology. Record unavailable tools and fall back to the compatible JSON/HTML route without installation, downloads or CDN. Preserve complete text and every node/relationship; do not silently rearrange explicit sizes, coordinates or waypoints.
sh
node skills/fec-image-generation/scripts/mermaid-render.mjs --input sequence.mmd --output sequence.svg --report sequence.render.json
node skills/fec-image-generation/scripts/export-diagram.mjs --input diagram.html --format png --output diagram.png --theme light --scale 2 --manifest diagram.layout.json --output-manifest diagram.actual.json
node skills/fec-image-generation/scripts/png-qa.mjs --png diagram.png --manifest diagram.actual.json --format json
Use the exported actual manifest for PNG QA. The source manifest has SVG coordinates and estimated bounds and cannot be reused unchanged at 2x. Browser export waits for fonts and measures real text bounds; standalone SVG embeds theme styles. Successful rendering, estimates and passing automation do not prove visual acceptance. Inspect the final PNG and record tool versions, theme, scale, repair rounds, unresolved issues and partial acceptance. Higher resolution cannot repair truncated text or layout collisions.
Bundled internal modules and reproducible fixtures:
The built-in sequence route supports participants and ordered messages. Use Mermaid for activations, alt/loop/par fragments and complex async semantics; never silently simplify them into plain messages. Enable optional ELK only when the installed Mermaid version supports it, otherwise use its compatible default layout.