---
title: "Prototyping in code for designers: setup, workflow, and prompting with Cursor and Claude Code"
description: "A practical guide for designers who want to build real, working prototypes in code with AI tools like Cursor and Claude Code: setup, workflow, prompting patterns, and how to avoid AI slop."
url: "https://mikestilling.com/guides/prototyping-in-code-for-designers/"
date: "2026-11-20"
author: "Mike Stilling"
---

> AI-generated from Mike Stilling's work, notes, and writing.

# Prototyping in code for designers

Most of Mike Stilling's design days are split between Figma, a code editor, and the usual chat and docs tools. Drawing on that workflow, this guide covers why to prototype in code, how to get set up, and how to work with AI tools without making a mess.

## The short answer

**Prototype in code when the idea depends on interaction, state, real data, or responsiveness.** Start from a real boilerplate, not a blank chat. Keep your editor and a live browser preview side by side. Describe changes in code vocabulary, one section at a time, and review every diff. Commit often.

AI coding tools like Cursor and Claude Code make this realistic for designers. But AI is a multiplier. If you know nothing, a thousand times nothing is still nothing. A little HTML and CSS goes a very long way.

## Why prototype in code

- **People share websites, not design files.** When something is inspiring, people send a link. A working prototype travels the same way.
- **Most of the layout is already decided.** SaaS interfaces mostly follow known patterns: a left nav plus content, or a top nav plus stacked sections. The differentiation lives in interaction, transitions, and state, which are the things static design tools are worst at showing.
- **Seeing is believing.** At FireHydrant, Mike rebuilt the homepage overnight to prove a full site rebuild was possible, and it got approved. For Uplink, Mike built a demo that pairs a visitor's phone to the marketing page with a QR code so they can watch on-device automation run live. No mock could do that. ([More on that project](https://mikestilling.com/work/stilling/).)
- **You can assess what AI gives you.** The most capable AI tools are code-native. Without a foundation, AI is just a faster way to generate code you can't judge.

The goal isn't to become an engineer. It's to be able to read code, prompt for it, and know when something is off.

## Get set up

You need three accounts: **GitHub** (where code lives), an AI-capable editor like **[Cursor](https://cursor.com/)**, and a host like **Netlify** or **Vercel** (builds and serves your site). Using the same email everywhere, or signing up with "Continue with GitHub," keeps things simple. Mike leans toward Netlify because it's less opinionated about your stack.

On a Mac, the local setup is a few Terminal commands:

```bash
# Homebrew: the package manager for installing developer tools
brew -v   # check if it's installed; if not, install it from brew.sh

# Node.js: runs JavaScript tooling and local dev servers
node -v
brew install node

# nodenv (optional): switch Node versions per project
brew install nodenv
```

Then install [GitHub Desktop](https://desktop.github.com/) if you'd rather not use Git from the command line. A useful mental model: Homebrew installs tools, npm pulls in other people's code, and Node runs it.

## The basic loop

Almost every code project starts from a boilerplate rather than a blank file. Once you have one, the loop looks like this:

1. **Copy a starter into your GitHub account** (GitHub's "Use this template") and clone it with GitHub Desktop.
2. **Open the whole folder in your editor**, not a single file. A project is a collection of files that work together.
3. **Install dependencies** in the editor's built-in terminal: `npm i`. You'll almost never need to touch the `node_modules` folder it creates.
4. **Start the dev server**: `npm start`. It builds your site and serves it at something like `localhost:8080`, rebuilding every time you save. Stop it with `Ctrl+C`. Starting and stopping it becomes a habit.
5. **Edit, save, look.** Mike keeps the editor on one monitor and the browser on the other. That tight save-and-look loop is how Mike designs spacing, color, layout, and animation.
6. **Commit and push** after each meaningful slice of work, with a short message describing it.
7. **Let the host deploy.** Connect the repo to Netlify or Vercel once, point it at the project's build command and output folder (often `dist`), and every push goes live in about a minute.

The flow is: your editor → GitHub → the host builds it → live on the web. When you work with a team, changes go through pull requests instead of straight to main.

## Prompting patterns that work

The tools change fast. These habits haven't:

- **Always reference existing code.** This is the single best habit you can build. "Create a new page like `@about.webc`" gets you your own conventions instead of the AI's guesses.
- **Name the exact file.** In Cursor, `@filename` points at a file, `@folder` at a folder, and `@codebase` lets it search the whole project.
- **Describe layout in code vocabulary.** "2-column grid, 16px gap, vertically centered, 96px vertical padding" beats "put two things next to each other." Learning a little utility CSS pays off right here. See [designing in code with Tailwind](https://mikestilling.com/guides/designing-in-code-with-tailwind/).
- **State constraints.** "No new libraries or dependencies, vanilla JavaScript only" keeps a prototype from ballooning.
- **Stub where code should go.** Add the empty element (for example a `<canvas data-webgl-effect>`) and a comment like `// WebGL effect goes here`, then ask the AI to fill that exact spot. Mike has used this to get an AI to write a 100+ line WebGL shader, an area Mike barely knows, then refined it with follow-ups.
- **Show, don't describe, when it's visual.** Drag a screenshot into the chat. Export assets from Figma at 2x, put them in an organized assets folder, and reference the path in your prompt. Figma connections via MCP exist, but screenshots are the easiest place to start.
- **Go broad, then narrow.** A first prompt for the overall section, then small follow-ups like "make the gap between cards 24px instead of 16px." You're closer to a creative director than an engineer here.

## Set up projects so AI can help

How a project is organized makes a huge difference in how well AI tools work in it.

- **Keep context close together.** Mike's studio boilerplate uses one file per page, with markup, content, and front matter (title, SEO description, social image) all in one place. It turns out to be unusually LLM-friendly.
- **Prefer fewer dependencies.** Every abstraction is something the tool has to discover and might misuse.
- **Write project instructions.** Most tools read a project-level instructions file (like `CLAUDE.md` or Cursor rules). Put your conventions there: spacing scale, component names, things to never do.
- **Use utility classes.** Utility-first CSS makes design decisions visible in the markup, which makes them easy for you and the AI to read and change.

## How not to ship slop

AI makes it easy to produce a lot of mediocre stuff quickly. A few rules Mike sticks to:

- **Expect two or three follow-ups.** If you're on round ten, the approach is wrong. Step back and change it.
- **Review every diff.** Trust your design eye. If you don't understand a change, ask the editor's AI to explain it before accepting.
- **Know when to hand-code.** Changing one class value is faster by hand than by prompt.
- **Commit often.** Git is your unlimited undo button. When the AI makes a mess, roll back to the last commit.
- **Watch for hallucinations.** Invented CSS classes, APIs that don't exist, and component names that aren't in your codebase. If something doesn't render, check the names against the docs or your own code.
- **Check the basics.** Keyboard navigation, visible focus states, contrast, and mobile layout. AI tools skip these constantly.
- **Keep confidential data out of prototypes.** Prototypes travel further than you expect.

For the HTML, CSS, and Tailwind side, see [designing in code](https://mikestilling.com/guides/designing-in-code-with-tailwind/). If you're deciding what to learn first, the [design engineer guide](https://mikestilling.com/guides/design-engineer/) has a short list.

## Frequently asked questions

### Can designers use Claude Code or Cursor without knowing how to code?

You can get a working prototype without writing code yourself, but AI is a multiplier: it multiplies what you already know. Understanding basic HTML, CSS, and how files in a project relate to each other is what lets you judge the output, fix what is broken, and avoid getting stuck.

### What do designers need installed to prototype in code on a Mac?

A GitHub account, an AI-capable code editor like Cursor, and a host like Netlify or Vercel. Locally: Homebrew (package manager), Node.js (runs JavaScript tooling and local dev servers), optionally nodenv to switch Node versions per project, and GitHub Desktop if you prefer a visual Git client.

### Should I prototype in Figma or in code?

Use both. Figma is still fast for exploring visual direction. Code is better when the idea depends on interaction, transitions, state, real data, or responsiveness, and when the prototype needs to convince people. Most SaaS layouts are fairly standard, so the differentiation often lives in exactly those things that static tools struggle to show.

### How do you write good prompts for AI coding tools as a designer?

Name the exact file, point the AI at existing code to follow, describe layout in code vocabulary (for example '2-column grid, 16px gap, vertically centered'), state constraints such as 'no new dependencies, vanilla JavaScript only,' and then iterate with small, specific follow-ups.

### What is the difference between Cursor and Claude Code?

Cursor is a code editor with AI built in, so you see files, diffs, and an agent chat side by side. Claude Code is an AI coding agent you run in a terminal, desktop app, or IDE, and it is strong at multi-step changes across a project. Cursor is usually the easier starting point for designers.

### Can a code prototype become production code?

Sometimes, if it was built on the same stack and conventions as production and someone reviews it carefully. Often the prototype's value is proving the idea and the details, and engineering rebuilds it properly. Decide which kind you are making before you start.
