MicroSim Generator
Overview
This meta-skill routes MicroSim creation requests to the appropriate specialized generator based on visualization requirements. It consolidates 13 individual MicroSim generator skills into a single entry point with on-demand loading of specific implementation guides.
When to Use This Skill
Use this skill when users request:
- Interactive educational visualizations
- Data visualizations (charts, graphs, plots)
- Timelines or chronological displays
- Geographic/map visualizations
- Network diagrams or concept maps
- Flowcharts or workflow diagrams
- Mathematical function plots
- Set diagrams (Venn)
- Priority matrices or bubble charts
- Custom simulations or animations
- Comparison tables with ratings
Step 1: Analyze Request and Match Generator
Scan the user's request for trigger keywords and match to the appropriate generator guide.
Quick Reference Routing Table
| Trigger Keywords |
Guide File |
Library |
| timeline, dates, chronological, events, history, schedule, milestones |
references/timeline-guide.md |
vis-timeline |
| map, geographic, coordinates, latitude, longitude, locations, markers |
references/map-guide.md |
Leaflet.js |
| function, f(x), equation, plot, calculus, sine, cosine, polynomial |
references/plotly-guide.md |
Plotly.js |
| network, nodes, edges, graph, dependencies, concept map, knowledge graph |
references/vis-network-guide.md |
vis-network |
| flowchart, workflow, process, state machine, UML, sequence diagram |
references/mermaid-guide.md |
Mermaid.js |
| venn, sets, overlap, intersection, union, categories |
references/venn-guide.md |
Custom |
| chart, bar, line, pie, doughnut, radar, statistics, data |
references/chartjs-guide.md |
Chart.js |
| bubble, priority, matrix, quadrant, impact vs effort, risk vs value |
references/bubble-guide.md |
Chart.js |
| causal, feedback, loop, systems thinking, reinforcing, balancing |
references/causal-loop-guide.md |
vis-network |
| comparison, table, ratings, stars, side-by-side, features |
references/comparison-table-guide.md |
Custom |
| animation, celebration, particles, confetti, effects |
references/celebration-guide.md |
p5.js |
| custom, simulation, physics, interactive, bouncing, movement, p5.js |
references/p5-guide.md |
p5.js |
Decision Tree
Has dates/timeline/chronological events?
→ YES: timeline-guide.md
Has geographic coordinates/locations?
→ YES: map-guide.md
Mathematical function f(x) or equation?
→ YES: plotly-guide.md
Nodes and edges/network relationships?
→ YES: vis-network-guide.md (or causal-loop-guide.md if systems thinking)
Flowchart/workflow/process diagram?
→ YES: mermaid-guide.md
Sets with overlaps (2-4 categories)?
→ YES: venn-guide.md
Priority matrix/2x2 quadrant/multi-dimensional?
→ YES: bubble-guide.md
Standard chart (bar/line/pie/radar)?
→ YES: chartjs-guide.md
Comparison table with ratings/stars?
→ YES: comparison-table-guide.md
Celebration/particles/visual feedback?
→ YES: celebration-guide.md
Custom simulation/animation/physics?
→ YES: p5-guide.md
Step 2: Load the Matched Guide
Once you identify the best generator, read the corresponding guide file from the references/ directory and follow its workflow.
Example:
- User asks for "a timeline showing the history of Unix"
- Match:
timeline keyword → Load references/timeline-guide.md
- Follow the timeline-guide.md workflow
Step 3: Execute Generator Workflow
Each guide contains:
- Library-specific requirements
- Directory structure to create
- Step-by-step implementation workflow
- Code templates and patterns
- Best practices for that visualization type
Handling Ambiguous Requests
If the request could match multiple generators:
- Read
references/routing-criteria.md for detailed scoring methodology
- Score top 3 candidates using the 0-100 scale
- Present options to user with reasoning:
Based on your request, I recommend:
1. [Generator A] (Score: 85) - Best for [reason]
2. [Generator B] (Score: 70) - Alternative if you need [feature]
3. [Generator C] (Score: 55) - Possible if [condition]
Which would you prefer?
- Proceed with user's selection
Common Ambiguities
| Ambiguous Term |
Clarification Needed |
| "graph" |
Chart (ChartJS) or Network graph (vis-network)? |
| "diagram" |
Structural (Mermaid), Network (vis-network), or Custom (p5)? |
| "map" |
Geographic (Leaflet) or Concept map (vis-network)? |
| "visualization" |
What type of data? What interaction needed? |
Available Generators
Primary Generators
| Generator |
Library |
Best For |
| p5-guide |
p5.js |
Custom simulations, physics, animations |
| chartjs-guide |
Chart.js |
Bar, line, pie, doughnut, radar charts |
| timeline-guide |
vis-timeline |
Chronological events, history, schedules |
| map-guide |
Leaflet.js |
Geographic data, locations, routes |
| vis-network-guide |
vis-network |
Network graphs, dependencies, concept maps |
| mermaid-guide |
Mermaid.js |
Flowcharts, workflows, UML diagrams |
| plotly-guide |
Plotly.js |
Mathematical function plots |
| venn-guide |
Custom |
Set relationships (2-4 sets) |
| bubble-guide |
Chart.js |
Priority matrices, multi-dimensional data |
| causal-loop-guide |
vis-network |
Systems thinking, feedback loops |
| comparison-table-guide |
Custom |
Side-by-side comparisons with ratings |
| celebration-guide |
p5.js |
Particle effects, visual feedback |
Shared Standards
All MicroSims follow these standards regardless of generator:
Directory Structure:
docs/sims/<microsim-name>/
├── main.html # Main visualization file
├── index.md # Documentation page
├── *.js or *.css # Supporting files
└── metadata.json # Dublin Core metadata (optional)
Integration:
- Embedded via iframe in MkDocs pages
- Width-responsive design
- Non-scrolling iframe container
- Standard height: drawHeight + controlHeight + 2px
Quality Checklist:
Examples
Example 1: Timeline Request
User: "Create a timeline showing key events in computer history"
Routing: Keywords "timeline", "events", "history" → references/timeline-guide.md
Action: Read timeline-guide.md and follow its workflow
Example 2: Chart Request
User: "Make a bar chart comparing programming language popularity"
Routing: Keywords "bar chart", "comparing" → references/chartjs-guide.md
Action: Read chartjs-guide.md and follow its workflow
Example 3: Custom Simulation
User: "Build an interactive bouncing ball simulation"
Routing: Keywords "interactive", "bouncing", "simulation" → references/p5-guide.md
Action: Read p5-guide.md and follow its workflow
Example 4: Ambiguous Request
User: "Create a graph of our project dependencies"
Routing: "graph" + "dependencies" suggests network → references/vis-network-guide.md
Action: Read vis-network-guide.md (but clarify if user meant a chart)
Reference Files
For detailed information, consult:
references/routing-criteria.md - Complete scoring methodology for all generators
references/<generator>-guide.md - Specific implementation guide for each generator
assets/templates/ - Shared templates and patterns
Step 4: Auto-Standardization
IMPORTANT: After creating the MicroSim files, automatically run standardization to ensure quality and documentation standards are met.
Why Auto-Standardize?
- Eliminates manual follow-up work
- Ensures consistent quality across all MicroSims
- Adds metadata.json, lesson plans, and references automatically
- Calculates and records quality_score in index.md
Standardization Process
After the generator guide workflow completes (files created in docs/sims/<microsim-name>/):
- Read the standardization guide: Load
../microsim-utils/references/standardization.md
- Run the standardization checklist on the newly created MicroSim directory
- Implement all fixes automatically (skip user confirmation since this is a new MicroSim)
- Generate quality_score and add to index.md frontmatter
What Standardization Adds
The standardization process will add these elements if missing:
- metadata.json - Dublin Core metadata for discoverability
- YAML frontmatter - title, description, quality_score, image paths
- Iframe examples - Copy-paste code for embedding
- Fullscreen button - Link to view MicroSim fullscreen
- Lesson Plan section - Learning objectives, activities, assessment
- References section - Related resources and documentation
Workflow Integration
[User Request]
→ [Route to Guide]
→ [Generate MicroSim Files]
→ [Auto-Standardize] ← NEW STEP
→ [Update mkdocs.yml]
→ [Done]
This eliminates the need to manually run microsim-utils standardization after every MicroSim creation.
mkdocs.yml Integration
After creating and standardizing a MicroSim, add it to the site navigation:
nav:
- MicroSims:
- List of MicroSims: sims/index.md
- Existing Sim: sims/existing-sim/index.md
- New MicroSim: sims/new-microsim-name/index.md # Add here
1---2name: microsim-generator3description: Creates interactive educational MicroSims using the best-matched JavaScript library (p5.js, Chart.js, Plotly, Mermaid, vis-network, vis-timeline, Leaflet, Venn.js). Analyzes user requirements to route to the appropriate visualization type and generates complete MicroSim packages with HTML, JavaScript, CSS, documentation, and metadata.4---5
6# MicroSim Generator
7
8## Overview
9
10This meta-skill routes MicroSim creation requests to the appropriate specialized generator based on visualization requirements. It consolidates 13 individual MicroSim generator skills into a single entry point with on-demand loading of specific implementation guides.
11
12## When to Use This Skill
13
14Use this skill when users request:
15
16- Interactive educational visualizations
17- Data visualizations (charts, graphs, plots)
18- Timelines or chronological displays
19- Geographic/map visualizations
20- Network diagrams or concept maps
21- Flowcharts or workflow diagrams
22- Mathematical function plots
23- Set diagrams (Venn)
24- Priority matrices or bubble charts
25- Custom simulations or animations
26- Comparison tables with ratings
27
28## Step 1: Analyze Request and Match Generator
29
30Scan the user's request for trigger keywords and match to the appropriate generator guide.
31
32### Quick Reference Routing Table
33
34| Trigger Keywords | Guide File | Library |
35|------------------|------------|---------|
36| timeline, dates, chronological, events, history, schedule, milestones | `references/timeline-guide.md` | vis-timeline |
37| map, geographic, coordinates, latitude, longitude, locations, markers | `references/map-guide.md` | Leaflet.js |
38| function, f(x), equation, plot, calculus, sine, cosine, polynomial | `references/plotly-guide.md` | Plotly.js |
39| network, nodes, edges, graph, dependencies, concept map, knowledge graph | `references/vis-network-guide.md` | vis-network |
40| flowchart, workflow, process, state machine, UML, sequence diagram | `references/mermaid-guide.md` | Mermaid.js |
41| venn, sets, overlap, intersection, union, categories | `references/venn-guide.md` | Custom |
42| chart, bar, line, pie, doughnut, radar, statistics, data | `references/chartjs-guide.md` | Chart.js |
43| bubble, priority, matrix, quadrant, impact vs effort, risk vs value | `references/bubble-guide.md` | Chart.js |
44| causal, feedback, loop, systems thinking, reinforcing, balancing | `references/causal-loop-guide.md` | vis-network |
45| comparison, table, ratings, stars, side-by-side, features | `references/comparison-table-guide.md` | Custom |
46| animation, celebration, particles, confetti, effects | `references/celebration-guide.md` | p5.js |
47| custom, simulation, physics, interactive, bouncing, movement, p5.js | `references/p5-guide.md` | p5.js |
48
49### Decision Tree
50
51```
52Has dates/timeline/chronological events?
53 → YES: timeline-guide.md
54
55Has geographic coordinates/locations?
56 → YES: map-guide.md
57
58Mathematical function f(x) or equation?
59 → YES: plotly-guide.md
60
61Nodes and edges/network relationships?
62 → YES: vis-network-guide.md (or causal-loop-guide.md if systems thinking)
63
64Flowchart/workflow/process diagram?
65 → YES: mermaid-guide.md
66
67Sets with overlaps (2-4 categories)?
68 → YES: venn-guide.md
69
70Priority matrix/2x2 quadrant/multi-dimensional?
71 → YES: bubble-guide.md
72
73Standard chart (bar/line/pie/radar)?
74 → YES: chartjs-guide.md
75
76Comparison table with ratings/stars?
77 → YES: comparison-table-guide.md
78
79Celebration/particles/visual feedback?
80 → YES: celebration-guide.md
81
82Custom simulation/animation/physics?
83 → YES: p5-guide.md
84```
85
86## Step 2: Load the Matched Guide
87
88Once you identify the best generator, **read the corresponding guide file** from the `references/` directory and follow its workflow.
89
90Example:
91- User asks for "a timeline showing the history of Unix"
92- Match: `timeline` keyword → Load `references/timeline-guide.md`
93- Follow the timeline-guide.md workflow
94
95## Step 3: Execute Generator Workflow
96
97Each guide contains:
981. Library-specific requirements
992. Directory structure to create
1003. Step-by-step implementation workflow
1014. Code templates and patterns
1025. Best practices for that visualization type
103
104## Handling Ambiguous Requests
105
106If the request could match multiple generators:
107
1081. **Read `references/routing-criteria.md`** for detailed scoring methodology
1092. **Score top 3 candidates** using the 0-100 scale
1103. **Present options to user** with reasoning:
111 ```
112 Based on your request, I recommend:
113 1. [Generator A] (Score: 85) - Best for [reason]
114 2. [Generator B] (Score: 70) - Alternative if you need [feature]
115 3. [Generator C] (Score: 55) - Possible if [condition]
116
117 Which would you prefer?
118 ```
1194. **Proceed with user's selection**
120
121## Common Ambiguities
122
123| Ambiguous Term | Clarification Needed |
124|----------------|---------------------|
125| "graph" | Chart (ChartJS) or Network graph (vis-network)? |
126| "diagram" | Structural (Mermaid), Network (vis-network), or Custom (p5)? |
127| "map" | Geographic (Leaflet) or Concept map (vis-network)? |
128| "visualization" | What type of data? What interaction needed? |
129
130## Available Generators
131
132### Primary Generators
133
134| Generator | Library | Best For |
135|-----------|---------|----------|
136| p5-guide | p5.js | Custom simulations, physics, animations |
137| chartjs-guide | Chart.js | Bar, line, pie, doughnut, radar charts |
138| timeline-guide | vis-timeline | Chronological events, history, schedules |
139| map-guide | Leaflet.js | Geographic data, locations, routes |
140| vis-network-guide | vis-network | Network graphs, dependencies, concept maps |
141| mermaid-guide | Mermaid.js | Flowcharts, workflows, UML diagrams |
142| plotly-guide | Plotly.js | Mathematical function plots |
143| venn-guide | Custom | Set relationships (2-4 sets) |
144| bubble-guide | Chart.js | Priority matrices, multi-dimensional data |
145| causal-loop-guide | vis-network | Systems thinking, feedback loops |
146| comparison-table-guide | Custom | Side-by-side comparisons with ratings |
147| celebration-guide | p5.js | Particle effects, visual feedback |
148
149### Shared Standards
150
151All MicroSims follow these standards regardless of generator:
152
153**Directory Structure:**
154```
155docs/sims/<microsim-name>/
156├── main.html # Main visualization file
157├── index.md # Documentation page
158├── *.js or *.css # Supporting files
159└── metadata.json # Dublin Core metadata (optional)
160```
161
162**Integration:**
163- Embedded via iframe in MkDocs pages
164- Width-responsive design
165- Non-scrolling iframe container
166- Standard height: drawHeight + controlHeight + 2px
167
168**Quality Checklist:**
169- [ ] Runs without errors in modern browsers
170- [ ] Responsive to container width
171- [ ] Controls respond immediately
172- [ ] Educational purpose is clear
173- [ ] Code is well-commented
174
175## Examples
176
177### Example 1: Timeline Request
178**User:** "Create a timeline showing key events in computer history"
179**Routing:** Keywords "timeline", "events", "history" → `references/timeline-guide.md`
180**Action:** Read timeline-guide.md and follow its workflow
181
182### Example 2: Chart Request
183**User:** "Make a bar chart comparing programming language popularity"
184**Routing:** Keywords "bar chart", "comparing" → `references/chartjs-guide.md`
185**Action:** Read chartjs-guide.md and follow its workflow
186
187### Example 3: Custom Simulation
188**User:** "Build an interactive bouncing ball simulation"
189**Routing:** Keywords "interactive", "bouncing", "simulation" → `references/p5-guide.md`
190**Action:** Read p5-guide.md and follow its workflow
191
192### Example 4: Ambiguous Request
193**User:** "Create a graph of our project dependencies"
194**Routing:** "graph" + "dependencies" suggests network → `references/vis-network-guide.md`
195**Action:** Read vis-network-guide.md (but clarify if user meant a chart)
196
197## Reference Files
198
199For detailed information, consult:
200
201- `references/routing-criteria.md` - Complete scoring methodology for all generators
202- `references/<generator>-guide.md` - Specific implementation guide for each generator
203- `assets/templates/` - Shared templates and patterns
204
205## Step 4: Auto-Standardization
206
207**IMPORTANT**: After creating the MicroSim files, automatically run standardization to ensure quality and documentation standards are met.
208
209### Why Auto-Standardize?
210
211- Eliminates manual follow-up work
212- Ensures consistent quality across all MicroSims
213- Adds metadata.json, lesson plans, and references automatically
214- Calculates and records quality_score in index.md
215
216### Standardization Process
217
218After the generator guide workflow completes (files created in `docs/sims/<microsim-name>/`):
219
2201. **Read the standardization guide**: Load `../microsim-utils/references/standardization.md`
2212. **Run the standardization checklist** on the newly created MicroSim directory
2223. **Implement all fixes automatically** (skip user confirmation since this is a new MicroSim)
2234. **Generate quality_score** and add to index.md frontmatter
224
225### What Standardization Adds
226
227The standardization process will add these elements if missing:
228
229- **metadata.json** - Dublin Core metadata for discoverability
230- **YAML frontmatter** - title, description, quality_score, image paths
231- **Iframe examples** - Copy-paste code for embedding
232- **Fullscreen button** - Link to view MicroSim fullscreen
233- **Lesson Plan section** - Learning objectives, activities, assessment
234- **References section** - Related resources and documentation
235
236### Workflow Integration
237
238```
239[User Request]
240 → [Route to Guide]
241 → [Generate MicroSim Files]
242 → [Auto-Standardize] ← NEW STEP
243 → [Update mkdocs.yml]
244 → [Done]
245```
246
247This eliminates the need to manually run `microsim-utils standardization` after every MicroSim creation.
248
249## mkdocs.yml Integration
250
251After creating and standardizing a MicroSim, add it to the site navigation:
252
253```yaml
254nav:
255 - MicroSims:
256 - List of MicroSims: sims/index.md
257 - Existing Sim: sims/existing-sim/index.md
258 - New MicroSim: sims/new-microsim-name/index.md # Add here
259```