home / skills / dmccreary / claude-skills / microsim-utils

microsim-utils skill

/skills/microsim-utils

This skill consolidates MicroSim utilities for validation, screenshot capture, icon management, and index generation, streamlining quality checks and

This is most likely a fork of the microsim-utils skill from vishalsachdev
npx playbooks add skill dmccreary/claude-skills --skill microsim-utils

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
4.5 KB
---
name: microsim-utils
description: Utility tools for MicroSim management including quality validation, screenshot capture, icon management, and index page generation. Routes to the appropriate utility based on the task needed.
---

# MicroSim Utilities

## Overview

This meta-skill provides utility functions for managing and maintaining MicroSims in intelligent textbook projects. It consolidates four utility skills into a single entry point with on-demand loading of specific utility guides.

## When to Use This Skill

Use this skill when users request:

- Validating MicroSim quality and standards
- Capturing screenshots for preview images
- Adding or managing icons for MicroSims
- Generating index pages for MicroSim directories
- Quality scoring and standardization checks

## Step 1: Identify Utility Type

Match the user's request to the appropriate utility guide:

### Routing Table

| Trigger Keywords | Guide File | Purpose |
|------------------|------------|---------|
| standardize, quality, validate, score, check, audit | `references/standardization.md` | Quality validation and scoring |
| screenshot, capture, preview, image, thumbnail | `references/screen-capture.md` | Automated screenshot generation |
| icons, add icons, favicon, logo | `references/add-icons.md` | Icon management for MicroSims |
| index page, microsim list, grid, directory, catalog, update the microsim listings, update the list of microsims, create a grid view, generate a listing | `references/index-generator.md` | Generate index page with grid cards |

### Decision Tree

```
Need to check MicroSim quality/standards?
  → YES: standardization.md

Need to capture screenshots for previews?
  → YES: screen-capture.md

Need to add or manage icons?
  → YES: add-icons.md

Need to generate/update the MicroSim index page?
  → YES: index-generator.md
```

## Step 2: Load the Matched Guide

Read the corresponding guide file from `references/` and follow its workflow.

## Step 3: Execute Utility

Each guide contains:
1. Purpose and use cases
2. Prerequisites
3. Step-by-step workflow
4. Output format
5. Best practices

## Available Utilities

### standardization.md

**Purpose:** Validate MicroSim quality against standards

**Checks:**
- Required file presence (main.html, index.md)
- Code structure and patterns
- Accessibility features
- Documentation completeness
- Responsive design implementation

**Output:** Quality score (0-100) with recommendations

### screen-capture.md

**Purpose:** Capture high-quality screenshots for social media previews

**Features:**
- Uses Chrome headless mode
- Handles JavaScript-heavy visualizations
- Waits for proper rendering
- Creates consistent image sizes

**Output:** PNG screenshot in MicroSim directory

### add-icons.md

**Purpose:** Add favicon and icons to MicroSim directories

**Creates:**
- favicon.ico
- apple-touch-icon.png
- Other platform-specific icons

### index-generator.md

**Purpose:** Generate comprehensive MicroSim index page

**Creates:**
- Grid-based card layout
- Screenshots for each MicroSim
- Alphabetically sorted entries
- MkDocs Material card format
- Updates mkdocs.yml navigation

## Examples

### Example 1: Quality Check
**User:** "Check if my bouncing-ball MicroSim meets standards"
**Routing:** Keywords "check", "standards" → `references/standardization.md`
**Action:** Read standardization.md and follow its workflow

### Example 2: Capture Screenshot
**User:** "Create a preview image for the timeline MicroSim"
**Routing:** Keywords "preview", "image" → `references/screen-capture.md`
**Action:** Read screen-capture.md and follow its workflow

### Example 3: Update Index
**User:** "Update the MicroSim index page with all new sims"
**Routing:** Keywords "index", "update" → `references/index-generator.md`
**Action:** Read index-generator.md and follow its workflow

## Common Workflows

### After Creating New MicroSim
1. Run `standardization.md` to validate quality
2. Run `screen-capture.md` to create preview image
3. Run `index-generator.md` to add to index page

### Bulk Quality Audit
Use `standardization.md` to audit all MicroSims in a project and generate a quality report.

## Integration Notes

These utilities work with the standard MicroSim directory structure:
```
docs/sims/<microsim-name>/
├── main.html       # Main visualization
├── index.md        # Documentation
├── *.js            # JavaScript code
├── style.css       # Styles (optional)
└── <name>.png      # Preview screenshot (created by screen-capture)
```

Overview

This skill bundles utility tools for managing MicroSims, routing requests to quality validation, screenshot capture, icon management, or index page generation. It provides a single entry point that picks the right utility guide on demand and runs the appropriate workflow to produce standardized outputs.

How this skill works

The skill inspects the user's request for trigger keywords and routes to one of four specialized guides: standardization, screen capture, add-icons, or index-generator. It then loads the matched guide, checks prerequisites, and follows a step-by-step workflow to produce artifacts such as a quality score, PNG screenshots, icon files, or an updated index page. Outputs are saved to the MicroSim directory and can include recommendations or changes to mkdocs.yml when relevant.

When to use it

  • Validate MicroSim quality, accessibility, and coding standards
  • Capture consistent, high-quality screenshots for previews
  • Add or update favicons and platform-specific icons
  • Generate or refresh an index page listing all MicroSims
  • Perform bulk audits or produce a quality report for many sims

Best practices

  • Run quality validation (standardization) before publishing or releasing a sim
  • Capture screenshots after the sim fully renders (use headless Chrome with wait conditions)
  • Keep MicroSim directory structure consistent: docs/sims/<name>/ with main.html and index.md
  • Include accessibility attributes and responsive layouts to improve quality scores
  • Regenerate the index page after adding or updating sims so listings and screenshots stay current

Example use cases

  • Check a new bouncing-ball MicroSim for missing files, accessibility, and responsive issues and get a quality score with fixes
  • Generate a 1200x630 PNG preview for social sharing of a timeline MicroSim using headless Chrome
  • Create favicon.ico and apple-touch-icon.png for a MicroSim directory before deployment
  • Regenerate the MkDocs Material grid index to include new sims and update mkdocs.yml navigation
  • Run a bulk audit across all sims to produce a CSV or report of quality scores and remediation items

FAQ

What outputs can I expect from each utility?

Standardization returns a quality score (0–100) with recommendations; screen-capture creates a PNG screenshot; add-icons generates favicon and touch icons; index-generator produces a grid index page and updates navigation.

What directory layout is required?

Utilities expect docs/sims/<microsim-name>/ containing main.html and index.md; other assets like .js and style.css are optional but recommended.