--- name: concept-to-image description: > Turn any concept, idea, or description into a polished static HTML visual, then export it as a PNG or SVG image. Use this skill whenever the user wants to create a visual representation of an idea and needs an image file output (PNG or SVG). This includes: infographics, concept diagrams, flowcharts, comparison charts, process visuals, educational diagrams, social media graphics, data visualizations, posters, cards, badges, icons, logos sketches, or any "make me an image of X" request that can be achieved with HTML/CSS/SVG rather than photographic AI generation. Also trigger when the user has an existing HTML visual and wants to export/convert it to PNG or SVG. Trigger phrases include: "create an image of", "make a visual", "design a graphic", "export as PNG", "save as SVG", "concept to image", "turn this into an image", "screenshot this HTML", "generate an infographic", or any request combining a concept description with image output. metadata: version: 1.0.0 --- # Concept to Image Creates polished visuals from concepts using HTML/CSS/SVG as a refineable intermediate, then exports to PNG or SVG. ## Reference Files | File | Purpose | | ----------------------------- | ------------------------------------------------------------------------------------ | | `references/design-guide.md` | Design patterns, anti-patterns, color palettes, typography choices, layout examples | | `scripts/render_to_image.py` | Playwright-based export script — takes HTML in, PNG or SVG out | | `assets/template.html` | Base HTML template with `.canvas` container and CSS custom properties pre-configured | ## Why HTML as intermediate HTML is the refineable layer between idea and image. Unlike direct canvas rendering, the user can see the HTML artifact, request changes ("make the title bigger", "swap the colors", "add a third column"), and only export once satisfied. This makes the workflow iterative and controllable. ## Workflow ``` Concept → HTML artifact (view + refine) → PNG or SVG export ``` 1. **Interpret** the user's concept — determine what kind of visual best fits (diagram, infographic, card, chart, etc.) 2. **Design** a self-contained HTML file using inline CSS and inline SVG — zero external dependencies 3. **Present** the HTML as an artifact so the user can preview and request refinements 4. **Iterate** on the HTML based on user feedback (colors, layout, content, sizing) 5. **Export** to PNG and/or SVG when the user is satisfied, using `scripts/render_to_image.py` ## Step 1: Interpret the concept Determine the best visual format: | User intent | Visual format | Approach | | ------------------------ | ----------------------------- | ---------------------------------- | | Explain a process/flow | Flowchart or pipeline diagram | SVG paths + boxes | | Compare items | Side-by-side or matrix | CSS Grid | | Show hierarchy | Tree or layered diagram | Nested containers + SVG connectors | | Present data | Chart or infographic | SVG shapes + data labels | | Social/marketing graphic | Card or poster | Typography-forward HTML/CSS | | Icon, logo, badge | Compact symbol | Pure SVG | | Educational concept | Annotated diagram | SVG + positioned labels | ## Step 2: Design the HTML Read `references/design-guide.md` for detailed design patterns and anti-patterns. Core rules: - **Single file, self-contained**: All CSS inline in `