One Slash Command. Instant Prototype Gallery. No Figma Required.

Prototyping UI flows usually means opening Figma, wiring up frames, or hand-coding HTML pages from scratch. Designers iterate in design tools. Developers iterate in code. There's always a gap between the mockup and the implementation.
What if you could stay in your terminal and generate a clickable prototype gallery in under a minute? No design tool. No build step. Just one command.
I built a Claude Code slash command called /prototype that does exactly that. I just used it to prototype MusicLeague's "Create New League" flow — 11 screens across 2 features — and it took less time than it would have taken me to open Figma and create the first frame.

The Workflow

Here's what happened. I opened Claude Code from my wireframes directory and typed /prototype. Claude asked me three things:
  1. App name — MusicLeague
  2. Device type — Browser (web app frames with title bar, dots, and URL bar)
  3. Features and screens — Create New League (7 screens: Details, Songs & Votes, Timing, Rounds Empty, Rounds Added, Players, League Home) and League Detail (4 screens: Active League, League Ended Empty, League Ended Completed, Open League Visitor)
Claude generated a single standalone HTML file. No npm install. No build step. Just open prototypes/music-league.html in a browser.
What I got: a gallery page with horizontally scrollable feature rows, browser-frame styled screen cards with placeholder content, a sticky header with navigation links, a dark mode toggle, and a lightbox that opens when you click any screen. Arrow keys navigate between screens. Escape closes the lightbox.
Every screen had placeholder content with a pulsing shimmer animation and the text "Ask Claude to fill this screen." Each placeholder was wrapped in <!-- START/END --> comment markers so Claude knows exactly where to swap in real content.

Filling In the Screens

This is where it gets powerful. I took screenshots of the existing MusicLeague app screens and shared them with Claude one at a time:
"Fill in the Step 1 - Details screen based on this screenshot."
Claude looked at the screenshot, matched the layout, and recreated it as a Tailwind CSS mockup inside the browser frame. Colors, spacing, form fields, buttons — all of it. The Edit tool found the START/END markers and surgically replaced just that one screen's content.
Then I iterated. "Make the submit button full width." "Add a league image placeholder at the top." "Match the purple accent color from the real app." Each request updated just the relevant screen without touching anything else in the file.
I filled in all 11 screens this way. The result is a 1,474-line HTML file that serves as a complete visual reference for the Create New League and League Detail flows. No Figma project. No component library. Just one HTML file I can open anywhere.

What You Get

The generated gallery includes:
  • Standalone HTML — No dependencies beyond Tailwind CDN. No build step. Works offline after first load.
  • Device frames — Browser chrome (title bar, colored dots, URL bar) or phone bezels (notch, home bar) depending on your choice.
  • Feature rows — Each feature gets a horizontally scrollable row with a sticky label on the left. Scroll right to see more screens.
  • Lightbox — Click any screen card to view it enlarged. Arrow keys navigate between screens. Escape closes.
  • Dark mode — Toggle button in the header. Preference persists in localStorage.
  • Scroll indicators — Fade gradients appear on rows that have more screens to the right.
  • Surgical editing — Every screen is wrapped in START/END comment markers so Claude can find and replace individual screens without affecting the rest of the file.

Install It Yourself

The /prototype command is a markdown file. Drop it in your global commands directory and it works from any project:
File: ~/.claude/commands/prototype.md
Here's the full source:
# /prototype — HTML Feature Prototype Gallery

Context: When planning features for phone or web apps, it's valuable to see
all features and their screens on a single HTML page. This command scaffolds
a polished, standalone HTML prototype gallery where:
- Rows = features (Community Feed, User Profile, Settings, etc.)
- Columns = screens for that feature (feed list, add post, post detail, comments)

After scaffolding, the user keeps chatting with Claude Code to fill in each
cell with actual UI mockups.

## Invocation

/prototype <app-name> [feature1, feature2, feature3, ...]

Examples:
- /prototype MusicLeague — prompts for features interactively
- /prototype MusicLeague community-feed, leagues, voting — scaffolds immediately
- /prototype MusicLeague path/to/features.md — reads features from a file

## Workflow

### Step 1: Parse Input
- Extract app name from first argument
- Detect remaining arguments:
  - Comma-separated list → use as feature names
  - File path (ends in .md, .txt) → read features from file
  - Nothing → ask user to list features

### Step 2: Clarify Details (always ask both)
1. Device type: phone app or web app (determines frame style — phone bezel
   vs browser window)
2. Screen names per feature: For each feature, ask the user to name the
   specific screens. Each feature can have a different number of screens.

### Step 3: Generate HTML File
- Write a standalone HTML file to ./prototypes/<app-name-kebab>.html
- The HTML includes:
  - Tailwind CSS via CDN (no build step)
  - A header with app name and navigation
  - Feature rows with screen placeholders
  - Phone-frame or browser-frame CSS for each cell
  - Sticky left column with feature names
  - Horizontal scroll per row for many screens
  - Light/dark mode toggle
  - Lightbox for zooming into individual screens
- Each cell contains a placeholder with the screen name and an HTML comment
  marking where to insert mockup content

### Step 4: Present Summary
Show the user what was created and how to iterate:
- File path
- How to open in browser
- How to fill in screens (e.g., "Fill in the Community Feed → Feed List
  screen with a Tailwind mobile UI")

## HTML Template Design

Layout: CSS Grid with Horizontal Scroll

Each feature = one row. Each screen = one cell scrolling right.
Feature names stick to the left during horizontal scroll.

### Key CSS Decisions
- Outer layout: Vertical scroll (features stack)
- Per-feature row: display: flex; overflow-x: auto;
- Feature name: position: sticky; left: 0;
- Device frames: Pure CSS phone bezels or browser chrome
- Phone frame: ~375x812px scaled to ~180x390px thumbnails
- Placeholder cells: Dashed border, muted text, pulsing shimmer
- Lightbox: Click to expand, keyboard nav (arrows + ESC)

### Placeholder Cell HTML

<!-- PROTOTYPE: feature-name / screen-name -->
<div class="prototype-cell" data-feature="feature-slug" data-screen="screen-slug">
  <div class="phone-frame">
    <div class="phone-notch"></div>
    <div class="phone-screen">
      <!-- START: feature-slug/screen-slug -->
      <div class="placeholder">
        <p>Screen Name</p>
        <p class="text-sm text-gray-400">Ask Claude to fill this screen</p>
      </div>
      <!-- END: feature-slug/screen-slug -->
    </div>
    <div class="phone-home-bar"></div>
  </div>
</div>

The START/END comments make it easy for Claude Code to find and replace
specific screens using the Edit tool.

### Interactivity (Vanilla JS)
- Dark/light toggle: Adds/removes dark class on <html>
- Lightbox: Click a frame → overlay at near-full-size
- Keyboard nav: Left/Right arrows cycle screens, ESC closes
- Scroll indicators: Fade gradients on overflowing rows
Save that file, reload Claude Code, and type /prototype. That's it.

The Iteration Loop

The scaffolding is just the starting point. The real power is what happens next. Here are the kinds of things you can say to Claude after generating the gallery:
  • "Fill in the Step 1 - Details screen" — Claude replaces the placeholder with a full Tailwind mockup
  • "Here's a screenshot of the real app. Match this." — Claude recreates the screenshot as Tailwind HTML
  • "Make it look better" — Claude refines spacing, colors, and typography
  • "Add a new screen called Results to the League Detail row" — Claude adds a new cell with proper markers
  • "Switch all screens to use a dark purple color scheme" — Claude updates the Tailwind classes across the file
Every edit is surgical. Claude finds the START/END markers for the specific screen you're talking about and replaces just that content. The rest of the gallery stays untouched.
This loop — generate, fill, iterate — turns a static HTML file into a living design document. I've been using it to prototype entire feature flows in a single sitting. No context switching between tools. No exporting. No syncing.

Why This Matters

Slash commands turn repetitive workflows into one-liners. The /prototype command encodes my preferred gallery structure, device frames, lightbox behavior, and placeholder patterns into a single invocation. I don't have to explain the format every time. I just type the command and start designing.
If you're building slash commands for Claude Code, this is the pattern: take a workflow you repeat, write it as a markdown file describing what you want, and save it to .claude/commands/. Claude reads the markdown and executes the workflow.
For more on building custom commands and agents, check the Claude Code slash commands docs and the subagents guide.
Try it. Type /prototype and see what happens.