Skip to content
guides/build-games-with-claude-code

Build a game with Claude Code. No coding needed.

I built four phone games this way. You copy six prompts, click Allow when Claude asks, and it does the technical part: installing tools, writing the game, testing it, saving it to GitHub and putting it online.

01Before you start

Five things only you can do.

Claude can't pay, create accounts or type your passwords. Do these once, then it takes over.

  1. 01

    Get a Claude plan

    Claude Code comes with the Pro plan and above, at claude.ai.

  2. 02

    Install VS Code

    Free, from code.visualstudio.com. This is where you'll talk to Claude.

  3. 03

    Add Claude Code

    In VS Code press Ctrl+Shift+X, search Claude Code, install the one by Anthropic, then click the Claude icon and sign in.

  4. 04

    Create a GitHub account

    Free, at github.com. This keeps a safe copy of your game.

  5. 05

    Create a Vercel account

    Free, at vercel.com. Choose Continue with GitHub. This puts your game online.

Claude asks first. Before it runs anything it shows you a one line description. Read it, then click Allow.

Windows may ask too.If a box says "Do you want to allow this app to make changes?" during an install, click Yes.

02The prompts

Copy, paste, click Allow.

Paste them one at a time, in order, and wait for each one to finish.

prompt 01

Let Claude set up your computer

Make an empty folder, open it in VS Code (File, then Open Folder) and paste this. Claude installs the tools and links your GitHub and Vercel accounts. When it needs you, it stops and tells you what to click.

prompt 01 · setup
I'm not a programmer and I have never coded on this computer. Please set up everything I need to build simple web games and put them online for free. Do as much of it yourself as you can.

1. Check what is already installed, then install what is missing: Node.js, Git, the GitHub command line tool and the Vercel command line tool. On Windows use winget.
2. Set up Git with my name and email. Ask me for them.
3. Connect my GitHub account to this computer.
4. Connect my Vercel account to this computer. I signed up for Vercel with GitHub.

Rules while you work:
- When you need me to do something, like approve a login in the browser or restart VS Code, stop and tell me exactly what to click, one step at a time, in simple words.
- After each step, check that it really worked before moving on.
- If something fails, fix it yourself if you can. Only ask me when you truly need me.

When everything is ready, give me a short list of what you installed and which accounts are connected.
prompt 02

Give it your house rules once

Claude saves these in a file and reads them every time you open the folder. You never repeat yourself, and that saves tokens.

prompt 02 · rules
Create a CLAUDE.md file in this folder with my house rules, so you remember them every time:
- I'm not a programmer. Explain things in simple words and tell me exactly what to click when you need me.
- Use plain HTML, CSS and JavaScript only. No game engine, no framework, no build step. Keep the files few and simple.
- Games are for phones first: big buttons, works in portrait, no zooming or scrolling by accident.
- Make sounds with code, never downloaded sound files, so there are no copyright problems.
- No emojis anywhere in the game.
- Before you tell me something is done, test it yourself in a browser and fix what you find.
prompt 03

Describe the game

Talk to it like you're explaining the game to a friend. This one is Mosquito Wahala. Swap in your own idea, but keep the same shape: the idea, how it plays, the screens, how it should feel, and the last paragraph.

prompt 03 · game
Let's build a phone game called Mosquito Wahala.

The idea: it's night in a Nigerian bedroom. Mosquitoes fly in from the edges of the screen towards the middle, where you are sleeping. Tap a mosquito to slap it before it bites you.

How it plays:
- Each mosquito you slap is 1 point. Show the score at the top, with the best score next to it.
- A mosquito that reaches the middle bites you and drains your blood bar. When the blood bar is empty, the game is over.
- Start easy: two or three slow mosquitoes. Every 10 points they get a bit faster and more of them come.
- Now and then, a fat mosquito comes. It takes two slaps but gives 5 points.
- Every 30 to 45 seconds, NEPA takes light. The screen goes almost black for about 8 seconds, and you can only see a small glow on each mosquito. When light comes back, flash the screen and show "Up NEPA!".

Screens:
- A start screen with the name, a short how to play, and a big Play button.
- A game over screen with the score, the best score and Play again.
- A sound on and off button.

How it should feel:
- A slap sound and a small splat mark where you hit. A buzzing sound that gets louder when mosquitoes are close.
- Warm night colours, a bedroom wall, a window, a mosquito net hanging on one side.
- Save the best score on the phone so it is still there tomorrow.

Before you start, tell me your plan in a few lines and ask me anything that is not clear. Then build it, test it yourself, fix anything broken, and tell me when it is ready to play.
prompt 04

Play it on your phone

Real thumbs find problems a mouse never will.

prompt 04 · play
Start the game so I can play it. Give me a link for this computer and a link for my phone on the same Wi-Fi. If the phone link does not open, tell me what to do.
prompt 05

Save it to GitHub

If your laptop spoils tomorrow, the game is still safe.

prompt 05 · github
Save this game to my GitHub as a new private repository called mosquito-wahala. Give me the link when it's done.
prompt 06

Put it online

Free on Vercel. After this, every change you save goes live by itself.

prompt 06 · vercel
Put this game online with Vercel for free and give me the live link. Connect it to the GitHub repository, so every time we save a change the live game updates by itself. If you need me to click anything, tell me exactly what.
03Making it better

Talk like a player.

You don't need to read the code. Play it, then say what you feel. One or two things per message.

  • The first 20 seconds are boring, the mosquitoes are too slow. Make it harder sooner.
  • When NEPA brings light back, play a short generator starting sound.
  • The Play again button is too low, my thumb keeps missing it. Move it up and make it bigger.
04Saving tokens

Why it didn't finish my tokens.

Plain code, no engine
Fewer files means Claude reads less every time you ask for a change.
/clear between jobs
Type it when you finish one thing and start another, so the old chat isn't carried along.
/compact when it slows down
It shrinks a long conversation so Claude keeps working without rereading everything.
One or two fixes per message
Talk like a player. "The button is too small" works better than a long list.