Building with AI
How to vibe code: build your first app with AI, step by step
A tool-neutral, step-by-step guide to vibe coding your first app, with the real prompts, a test card, a fix and a checklist before you share it.
By the GenKid team · · Facts checked · 9 min read
Key takeaways
- Start with something tiny you can describe in one sentence, plus a short "done when" list.
- Ask for the smallest version that works first, then add one feature per prompt.
- Before you run a change, read the AI's explanation and predict what will happen. Afterwards, test it on purpose, including odd cases.
- When something breaks, describe exactly what you did, what happened and what should have happened.
- Save a working version before every new change, and check for secrets and personal details before you share anything.
To vibe code, you describe a small app to an AI coding tool in plain English, run what it builds, and then improve it one change at a time: read the change, test it, fix what's wrong and save a version that works. The skill isn't typing code. It's knowing what you want, describing it clearly and checking the result.
This guide is for beginners of about 11 and up, and for parents building alongside them. We'll build a tiny virtual-pet app together, with every prompt shown, and finish with what to check before you show it to anyone. If the term is new to you, start with what vibe coding is.
What you need before you start
You need three things: an idea, an AI coding tool, and somewhere to run the result. For a first app, the simplest result is a web page made of HTML, CSS and JavaScript, because it runs in any browser. If those three words are new, our guide to HTML, CSS and JavaScript explains what each one does.
Choosing a tool. This guide doesn't recommend a particular product, because the steps are the same in any of them. What matters is that the tool can show you the code it wrote, run it, and let you go back to an earlier version. If you're weighing up options, our comparison of vibe coding tools sets out their age rules, free plans and data use.
Check the age rules first. AI tools set their own minimum ages and many need an account. If you're under 18, choosing a tool and creating any account is a decision for your parent or guardian. Our guide to age limits on coding and AI tools explains how to check them.
Use made-up details only. Your app should be about something imaginary: a pet, a planet, a club for robots. Never put your real name, school, address, photos or passwords into a prompt or an app. What not to tell an AI covers why.
Step 1: Pick a tiny idea and decide what "done" means
Pick something you can describe in one sentence. Ours is:
A virtual pet called Moss, a space slug, who gets hungry over time and needs feeding.
Then write a "done when" list: three or four things you could check by trying the app.
- Moss's hunger shows as a number from 0 to 10.
- Hunger goes up by 1 every few seconds.
- Clicking Feed lowers hunger by 3.
- At 10, the page says Moss is very hungry.
This list is your plan and your test in one. Notice what isn't on it: no sound, no shop, no saving. Those can come later. If your idea feels too big to describe like this, breaking it into smaller steps helps, and 25 app ideas kids can build with AI has more starting points.
Step 2: Ask for the smallest version that works
Your first prompt asks for the core only. It gives the AI a goal, the context, the limits and the checks, which is the pattern explained in how to write a coding prompt.
Goal: Make a one-page virtual pet called Moss, a space slug.
Show Moss's hunger as a number from 0 to 10, starting at 0.
Hunger goes up by 1 every 5 seconds. A "Feed" button lowers it by 3.
When hunger reaches 10, show "Moss is very hungry!"
Constraints: Plain HTML, CSS and JavaScript only. No outside libraries,
no images from the internet (use an emoji for Moss).
Checks: I'll wait about 16 seconds and expect hunger 3, then click Feed
and expect 0.
Please explain your code in 3 short bullet points.Why so specific? A prompt like "make a pet game" leaves every decision to the AI, and it fills the gaps with defaults that may not match what you had in mind. A little extra writing now can save several rounds of fixes later.
Step 3: Read the change and predict before you run it
Don't press run straight away. First read the AI's three bullet points, then find the part of the code each one describes. Say out loud what you expect to happen.
Here's the kind of code an AI tool might write for the Feed button:
let hunger = 0;
function feed() {
hunger = hunger - 3;
showHunger();
}Predict: what happens if you click Feed when hunger is already 0? Take a guess before reading on.
Reading before running is the "predict, then run" habit many coding teachers use, explained in our guide to the PRIMM method. It's also how you stay in charge of code you didn't type. For a fuller checklist, see how to review AI-generated code.
Step 4: Test it on purpose with a test card
Now run it, and test like someone trying to break it. A test card is a small table: what you do, what should happen, and what actually happened.
| What I do | What should happen | What happened |
|---|---|---|
| Wait about 16 seconds | Hunger shows 3 | Hunger shows 3 ✅ |
| Click Feed once | Hunger shows 0 | Hunger shows 0 ✅ |
| Click Feed again at 0 | Hunger stays at 0 | Hunger shows -3 ❌ |
| Wait until hunger is 10 | "Moss is very hungry!" appears | Message appears ✅ |
| Wait 10 more seconds | Hunger stays at 10 | Hunger shows 12 ❌ |
Two rows fail. Your "done when" list said hunger runs from 0 to 10, and the code doesn't stop it at either end. If you predicted the -3 in Step 3, well spotted: you found the bug before running anything.
The odd cases (clicking at 0, waiting past 10) are where bugs hide. Testing for beginners explains how to choose them.
Step 5: Fix it with a precise bug report
"It's broken, fix it" gives the AI almost nothing to go on. Describe exactly what you did, what happened and what should happen:
Two bugs:
1. When hunger is 0 and I click Feed, hunger shows -3. It should stay at 0.
2. After hunger reaches 10 it keeps going up (I saw 12). It should stop at 10.
Please keep hunger between 0 and 10 and change nothing else.
Explain the fix in one or two sentences.The fixed code might look like this:
function feed() {
hunger = Math.max(0, hunger - 3);
showHunger();
}
function getHungrier() {
hunger = Math.min(10, hunger + 1);
showHunger();
}Math.max(0, …) picks the bigger of two numbers, so hunger can't drop below 0. Math.min(10, …) picks the smaller, so it can't go above 10. Then run the whole test card again, not just the rows that failed. A fix in one place can break something else. If you're stuck on a bug the AI can't seem to fix, our guide to debugging for beginners shows how to narrow it down yourself.
Step 6: Save a version that works
When every row on the test card passes, save a version before you change anything else. Your tool might call it a save point, a checkpoint or a version. Professional developers do the same thing with Git, explained in what is Git?.
A saved version means you can experiment without fear. If the next change goes badly, go back and try a different prompt.
Step 7: Add one feature at a time
Now grow the app, one feature per prompt, and repeat Steps 3 to 6 each time. For example:
Add a "Play" button. Each click adds 1 to happiness: show happiness
from 0 to 10, starting at 5, going down by 1 every 8 seconds.
Keep happiness between 0 and 10, like hunger. Don't change how hunger works.
Checks: clicking Play twice quickly from 5 shows 7; it never goes above 10.Add a new row or two to your test card for each feature. Small steps mean that when something breaks, you know which change caused it.
Before you share it: a checklist
Code that runs isn't necessarily safe. Security company Veracode gives AI models a set of coding tasks and checks the code they write for common security flaws. Its 2026 GenAI Code Security Report put the average security pass rate at 56% across more than 100 models. In an October 2026 update, the average for the 18 models in its latest round rose to 62%. These are tests of AI models on professional-style tasks, not of beginners' apps, but the lesson carries over: working and safe aren't the same thing.
In a June 2026 blog post on the "vibe coding spectrum", a principal security architect at the UK's National Cyber Security Centre (NCSC) argues that how carefully you check code should depend on the stakes. Full vibe coding "can often be perfectly fine" for prototypes and demos with no sensitive data, the post says, but code that handles logins, sensitive data or secret tokens and credentials needs "more rigour": careful review of what the AI produces and checking that you understand it. A first app like Moss sits firmly at the low-risk end, and it should stay there.
Before anyone else sees your app, check:
- [ ] No real personal details anywhere: names, schools, photos, addresses.
- [ ] No secrets in the code. No passwords and no API keys. Our guide to API keys and secrets explains why a key in code is a key anyone can copy.
- [ ] No logins and no collecting other people's information. If your idea needs these, it's no longer a first project. Talk to a parent, guardian or teacher first.
- [ ] Every test card row passes, including the odd cases.
- [ ] You can explain each part in your own words. If you can't, ask the AI to explain that line simply, then check its explanation against what the app does.
- [ ] A grown-up has agreed if you're under 18 and want to put it online. Launching your first app safely walks through the decisions.
How GenKid teaches this
This guide follows the habits GenKid's lessons build: predict what code will do before running it, then read and test it, and finish by explaining it back in your own words. In GenKid's course projects, learners review each change line by line before accepting it. In the Studio, GenKid's building space, each finished change is saved as a save point with a "See what changed" view, and you can undo a change or bring back a file from an earlier build. You can see where this fits on the GenKid pathway.
Frequently asked questions
Which AI coding tool should a beginner use?
Any tool that shows you the code, runs it and lets you go back to an earlier version will work for this method. Check its age rules and privacy terms first, and if you're under 18, let your parent or guardian choose and set it up.
What should I build after my first app?
Pick another small idea you can describe in one sentence, or add a bigger feature to your pet, such as a second pet or a day-and-night cycle. [25 app ideas kids can build with AI](/blog/app-ideas-for-kids) sorts ideas by level, so you can step up gradually. Keep using the same loop: prompt, read, test, fix and save.
What if the AI says it fixed the bug, but it's still there?
Run your test card again and report the exact result: "I clicked Feed at 0 and still see -3." Go back to your last saved version if the code has got messy, then ask for a smaller change. Sometimes changing one line yourself is quicker than another prompt.
Sources
- The "vibe coding spectrum" approach to AI-assisted software development (opens in a new tab) — National Cyber Security Centre blog, June 2026
- Veracode finds first meaningful gain in AI code security since 2025 as average pass rate hits 62% (opens in a new tab) — Veracode via Business Wire, October 2026
- 2026 GenAI Code Security Report (opens in a new tab) — Veracode, 2026
How we write: GenKid articles are researched and drafted with the help of AI tools, then checked in a separate review step against the sources listed above before they are published, and re-checked when they are updated. Rules and products change, so check official pages for your country before acting on anything here. This article is general information, not legal advice. Spotted a mistake? Email hello@genkid.app.