Claude-skill-registry-data microsims-index-generator
This skill generates a comprehensive index page for MicroSims in an intelligent textbook project. Use this skill when working with an MkDocs-based textbook that has MicroSims in a /docs/sims/ directory and needs an updated index page with screenshots, descriptions, and navigation. The skill captures missing screenshots, generates alphabetically-sorted grid cards using mkdocs-material format, and updates the mkdocs.yml navigation.
git clone https://github.com/majiayu000/claude-skill-registry-data
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/microsims-index-generator" ~/.claude/skills/majiayu000-claude-skill-registry-data-microsims-index-generator && rm -rf "$T"
data/microsims-index-generator/SKILL.mdMicroSims Index Generator
Overview
This skill automates the creation and maintenance of a MicroSims index page for intelligent textbooks built with MkDocs Material theme. It scans the
/docs/sims/ directory, captures screenshots for MicroSims missing preview images, and generates a professionally formatted index page using mkdocs-material grid cards.
When to Use This Skill
Use this skill when:
- A new MicroSim has been added and the index needs updating
- Multiple MicroSims exist but lack preview screenshots
- The MicroSims index page needs to be reformatted to grid cards
- The mkdocs.yml navigation section for MicroSims needs synchronization
Prerequisites
- MkDocs project with Material theme configured
andattr_list
markdown extensions enabled in mkdocs.ymlmd_in_html- MicroSims located in
directories/docs/sims/<microsim-name>/ - Each MicroSim directory contains:
- The interactive simulationmain.html
- Documentation page with title and descriptionindex.md
- Screenshot capture tool available at
~/.local/bin/bk-capture-screenshot
Workflow
Step 0: Verify mkdocs.yml Extensions
Before generating the index, verify that
mkdocs.yml has the required markdown extensions for grid cards to render properly:
markdown_extensions: - attr_list - md_in_html
Check the file:
grep -A 20 "markdown_extensions:" mkdocs.yml
If either
attr_list or md_in_html is missing, add them to the markdown_extensions section before proceeding. Grid cards will not render without these extensions.
Step 1: Discover MicroSims
List all MicroSim directories in
/docs/sims/:
ls /path/to/project/docs/sims/
Exclude the
index.md file from the list. Each subdirectory represents a MicroSim.
Step 2: Gather MicroSim Information
For each MicroSim directory, read the
index.md file to extract:
- Title - From the first H1 heading or YAML frontmatter title
- Description - A short 1-2 sentence summary from the content
Example structure to look for:
# MicroSim Title Description paragraph explaining what the MicroSim does...
Step 3: Check for Missing Screenshots
For each MicroSim, check if a PNG screenshot exists:
ls /path/to/project/docs/sims/<microsim-name>/*.png
The screenshot filename should match the directory name (e.g.,
command-syntax/command-syntax.png).
Step 4: Capture Missing Screenshots
For each MicroSim missing a screenshot, use the screenshot capture tool:
~/.local/bin/bk-capture-screenshot /path/to/project/docs/sims/<microsim-name>
This tool:
- Captures a 1200x800 screenshot of
using Chrome headlessmain.html - Waits 3 seconds for JavaScript to load
- Saves as
in the MicroSim directory<microsim-name>.png
For MicroSims with complex animations, increase the delay:
~/.local/bin/bk-capture-screenshot /path/to/project/docs/sims/<microsim-name> 5
Step 5: Generate Index Page Content
Create the index page at
/docs/sims/index.md using mkdocs-material grid cards format.
Required YAML Frontmatter
--- title: List of MicroSims for [Course Name] description: A list of all the MicroSims used in the [Course Name] course image: /sims/index-screen-image.png og:image: /sims/index-screen-image.png hide: toc ---
Grid Cards Structure
# List of MicroSims for [Course Name] Interactive Micro Simulations to help students learn [subject] fundamentals. <div class="grid cards" markdown> - **[MicroSim Title](./microsim-name/index.md)** ---  Short description of what the MicroSim does and teaches. </div>
Card Item Format
Each card follows this exact structure (order matters):
- Title with link - Bold linked title
- Horizontal rule -
separator--- - Image - Screenshot with alt text matching title
- Description - 1-2 sentence summary
Example card:
- **[Command Syntax Visual Guide](./command-syntax/index.md)** ---  Color-coded breakdown of Linux command structure showing commands, options, and arguments with hover explanations.
Step 6: Sort Alphabetically
Sort all MicroSim cards alphabetically by their title. This ensures consistent ordering across the index page and navigation.
Step 7: Update mkdocs.yml Navigation
Locate the MicroSims section in
mkdocs.yml and update it with alphabetically sorted entries:
- MicroSims: - List of Microsims: sims/index.md - Bash vs Zsh: sims/bash-vs-zsh/index.md - Command Syntax Guide: sims/command-syntax/index.md # ... additional entries alphabetically
Keep "List of Microsims" as the first entry, then sort remaining items alphabetically.
Output Files
This skill creates or updates:
- The main MicroSims index page/docs/sims/index.md
- Screenshot for each MicroSim (if missing)/docs/sims/<name>/<name>.png
- Updated navigation section for MicroSimsmkdocs.yml
Example Output
A complete index page for a Linux course with 12 MicroSims:
--- title: List of MicroSims for Learning Linux description: A list of all the MicroSims used in the Teaching Linux course image: /sims/index-screen-image.png og:image: /sims/index-screen-image.png hide: toc --- # List of MicroSims for Learning Linux Interactive Micro Simulations to help students learn Linux fundamentals. <div class="grid cards" markdown> - **[Bash vs Zsh Comparison](./bash-vs-zsh/index.md)** ---  Side-by-side comparison of `bash` and `zsh` shells with star ratings for compatibility, features, and customization. - **[Command Syntax Visual Guide](./command-syntax/index.md)** ---  Color-coded breakdown of Linux command structure showing commands, options, and arguments with hover explanations. </div>
Troubleshooting
Screenshot Capture Fails
If screenshot capture fails:
- Verify Chrome/Chromium is installed
- Check that
exists in the MicroSim directorymain.html - Increase delay for JavaScript-heavy simulations
- Check for CDN loading issues (may need network access)
Grid Cards Not Rendering
Ensure mkdocs.yml has required extensions:
markdown_extensions: - attr_list - md_in_html
Images Not Displaying
Verify image paths use relative format:
./microsim-name/microsim-name.png