All skills
dmccreary avatar

/microsim-generator

@ed7c050

Creates interactive educational MicroSims, routing to the best-matched generator - p5.js, Chart.js, Plotly, Mermaid, vis-network, timelines, maps, Venn, causal-loop/feedback-loop diagrams (CLD), concept-classifier sorting quizzes, infographic overlays with callout labels, Docker Python labs (runnable code blocks), and fact-verified statistics posters (every numeric claim checked against a cited source before rendering). Generates complete MicroSim packages with HTML, JavaScript, CSS, documentation, and metadata.

Use this Skill: https://skilld.dev/gh/dmccreary/claude-skills/microsim-generator

This session only. Nothing lands on disk.

assetstemplatestimelineindex.md

≈957 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Timeline Template

An interactive timeline visualization for displaying chronological events with category filtering and detailed event information accessible by hovering over an event.

<iframe src="./main.html" width="100%" height="500px" scrolling="no"></iframe>

View the Timeline Fullscreen{ .md-button .md-button--primary }

Overview

This template creates an interactive vis-timeline visualization with:

  • Category Filtering: Filter events by type using color-coded buttons
  • Navigation Controls: Pan left/right, zoom in/out, and fit all events
  • Event Details Panel: Click any event to see full description and context
  • Hover Tooltips: Quick context notes on hover
  • Responsive Design: Works on desktop and mobile devices

Features

Interactive Elements

  • Filter Buttons: Show all events or filter by category
  • Navigation: Zoom and pan through the timeline
  • Selection: Click events for detailed information
  • Tooltips: Hover for quick context

Visual Design

  • Light Theme: Aliceblue background with high contrast
  • Color-coded Categories: Distinct colors for each event type
  • Legend Panel: Reference for category colors
  • Clean Typography: System fonts for readability

Customization Guide

1. Update the Title and Categories

In main.html, update:

<header class="header">
    <h1>Your Timeline Title</h1>
    <p>Your subtitle with date range</p>
</header>

Update filter buttons to match your categories:

<button class="filter-btn category1" onclick="filterCategory('YourCategory1')">Your Category 1</button>

2. Configure Category Colors

In script.js, update the categoryColors object:

const categoryColors = {
    'YourCategory1': '#2563eb',  // Blue
    'YourCategory2': '#16a34a',  // Green
    'YourCategory3': '#d97706'   // Amber
};

3. Update the Legend

In main.html and style.css, update legend items to match your categories.

4. Adjust Timeline Range

In script.js, modify the timeline options:

min: new Date(1900, 0, 1),  // Start date
max: new Date(2030, 0, 1),  // End date
zoomMin: 1000 * 60 * 60 * 24 * 365 * 5,   // Minimum zoom (5 years)
zoomMax: 1000 * 60 * 60 * 24 * 365 * 100, // Maximum zoom (100 years)

5. Update CSS Colors

In style.css, update the category button and legend colors:

.filter-btn.category1 { background: #2563eb; }
.legend-color.category1 { background: #2563eb; }

Data Format

Events are stored in data.json with this structure:

{
  "title": "Timeline Title",
  "events": [
    {
      "start_date": {
        "year": "1950",
        "month": "1",    // Optional (1-12)
        "day": "15"      // Optional (1-31)
      },
      "text": {
        "headline": "Event Title",
        "text": "Full description of the event."
      },
      "group": "Category1",  // Must match categoryColors key
      "notes": "Additional context for tooltips."
    }
  ]
}

Date Handling

  • Year only: Defaults to January 1st
  • Year + Month: Defaults to 1st of that month
  • Full date: Uses exact date specified

Adding New Events

  1. Open data.json
  2. Add a new event object to the events array
  3. Ensure group matches a key in categoryColors
  4. Reload the page

Technical Details

  • Library: vis-timeline 7.7.3
  • Data Format: Custom JSON loaded via fetch()
  • Browser Support: Modern browsers (Chrome, Firefox, Safari, Edge)

File Structure

timeline/
├── main.html      # HTML structure
├── script.js      # JavaScript logic and configuration
├── style.css      # All styling and responsive design
├── data.json      # Timeline event data
└── index.md       # Documentation (this file)

Source: SKILL.md on GitHub

2 warnings14d4 checks · Risk SAFE
  • Gen Agent Trust Hub14d

    The skill is a productivity tool for generating interactive educational MicroSims. It requires the execution of multiple local scripts and the installation of the Playwright automation framework and Chromium binaries. It also provides features for running Python code locally via Docker. These capabilities represent legitimate developer workflows but involve security surfaces like external binary installation and dynamic code execution.

  • Socket14d

    1 alert: gptAnomaly

  • Snyk14d

    Risk: LOW · No issues

  • Runlayer6mo

    9/59 files flagged

Signed by skilld at ed7c050. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 weeks ago
metadata
{
  "ibook.version": "1.0",
  "ibook.preferred-model": "opus"
}

README badge

README badge for dmccreary/claude-skills/microsim-generator