Create Mermaid Generator Skill
Prompt
Use the skill-generator skill to create a new skill called mermaid-generator. This will take an
textual description of a workflow diagram and render it using the mermaid javascript library. By
default it will use a top-down rendering and colorful backgrounds for each item. All labels will
use a 16-point font. Edges between items will also have a 16 label. If the description of the
diagram is not complete, prompt the user for additional information. All workflow diagrams must have
a DIAGRAM_NAME in lower-case with only dashes. Suggest a name if the user does not specify a name.
Create the following files in the /docs/sims/{{DIAGRAM_NAME}} directory:
- index.md - with the
- main.html - the HTML file we reference in the
- script.js - javascript code
- style.css - CSS style sheet
- metadata.json - Dublin Core for search engine and reuse
⏺ I'll use the skill-creator skill to help you create a new mermaid-generator skill that generates workflow diagrams using the Mermaid JavaScript library.
The "skill-creator" skill is running
The "skill-creator" skill is running
⏺ I'll help you create the mermaid-generator skill. Let me start by understanding the skill requirements better with some clarifying questions.
⏺ User answered Claude's questions: ⎿ · What format should the mermaid-generator skill output? An HTML file with embedded Mermaid, markdown with mermaid code blocks, or both? → Standalone HTML file · What types of Mermaid diagrams should this skill support? → Flowcharts · Where should the generated diagrams be saved in an intelligent textbook project? → /docs/sims and use a format similar to the other microsims that use an index.md, data.json, stylel.css, main.html and script.js files in the /docs/sims/NAME · Should the skill include a reference guide for Mermaid syntax? → Yes, include reference
⏺ Perfect! Now I understand the requirements. The skill will: - Generate standalone HTML files in the MicroSim format - Focus on flowchart diagrams - Save to /docs/sims/NAME with the standard structure (index.md, metadata.json, style.css, main.html, script.js) - Include Mermaid syntax reference documentation
Let me create this skill following the skill creation process.
⏺ Bash(python3 $HOME/.claude/skills/skill-creator/scripts/init_skill.py mermaid-generator --path
$HOME/Documents/ws/claude-skills/skills)
⎿ 🚀 Initializing skill: mermaid-generator
Location: $HOME/Documents/ws/claude-skills/skills
… +13 lines (ctrl+o to expand)
⏺ Read(skills/mermaid-generator/SKILL.md) ⎿ Read 86 lines
⏺ Bash(rm $HOME/Documents/ws/claude-skills/skills/mermaid-generator/scripts/example.py $HOME/Documents/ws/claude-skills/skills/mermaid-generator/references/a…) ⎿ (No content)
⏺ Fetch(https://mermaid.js.org/syntax/flowchart.html)
⎿ Received 188.5KB (200 OK)
⏺ Now I'll create the Mermaid syntax reference documentation:
⏺ Write(skills/mermaid-generator/references/mermaid-flowchart-syntax.md)
⎿ Wrote 271 lines to skills/mermaid-generator/references/mermaid-flowchart-syntax.md
# Mermaid Flowchart Syntax Reference
This reference guide covers Mermaid flowchart syntax for generating interactive workflow
diagrams.
## Basic Structure
Every Mermaid flowchart starts with a direction declaration:
```mermaid
flowchart TD
… +261 lines (ctrl+o to expand)
⏺ Bash(mkdir -p $HOME/Documents/ws/claude-skills/skills/mermaid-generator/assets/template) ⎿ (No content)
⏺ Write(skills/mermaid-generator/assets/template/main.html)
⎿ Wrote 47 lines to skills/mermaid-generator/assets/template/main.html
<!DOCTYPE html>