Home › Product & design › Prototype to working app: how to do it with AI
Prototype to working app: how to do it with AI
From official vendor pages; selected tasks also include dated logged-out free-plan trials. Report an error.
Advanced Risk: High 🧩 Product & design
Use a coding agent to build a small working app from a written spec: it creates the project, writes code and tests, runs them, and opens a pull request for you to review. It works best for small, well-defined apps; you still review every change and own what ships.
Who it’s for: Developers, technical founders and product people with some coding experience.
Why high risk: Agents can write insecure or wrong code that looks right, and they can run commands on your machine or in the cloud.
ChatGPT has the highest score on our published rubric (94/100) of the 4 tools listed for this task. Codex coding agent (limited on Free, more on Plus at $20/month) handles cloud coding tasks and PR review.
Step by step
- Write a short spec: what the app does, screens or endpoints, data, and what "done" means (tests that must pass).
- Create an empty repository or branch and give the agent only that project.
- Ask for a plan first and approve it before the agent writes code.
- Let it build in small steps, running tests after each, and read the diffs as it goes.
- Review the final pull request like a colleague's: security, error handling, secrets, dependencies.
- Deploy to a test environment first and try it yourself.
AI prompts to build an app from a spec with a coding agent
Replace the [brackets] with your details. See all prompt examples
Here's the spec for a small app: [spec]. Before writing any code, give me a plan: tech stack, file structure, data model, and the tests you'll write. Wait for my approval.
Implement step 1 of the plan only. Write tests first, then code, run the tests, and show me the diff and test results. Don't touch anything outside [folder].
Review this pull request as a senior developer: security issues, missing error handling, hard-coded secrets, unnecessary dependencies, and untested paths. List problems by severity. [paste diff or link]
Illustrative example
You paste
Spec: a to-do app with sign-in, lists and due dates; done = all tests pass and it runs locally.
A good answer looks like
Plan: Next.js app, SQLite, 3 pages, 12 tests. Step 1 PR: project setup, list model, 4 passing tests, README with run instructions.
Illustrative example written for this guide, not output captured from a specific tool.
Safe practice
- Run agent-written code in a branch or sandbox first, never straight on production.
- Read the diff before you merge; ask the agent to explain any change you don't understand.
- Keep secrets (API keys, passwords) out of prompts and out of the repo; use environment variables.
- Add or keep automated tests so you can tell when the agent breaks something.
Which tool to pick, and why
- Cursor: IDE agent that runs terminal commands and opens PRs; Free has limited agent requests, Premium ($30/month) adds cloud agents and automations. Free plan can do this Visit official website ↗
- GitHub Copilot: Free plan has agent mode and the CLI; Pro ($10/month) adds the cloud agent that works on issues and opens pull requests. Free plan can do this Visit official website ↗
- Claude (incl. Claude Code): Claude Code (needs Pro at $20/month, or $17/month billed annually) works in the terminal and IDEs. Visit official website ↗
- ChatGPT (incl. Work & Codex): Codex coding agent (limited on Free, more on Plus at $20/month) handles cloud coding tasks and PR review. Free plan can do this Visit official website ↗
Reasons come from the capabilities, free-plan details and prices we've checked on official pages (separate from any dated trial above). Sources: cursor.com/pricing · github.com/features/copilot/plans · claude.com/pricing · chatgpt.com/pricing
Common mistakes
- Letting the agent work on your main branch.
- Merging without reading the diff.
- No tests, so nobody knows what broke.
- Pasting API keys into the prompt.
Privacy tip
Coding agents can read your project files. Keep secrets in environment variables, and check each tool's data and training settings.
Claude (incl. Claude Code) setting · ChatGPT (incl. Work & Codex) setting · Cursor setting · GitHub Copilot setting · Sources: privacy.claude.com/en/articles/12109829-how-do-i-change-my-model-improvement-privacy-settings · help.openai.com/en/articles/7730893-data-controls-in-chatgpt · cursor.com/help/security-and-privacy/privacy · github.com/features/copilot/plans