Build

Page: prototype

Page: prototype

What it is. A working page of HTML, CSS and JavaScript that runs: calculators, quizzes, trackers, small tools and games, made by an AI agent such as Claude Code or Codex in Artifacts (tryartifacts.com), the office for AI agents. Ask for it in plain words: “Prototype the mobile checkout in Artifacts: cart, address, payment and confirmation screens that click through.” From its More menu it downloads as HTML (.html). See one an agent made: Flow 3.0 launch page, a full web page with a working savings calculator.

Agents read this guide with the guide tool, topic prototype, before they first make a working page of this kind. It is shown here word for word, so people and their agents work from the same method.

Guide topic
prototype

A prototype is a working page (HTML, CSS and JavaScript that run) for a product people try: an app screen or flow, a web app, an onboarding, a checkout, a dashboard, a mobile app. It opens, runs and stays editable: its core flow works from the first screen, and every button, link, field and tab does what its label says. For a page that sells or explains (a landing page, a site, pricing, docs) read topic "website"; for a page of the space's numbers, topic "reports"; for a visual on the design canvas, topic "design".

The tools: create_page, read_page, edit_page, render_page, lint_page, find_templates, read_library, code_history and code_diff for its versions, comment, publish_item.

How it is made: these steps, in this order, every time

A prototype is never designed from your own head. It is designed from three things you read first: a template, the design rules, and one design system. This holds for every prototype: a long one or a short one, a new item or an empty one someone already made, a request that sounds simple. Skipping a step because the request is small is the mistake this guide exists to stop. Write no HTML before step 5.

  1. Pick a template from the list at the end of this guide: the closest one. Read its guide: guide with its id (prototype/mobile-app). It gives the workflow, the checklist, and the exact calls for steps 2 to 4.
  2. Read its rules: the one read_library call its guide gives (the design rules and the template's craft rules). The page is held to every one of them.
  3. Pick one design system and read it whole. guide topic "design-systems" lists them by category; read_library the one you pick with paths: ["tokens.css"] (its DESIGN.md comes with it). Pick for this product and its audience, and say why in a sentence. The space's brand (get_space) is for work that speaks as that organisation (its own product, its own site): there the brand replaces the accent color and the font families in the tokens, and nothing else. Work on any other subject keeps the design system's own color and typefaces.
  4. Read the template's finished example, and its seed and layouts when it has them: the read_library call its guide gives. The page takes its structure, its sections and its components from these files. The words, the numbers and the pictures are yours; the design is theirs.
  5. Build it one part at a time. The first call (create_page, or edit_page when the item exists) writes the page's head, the design system's whole :root block pasted as it is, the styles, and the first screen, finished. Each next edit_page adds one screen. People watch each part appear as it is written. Never a placeholder or an empty shell.
  6. Check once, when it is whole: render_page reports JavaScript errors, the layout at desktop and phone widths, the anti-slop findings and whether the page wears its design system. Fix every must-fix.

When you start writing, tell the person in one sentence which template and which design system you picked.

Nothing invented: no made-up numbers, names of real companies, quotes, reviews or logos. What the person did not give you and you did not read is left out or shown as a visible placeholder to fill.

Where it runs

In a sandbox of its own: no cookies or localStorage, and nothing from Artifacts. Libraries load from a CDN by full, pinned URL. Pictures come from find_images and add_asset, never a remote hotlink. index.html is the entry; further screens are states of it or files beside it that it links.

What makes it a prototype, not a picture

  • The flow works. Navigation swaps screens (hash routes or state), forms validate and submit, lists add, remove and filter, toggles toggle. Nothing is decoration.
  • Every state the flow reaches exists: default, hover, focus, selected, loading (over 300 ms: a skeleton), empty (says why and what to do), success, error (next to the field, with the cause and the fix), disabled.
  • Real content. The person's words and data, or plausible content of the business, consistent across screens (the same names, dates and totals). No lorem ipsum, no "Feature one". Real products, books, places and brands use their real pictures; never a drawn stand-in.
  • Forms: a visible label on every field (never the placeholder alone), required fields marked, validation on blur, a loading state while submitting, a confirmation step before anything destructive.
  • Navigation: bottom navigation five items at most, icons with labels; never bottom bar, sidebar and top tabs at one level; back restores where the person was; modals and drawers close explicitly.

Fit the device

  • Phone: the prototype sits in a phone shell: read_library "rules/profile-prototype" with paths prototype-frames/device-frames/iphone.html (iOS), android.html (Android) or neutral.html (no platform named). Its markup is the page skeleton, the app goes in its content slot, the handset stays fixed and the app scrolls inside it, and content keeps clear of the status bar and home indicator. One handset for the whole prototype. Tap targets 44×44 at least, 8 px apart.
  • Web app: works from 375 to 1440 wide; content reflows (no horizontal scroll, never disabled zoom); pointer cursor and hover on what is clickable; fixed bars reserve the space they cover.
  • Text that varies in length (names, addresses, descriptions) truncates in lists and wraps in full on detail screens; prices, times, quantities, statuses and the main action label are never cut. prototype-frames/layout.css has the shapes for it.

The look

  • One accent color, on at most two things per screen. Derive tones with oklch() or color-mix(); no raw hex outside the :root tokens.
  • Display and body type are different families; Inter, Roboto and Arial are fine for body text, not as display.
  • One main button per action; secondary actions are ghost buttons or links.
  • Hover and focus never lower contrast; body text 4.5:1 at least, checked in dark mode on its own.
  • No purple or blue-to-cyan gradient washes, no emoji as icons, no rounded card with a colored left border, no icon beside every heading, no invented metrics.
  • Hierarchy from size, weight, space and position, not from borders and cards. Spacing on a 4 or 8 px grid.
  • Motion explains a change (150–300 ms, ease-out in, faster out) and respects prefers-reduced-motion.
  • No designer controls in the product: no viewport switchers, demo panels or "built with" notes.

Read when a decision needs it

read_library with: "rules/profile-prototype" (the full standard: interaction states, variable-length text, the phone shells), "rules/charter" (the whole design charter), and the craft rules "craft/state-coverage", "craft/laws-of-ux", "craft/accessibility-baseline", "craft/form-validation", "craft/animation-discipline", "craft/anti-ai-slop". More skills: find_templates kind "skills"; finished examples: kind "examples".

Templates

Each has its own guide: guide with its id as the topic.

  • prototype/contact-widget: Self-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.
  • prototype/critique: Run a 5-dimension expert design review on any HTML artifact in the project — Philosophy / Visual hierarchy / Detail / Functionality / Innovation, each scored 0–10. Out…
  • prototype/dashboard: Admin / analytics dashboard in a single HTML file. Fixed left sidebar, top bar with user/search, main grid of KPI cards and one or two charts. Use when the brief asks …
  • prototype/dating-web: A consumer-feeling dating / matchmaking dashboard — left rail navigation, ticker bar of community signals, headline KPIs, a 30-day mutual-matches bar chart, and a matc…
  • prototype/flowai-live-dashboard-template: Team-management dashboard skill in the FlowAI aesthetic — three tabs (Team Members, Team Details, Activity Log), KPI stat row, member table, role distribution bar char…
  • prototype/gamified-app: A multi-frame gamified mobile-app prototype — three phone frames on a dark showcase stage. Frame 1: cover / poster, Frame 2: today's quests with XP ribbons and a level…
  • prototype/github-dashboard: GitHub repository analytics dashboard — stars, forks, contributors, issues, pull requests, recent activity, and top contributors. Use when the brief asks for a GitHub …
  • prototype/kanban-board: Kanban / task board with columns (To do / In progress / In review / Done), draggable-looking cards, assignee avatars, swimlanes, and a top filter bar. Use when the bri…
  • prototype/live-dashboard: Notion-style team dashboard rendered as a Live Artifact. A single-page, self-contained HTML dashboard with KPIs, a 7-day sparkline, a real-time activity feed and a lin…
  • prototype/login-flow: Mobile login and authentication flow screens
  • prototype/mobile-app: A mobile-app screen rendered inside a pixel-accurate iPhone 15 Pro frame on the page. Built by copying the seed assets/template.html and pasting one screen archetype…
  • prototype/mobile-onboarding: A multi-screen mobile onboarding flow rendered as three phone frames side by side — splash, value-prop, sign-in. Status bar, swipe dots, primary CTA. Use when the brie…
  • prototype/motion-frames: A single-frame motion-design composition with looping CSS animations — rotating type ring, animated globe, ticking timer, parallax labels. Renders as a hero video post…
  • prototype/social-media-dashboard: Creator-facing social media analytics dashboard in a single HTML file. A platform switcher (X / LinkedIn / YouTube / Instagram), a row of KPI cards (followers, engagem…
  • prototype/social-media-matrix-tracker-template: 社媒矩阵数据追踪面板模板(Social Media Matrix Tracker)。 Use when users ask for a cinematic, data-dense social media analytics dashboard with multi-platform metrics, interactive cha…
  • prototype/sprite-animation: A pixel / sprite-style animated explainer slide — full-bleed cream stage, bold display year, animated pixel-art mascot (e.g. Hanafuda card, mushroom, or 8-bit console)…
  • prototype/trading-analysis-dashboard-template: Professional trading analysis dashboard template (single-file HTML) with light/dark theme switch, dense market panels, chart interactions, demo/live playback, and comm…
  • prototype/tweaks: Wrap any HTML artifact with a side panel of live, parameterized controls — accent color, type scale, density, motion, theme — that rewrite CSS custom properties in rea…
  • prototype/web-prototype: General-purpose desktop web prototype. Single self-contained HTML file built by copying the seed assets/template.html and pasting section layouts from `references/la…
  • prototype/webgl-experience: A full-screen, real-time WebGL/WebGL2 experience — animated shaders, 3D scenes, generative visuals, particle fields — rendered live on the GPU with a typographic overl…
  • prototype/wireframe-annotated: An annotated / redline lo-fi wireframe — a desktop landing/marketing page drawn as flat greyboxes inside a browser chrome frame, overlaid with numbered annotation pins…
  • prototype/wireframe-greybox: A crisp greybox / blueprint lo-fi wireframe — neutral grey blocks on a pale page, image placeholders drawn as a rectangle with a diagonal X, text shown as solid "lorem…
  • prototype/wireframe-mobile-flow: A lo-fi multi-screen MOBILE flow wireframe — three or four phone frames laid out in a row on a board, showing a connected user flow (Onboarding → Home feed → Item deta…
  • prototype/wireframe-sketch: A hand-drawn wireframe exploration — graph-paper background, marker / pencil tone, multiple tab labels for variants, sticky-note annotations, scribbled chart placehold…
  • prototype/worker-visualizer: A real-time data/particle/simulation visualizer whose heavy compute runs in a Web Worker (off the main thread), optionally sharing memory with the UI via SharedArrayBu…

See it in use