About visualize
A skill that identifies the shape of content and presents it in a suitable visualization, from Mermaid diagrams to tables or ASCII. It is intended for turning concepts, flows, comparisons, and structures into a format suited to the output surface.
Key features
- 01Infer content from arguments or context
- 02Choose a format by content shape
- 03Support Mermaid, tables, and ASCII
- 04Use surface-aware rendering rules
- 05Accept an explicit format override
Use cases
- 01Diagram an architecture or request flow
- 02Show lifecycle states or data relationships
- 03Compare options or display a hierarchy
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ camacho/ ai-skills --skill visualizeAfter installing, type/visualizein Claude Code to confirm it loaded.
Bundled filesscripts/render-mermaid.ts
Details
From the project README/visualize
Auto-detect content shape and render the appropriate visualization. Follows the active-selection rule from ai-workspace/rules/visualizations.md.
Usage
/visualize # visualize the last discussed concept
/visualize <topic or file> # visualize specific content
/visualize --format mermaid <topic> # force a specific format
Steps
-
Identify content. From args, recent conversation context, or a file path. Determine what needs visualizing.
-
Classify content shape. Use this decision table:
Content shape Signal Format Graph with nodes + edges architecture, dependencies, flow between components Mermaid graphorflowchartSequence / interaction request flow, API calls, multi-step protocol Mermaid sequenceDiagramState transitions modes, lifecycle, status changes Mermaid stateDiagram-v2Comparison (3+ items) options, tradeoffs, feature matrix Markdown table Hierarchy / tree file structure, org chart, simple nesting ASCII art Contrast (2 items) before/after, good/bad, do/don't Inline pairs Entity relationships data model, schema Mermaid erDiagram -
Check render surface. Mermaid in committed
.mdfiles renders on iOS/web/GitHub/VS Code. In terminal chunks, Mermaid is literal text — use ASCII instead. When surface is unknown, default to ASCII. -
Render.
- ASCII / table / inline pairs: output directly in the response.
- Mermaid: output as a fenced
mermaidcode block in the response. If high-resolution PNG is needed:node --import tsx "${SKILL_DIR}/scripts/render-mermaid.ts" --input <mermaid-file> --output <png-path> --width 2400 --height 1800 - Format override: if user passed
--format, use that format regardless of auto-detection.
-
Present. Show the visualization. If Mermaid PNG was rendered, display the path.
Failure modes
| Condition | Behavior |
|---|---|
| Content shape ambiguous | Ask: "This could be a [X] or [Y] — which fits better?" |
| Mermaid syntax error | Show the error, offer to fix |
| mmdc not available | Fall back to fenced Mermaid block (renders on GitHub/web) |
Cross-tool notes
- Codex / Cursor: run
scripts/render-mermaid.tsdirectly for PNG rendering. Content-shape detection is agent reasoning, not script logic.