amw-diagram-convert

Converts diagrams between ASCII, HTML, SVG, Mermaid, and PNG formats via a validated pipeline.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/Emasoft/ai-maestro-webdesign --skill amw-diagram-convert-emasoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: amw-diagram-convert
Source: https://github.com/Emasoft/ai-maestro-webdesign/tree/main/skills/amw-diagram-convert
Command: npx skills add https://github.com/Emasoft/ai-maestro-webdesign --skill amw-diagram-convert-emasoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cairosvg, lxml, and includes scripts (resource) and references (resource) components.

What problem does it solve? Teams maintain diagrams in many formats, and manually redrawing a flowchart or wireframe when switching tools wastes time and introduces errors. This Skill automates cross-format diagram conversion across a 5-format matrix (ASCII, HTML, SVG, Mermaid, PNG) with a deterministic detect → parse → emit → validate pipeline. ## Core Features & Use Cases - Cross-format conversion: Convert any diagram between ASCII, HTML, SVG, Mermaid, and PNG using a dispatch matrix with direct, IR-based, and two-step conversion paths. - Intermediate Representation (IR): Parse sources into a shared IR JSON for normalize-then-edit workflows before emitting the target format. - Validation gate: Every output is validated with a unified PASS/FAIL contract; failed conversions are aborted with FIX hints instead of delivering broken files. - PNG output-only rule: PNG is accepted as a target from any format but refused as a source, enforcing re-authoring from the original artifact. - Use Case: You have an ASCII wireframe from a planning doc and need an SVG for a design review. Run the conversion, and the Skill detects the format, parses to IR, emits SVG, validates it, and writes the file next to the source. ## Quick Start Ask the AI to convert your diagram file to another format, for example: convert my flowchart.mmd to SVG using /amw-convert-any-diagram-format.

Frequently Asked Questions about amw-diagram-convert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert an ASCII diagram to SVG?▼

Provide the ASCII diagram file and request SVG as the target format. The Skill detects the source format, parses it into an intermediate representation, emits SVG, validates the output, and writes the file next to the source by default.

How to convert a Mermaid diagram to PNG?▼

Request PNG as the target format for your Mermaid source file. The conversion runs through the mmdc-based rendering pipeline, and the output is validated before being written to the output path.

Can I convert a PNG image back to SVG or Mermaid?▼

No. PNG is output-only by plugin directive, so any PNG source triggers an immediate refusal with exit code 2. You must provide the original ASCII, HTML, SVG, or Mermaid source artifact instead.

What tools are required for diagram format conversion?▼

The pipeline requires python3, xmllint, mmdc for Mermaid targets, cairosvg for SVG-to-PNG rasterization, and playwright for HTML-to-PNG export. Missing dependencies exit with code 3 and direct you to the init or doctor commands.

What happens if the converted diagram fails validation?▼

The conversion is aborted and the original source file is left untouched. The Skill surfaces all FAIL lines with their FIX hints so you can correct the issue and retry, rather than delivering an invalid output file.