backup/html-prototype/SKILL.md
Create interactive HTML app prototypes and landing pages as a single self-contained HTML file with full-screen layouts, multi-screen navigation, smooth transitions, clickable controls, fake auth/data, and product-aware visual design. MUST use when the user describes an app idea and wants to see it, prototype it, mock up screens, build a clickable demo, landing page, marketing site, product page, interactive wireframe, app demo, or any multi-screen flow with navigation. Also use for app concepts like recipe, fitness, dashboard, SaaS, e-commerce, social, chat, finance, booking, wellness, or education when the user wants to visualize the flow or test screen transitions. Do not use for static diagrams, production code, or game prototypes.
npx skillsauth add cuozg/oh-my-skills html-prototypeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate a complete, interactive app prototype as a single self-contained HTML file. The prototype should feel like a real app — smooth screen transitions, clickable navigation, realistic fake data, and polished visual design. Every screen the user needs, wired together with working navigation.
The output is always a single HTML file that opens in any browser. No build tools, no dependencies beyond CDN fonts. The user clicks buttons, navigates between screens, and experiences the app flow exactly as it would work in production — except the data is fake and the backend doesn't exist.
Supports two modes:
Extract from the user's description:
If the description is vague, ask ONE clarifying question about the core use case. But err toward assumptions — prototypes thrive on reasonable defaults.
Before mapping screens, determine the visual identity based on the product type. Read references/design-intelligence.md and look up the user's product category to get:
This step prevents the common failure of defaulting to generic blue/white for every prototype. A fintech app should feel different from a wellness app — the design intelligence reference encodes those differences.
If the product type doesn't match any category exactly, pick the closest one and adapt.
Before writing HTML, map every screen. Each screen needs:
| Field | Description |
|-------|-------------|
| ID | Machine name: login, dashboard, book-detail |
| Title | Human-readable name |
| Components | What's on the screen: nav bar, card list, form, fab button |
| Entry points | Which screens navigate TO this one |
| Exit points | Which screens this one navigates TO |
| Data | What fake data this screen displays |
Read references/app-archetypes.md for common app types and their typical screen maps. This saves time — most apps share patterns (auth flow → home → list → detail → settings). For landing pages, read references/landing-patterns.md instead.
With the design intelligence recommendations in hand, make the final visual decisions. Read references/css-system.md for CSS implementations of each style.
Decisions already made by design intelligence (step 2):
Decisions still needed:
Read templates/spa-shell.html first — it's a complete working BookShelf app that demonstrates every pattern. Use it as your reference architecture. Don't copy it verbatim; adapt its router, transitions, and data patterns for the user's app.
Architecture overview:
┌─ <section class="screen" data-screen="screen-id"> ─── one per screen
│ Full-viewport content with its own layout
└─ JavaScript router handles hash-based navigation
CSS transitions animate between screens
APP_DATA object holds all fake data
APP_STATE object holds auth and UI state
Key implementation patterns (all demonstrated in the template):
const SVG = { home: '...', search: '...', back: '...' } object with inline SVG strings for all icons. Never use emoji.SCREEN_HOOKS object mapping screen IDs to render functions. The router calls the hook when a screen becomes active, so content is populated dynamically from APP_DATA.element.offsetHeight to force a reflow before adding .active. Without this, CSS transitions won't animate — the browser batches the class changes.renderTabBar() function.The prototype MUST include:
prefers-color-schemeOutput location: Save to ~/.agent/prototypes/ with a descriptive filename based on the app concept: book-reader-app.html, fitness-tracker.html, recipe-manager.html.
Open in browser:
open ~/.agent/prototypes/filename.htmlxdg-open ~/.agent/prototypes/filename.htmlTell the user the file path so they can re-open, share, or iterate.
The router supports directional transitions that feel natural — forward navigation pushes content left, back navigation pulls it right, modals slide up from the bottom.
| Transition | When to use | Feel |
|-----------|-------------|------|
| slide-left | Navigate deeper (list → detail, home → subpage) | Moving forward |
| slide-right | Navigate back (detail → list, subpage → home) | Returning |
| slide-up | Open modal, bottom sheet, overlay | Revealing |
| slide-down | Close modal, dismiss overlay | Dismissing |
| fade | Switch tabs, same-level navigation | Lateral movement |
| scale-up | Open detail from card (zoom into content) | Focusing |
| none | Initial load, auth redirect | Instant |
The router tracks navigation history to automatically choose forward vs. back transitions. Explicitly set transitions for modals and special cases.
Timing: 300ms for screen transitions, 150ms for micro-interactions (button press, toggle). Use cubic-bezier(0.4, 0, 0.2, 1) for natural deceleration.
Auth flow: Use APP_STATE.isLoggedIn boolean. The login screen validates that both fields are non-empty (no real validation), sets isLoggedIn = true, and navigates forward. Protected screens check the flag on entry and redirect to login if false. A logout button resets the flag and navigates to login.
Generating realistic fake data is critical — the prototype should look like a screenshot of a real app. Guidelines by domain:
| Domain | Examples | |--------|----------| | Books | "The Great Gatsby" by F. Scott Fitzgerald, 4.2★, 218 pages | | E-commerce | "Wireless Noise-Cancelling Headphones" — $149.99, 4.7★ (2,341 reviews) | | Social | "Sarah Chen" posted 2h ago, 47 likes, 12 comments | | Fitness | 8,432 steps today, 3.2 km, 247 cal burned | | Finance | Checking ••••4829: $3,247.50, +$1,200.00 on Mar 15 | | Food/Recipe | "Spicy Thai Basil Chicken" — 25 min, 4 servings, 380 cal | | Productivity | "Q2 Marketing Plan" — 3/7 tasks done, due Apr 15, assigned to Alex |
Store data in const APP_DATA = { ... } at the top of the script section. Components read from this object to render lists, cards, and detail views.
The goal is an app that looks designed, not generated. A real designer would never ship flat gray cards with Inter font and purple accents — so neither should this skill.
Pick a font pairing that matches the app's personality. Load via Google Fonts CDN.
Recommended pairings:
Build the palette from the app's domain, not from defaults. Use CSS custom properties for everything.
Curated app palettes:
| Name | Primary | Accent | Surface | Use for |
|------|---------|--------|---------|---------|
| Ocean | #0c4a6e | #0ea5e9 | #f0f9ff | Finance, productivity, professional |
| Forest | #14532d | #22c55e | #f0fdf4 | Health, fitness, nature |
| Sunset | #7c2d12 | #f97316 | #fff7ed | Food, social, lifestyle |
| Berry | #581c87 | #a855f7 | #faf5ff | Creative, music, entertainment |
| Slate | #1e293b | #64748b | #f8fafc | Minimal, tools, developer |
| Rose | #881337 | #f43f5e | #fff1f2 | Shopping, fashion, dating |
Always define both light and dark variants via prefers-color-scheme.
Small animations that make the prototype feel alive:
transform: scale(0.97) on :active, 100ms transition--i CSS variableThese patterns signal "AI made this" — avoid them:
Every prototype is a single self-contained .html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>App Name — Prototype</title>
<link href="https://fonts.googleapis.com/css2?family=...&display=swap" rel="stylesheet">
<style>
/* CSS custom properties, themes, screen layouts, transitions, components */
</style>
</head>
<body>
<div id="app">
<section class="screen" data-screen="splash">...</section>
<section class="screen" data-screen="login">...</section>
<section class="screen" data-screen="home">...</section>
<!-- More screens -->
</div>
<script>
// APP_DATA — all fake data
// APP_STATE — auth, selections, UI state
// Router — hash-based navigation with transition support
// Screen init functions — populate screens from APP_DATA
// Event handlers — button clicks, form submits, toggles
</script>
</body>
</html>
Before delivering, run through references/ux-checklist.md for the full checklist. At minimum, verify:
~/.agent/prototypes/ and opened in browserLoad on demand — don't read all at once:
references/design-intelligence.md — Industry-to-design mapping: 30+ product types with recommended style, palette, typography, anti-patterns, and navigation patterns. Read this first when building any prototype to make informed design decisions.references/css-system.md — Full design system: CSS variables, theme setup, visual styles (glassmorphism, neumorphism, brutalism, bento grid, aurora), extended palettes (20+ industry-specific), transition CSS, component patterns, responsive breakpoints, scroll animationsreferences/screen-patterns.md — HTML/CSS patterns for common app screens: auth, dashboard, list/detail, settings, onboarding, modals, empty statesreferences/app-archetypes.md — Screen maps for common app types: what screens each type needs, navigation flows, data models. Covers 13 types including SaaS dashboards and landing pages.references/landing-patterns.md — HTML/CSS patterns for landing page sections: hero variants, feature grids, testimonials, pricing tables, FAQ accordions, CTA sections, footers, scroll animationsreferences/ux-checklist.md — Pre-delivery UX quality checklist: accessibility, touch targets, hover states, transitions, form patterns. Run through this before delivering any prototype.Load via read_skill_file("html-prototype", "references/<file>").
The template at templates/spa-shell.html is a complete working example demonstrating all patterns. Read it as a reference architecture — don't copy it verbatim, but follow its router pattern and transition system.
| From | To | When | |------|----|------| | html-prototype | flutter-code + flutter-ui | User wants to build the real app in Flutter | | html-prototype | nextjs-backend | User wants to build the actual backend | | html-prototype | visual-explainer | User needs a static diagram, not an interactive app | | html-prototype | frontend-design | User wants production-quality frontend code | | html-prototype | phaser-coder | User wants a game prototype | | html-prototype | unity-prototype | User wants a Unity game prototype |
tools
Generate Unity raster image assets through Unity MCP: game sprites, item art, backgrounds, UI icons, portraits, concept images, transparent cutouts, image edits, upscales, background removal, and Unity scene or Game View screenshots. Use when a Unity project needs image files imported under Assets or screenshots captured from the editor. Do not use for meshes, audio, animation, materials, gameplay code, UI Toolkit layout, or generic non-Unity image generation.
tools
Create Unity technical solution documents from user requirements, feature ideas, bug goals, specs, or codebase problems. Use when the user asks for a technical approach, architecture, implementation strategy, solution options, feasibility analysis, system design, or "how should we build/fix this" for Unity runtime, Editor, tools, assets, data, UI, WebGL, SDKs, or production pipelines.
tools
Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for effective Unity-MCP integration.
development
Convert a spec document into an implementation TODO list in the same spec folder. U se when the user says goal-todo, todo from spec, generate tasks from spec, turn this spec into todos, create implementation checklist, extract tasks, or asks to read a Docs/Specs design doc and produce what must be implemented. Includes UI/UX review and codebase investigation before writing the checklist. Do not use for implementing the tasks, creating new goal files, writing test cases, or verifying completed work.