--- name: htmlvspec description: Creates a visual engineering implementation plan as a single self-contained HTML page saved to specs/.html — the plan authored directly in styled HTML, with one AI-generated diagram image per section (hero + per major H2) generated in parallel and embedded inline, plus a freeform HTML zone for custom HTML/CSS/SVG/JS that aids comprehension. Images are always generated. Use when the user says "htmlvspec", wants a visual/illustrated HTML implementation plan, a browser-openable spec with per-section diagrams, or any HTML plan where images are required. argument-hint: "[user prompt]" --- # htmlvspec ## Purpose Produce a **visual** engineering implementation plan as **one self-contained HTML page** — `specs/.html` — that you can open directly in a browser. The plan is authored **directly in HTML** using the template below, with **one AI-generated diagram image per section** (hero + per major H2) generated in parallel and embedded inline, and a dedicated **Freeform** zone that lets you author any HTML you want (interactive toggles, animated SVG flows, comparison matrices, decision trees, etc.) to make the plan clearer and richer than prose could. Phases, in order: 1. **Plan phase** — analyze, explore, design (same thinking as a normal spec). 2. **HTML authoring phase** — write the plan into the **HTML Plan Template**. 3. **Image phase** — generate one diagram per section in **parallel** and embed them inline. 4. **Freeform phase** — enrich the page with custom HTML per the **Freeform Instruction Set**. ## Variables USER_PROMPT: $1 ALL_ARGUMENTS: $ARGUMENTS PLAN_OUTPUT_DIRECTORY: `specs/` PLAN_SLUG: kebab-case name derived from the plan topic (e.g. `in-memory-ttl-lru-cache`) HTML_OUTPUT: `specs/htmlvspec-.html` — **the filename MUST always begin with the `htmlvspec-` prefix** IMAGE_DIR: `specs/htmlvspec-/` — sibling directory matching the HTML filename (same `htmlvspec-` prefix) IMAGE_GENERATOR: `~/.claude/skills/htmlvspec/scripts/generate_image.py` IMAGE_SIZE: `2048x1152` (wide 16:9 by default) IMAGE_QUALITY: `high` HERO_IMAGE_NAME: `00-hero.png` MAX_TEXT_LABELS_PER_IMAGE: 10 MAX_TOTAL_IMAGES: 10 ## Instructions ### Plan phase - IMPORTANT: If no `USER_PROMPT` is provided, stop and ask the user to provide it. - Carefully analyze the USER_PROMPT. Determine task type (chore|feature|refactor|fix|enhancement) and complexity (simple|medium|complex). - Think deeply (ultrathink) about the best implementation approach. - Explore the codebase to understand existing patterns and architecture. - Decide which sections from the HTML Plan Template apply (include the conditional sections only when task type/complexity warrants them, exactly like a normal spec). - Generate a descriptive kebab-case PLAN_SLUG from the topic. ### HTML authoring phase - Author the plan **directly in HTML** using the **HTML Plan Template** below — do not write a markdown file. The output is a single `specs/htmlvspec-.html`. - Keep the page **self-contained**: all CSS inline in `

Plan: {{TASK_NAME}}

{{TASK_TYPE}} · {{COMPLEXITY}}

Visual overview — {{TASK_NAME}}
System overview

Task Description

{{TASK_DESCRIPTION_HTML}}

Objective

{{OBJECTIVE_HTML}}

Problem Statement

{{PROBLEM_STATEMENT_HTML}}

Solution Approach

Solution approach
{{SOLUTION_APPROACH_HTML}}

Relevant Files

{{RELEVANT_FILES_HTML}}

Implementation Phases

Implementation phases
{{PHASES_HTML}}

Step by Step Tasks

{{STEPS_HTML}}

Testing Strategy

{{TESTING_HTML}}

Acceptance Criteria

{{ACCEPTANCE_HTML}}

Validation Commands

{{VALIDATION_COMMANDS}}

Freeform

{{FREEFORM_HTML}}

Notes

{{NOTES_HTML}}
``` ## Report Format ```markdown ✅ Visual HTML Implementation Plan Created File: specs/htmlvspec-.html (open in a browser) Topic: Images: / in specs/htmlvspec-/ Freeform: Key Components: -
-
-
Open with: open specs/htmlvspec-.html ``` ## Validation ```bash # file exists and is non-trivial HTML test -s specs/htmlvspec-.html && head -1 specs/htmlvspec-.html | grep -qi '' && echo "HTML ok" # every file exists; paths relative; no prompt used more than 10 labels ```