How to build an app with Claude Code
Install Claude Code by following Anthropic’s instructions, then start it in your project folder. Write a short CLAUDE.md that states what the app is and how to run it, then paste a build prompt and ask for a plan before code. Approve edits and commands as it proposes them, have it run your tests after each step, and commit working steps to git.
What is Claude Code?
Claude Code is Anthropic’s agentic coding tool. You run it in a terminal inside a project folder, describe what you want, and it reads files, proposes edits, runs commands and reports back. It is also available as extensions for some code editors and as a desktop app, so the same workflow applies whether you prefer a terminal or an editor.
This page covers the parts of the workflow that are stable and specific to Claude Code. For the tool-agnostic version, including briefs, scope and what never to delegate, read how to build an app with an AI coding agent. Installation steps and the full command list change over time, so check Anthropic’s documentation for the current instructions rather than relying on any third-party page, including this one.
How do you install it and start a project?
- Install Claude Code by following the instructions in Anthropic’s documentation, and sign in when it asks.
- Make a project folder and put it under git with
git init. Version control is your undo button, and you will use it often. - Open a terminal in that folder and start Claude Code there, or open the folder in the editor extension or desktop app. The session works on the files in that folder.
- Describe the project in plain language, or paste a build prompt. The first message sets the direction for everything that follows.
If you already have a repository, start Claude Code at its root and ask it to read the project and summarize how it is structured before you request any change. Check the summary. If it misreads the structure, correct it now, because every later change builds on that reading.
What is CLAUDE.md and what should it contain?
CLAUDE.md is a file in your project that Claude Code reads for instructions about that project. It is where you write down what you would otherwise repeat in every session. Running /init asks Claude Code to inspect the project and generate a starting CLAUDE.md that you then edit.
Keep it short and concrete. A long file full of general advice does less than a short file of facts the tool cannot guess.
# [App name] ## What this is [Two sentences: who uses it and what it does.] ## How to run it - Install: [command] - Start the dev server: [command] - Run the tests: [command] ## Rules - Build only what the current task asks for. Do not add login, billing or analytics unless told to. - Never write secrets into source files. Read them from environment variables. - Run the tests before saying a task is done, and show me the result. - Ask before adding a new dependency. ## Out of scope for now [Your “later” list, so it is written down but not built.]
Update the file as decisions are made. When Claude Code does something you did not want, adding a one-line rule to CLAUDE.md fixes it for later sessions, which is cheaper than repeating yourself.
How do you use plan mode and approve changes?
Claude Code has a plan mode, in which it researches and proposes an approach without editing your files. Use it for the first message of any new feature: the output is a plan you read and correct, which is much cheaper than correcting finished code. If you are unsure how to switch modes in your version, ask Claude Code or check the documentation; the exact shortcut is the kind of detail that changes.
Outside plan mode, Claude Code asks permission before it edits files or runs commands, unless you have configured it to allow specific actions. Read these prompts instead of approving by reflex. A command that installs a package, deletes files or touches anything outside the project deserves a pause.
| It wants to… | Check first |
|---|---|
| Edit a file | Is this a file the task should touch? |
| Run your tests or the dev server | Usually safe; this is the verification you want |
| Install a package | Do you need it, and is the name spelled correctly? |
| Delete or move files | Is everything committed, so you can recover? |
| Run a command that uses the network or a deploy tool | Is it pointed at test data and the right project? |
What does the build loop look like?
Once the plan is approved, work through it one step at a time. A typical round with Claude Code goes like this:
- Ask for one step of the plan, named specifically: “Build step 2: the form that saves an entry.”
- Let it propose edits. Read each diff it shows before accepting.
- Ask it to run the tests or start the app, and read the real output.
- Open the app yourself and try the flow, including an empty input and a reload.
- If it works, ask it to commit with a clear message, or commit yourself. Then move to the next step.
Claude Code can make git commits when you ask it to, which keeps a clean history of small steps. Review the message and the files included. If a step goes wrong, you can return to the last commit instead of untangling a long session.
Paste errors in full rather than summarizing them. Say what you expected and what happened. When two attempts at the same fix have failed, stop and ask for an explanation of the cause before trying a third.
How do you get it to write and run tests?
Ask Claude Code to write tests for the acceptance checks in your prompt, and to run them. Then read the tests. The useful ones describe behavior a user would notice: “saved entries are still listed after a reload”. A test that only confirms a function exists does not protect you.
Put the test command in CLAUDE.md so you can say “run the tests” and it knows how. Treat a red test as information: ask what failed and why before asking for a fix. Watch for the tool weakening or deleting a test to make it pass, and say so if it does.
Slash commands are shortcuts typed inside a session, starting with /. /init creates a CLAUDE.md, as above. Type / in a session to see what your installed version offers, instead of trusting a list copied from a web page that may be out of date.
How do you start from an idea on this board?
Every idea page here has a generated build prompt with the idea’s whole description in it. One of its buttons is “Open in Claude Code”, which sends that prompt to Claude Code so you do not have to copy and paste. There is also a Copy prompt button if you would rather paste it yourself, and the same text works in Codex, Cursor or Lovable.
Use the prompt as a draft. Before running it, add what it cannot know: the stack you want, the acceptance checks you will perform, and the features you are leaving out. Ask Claude Code to list its assumptions and a plan first. If you do not have an idea yet, browse developer-tool ideas or look through the Claude Code project ideas list.
The prompt can be improved before you use it. The AI coding prompt builder helps you write a fuller first-build prompt, and how to write an app build prompt explains each part.
What should you not hand to Claude Code?
Claude Code can write payment, login and database code, but you carry the risk if it is wrong. Keep these under your own control:
- Secrets. Do not paste keys or passwords into the chat. Put them in environment variables or your host’s settings, and make sure they are never committed.
- Payments. Read every line of code that charges, refunds or grants access after payment. Test only in the payment provider’s test mode until you are certain.
- Permissions. Test who can read and change what with two separate accounts.
- Irreversible operations. Run data migrations and deletions against a copy first, with a backup in place.
- Permission settings. Be careful about broad “always allow” rules. Allow the narrow commands you trust, such as the test command, and review the rest.
Claude Code can be wrong in a confident tone. The remedy is the same as for any agent: verify by running, read the diff, and ship small.
Frequently asked questions
Do I need to know how to code to use Claude Code?
It helps, because you are responsible for judging the result. If you are new to coding, keep the project small, ask Claude Code to explain each change, run the app after every step and avoid payments or user accounts in your first build. Reading diffs gets easier with practice.
What is the difference between Claude Code and the Claude chat app?
Claude Code works inside your project: it reads your files, edits them and runs commands, with your permission. In a plain chat window you mostly copy text into files yourself. For building an app across many files, the agent working in the project is usually more practical.
What is a CLAUDE.md file?
It is a file in your project where you write instructions for Claude Code: what the app is, how to run and test it, and rules to follow. Claude Code reads it at the start of a session. You can generate a first version by running /init and then edit it.
Can Claude Code commit to git for me?
Yes, it can create git commits when you ask. Review the message and the files included before accepting. Small commits after each working step give you a way back if a later change breaks something, so it is a good habit to ask for one at the end of each step.
Where do I find a project to build with Claude Code?
Pick an idea someone posted and will not build. Its page has a generated prompt and an Open in Claude Code button that sends it over. The prompt only restates the description, so check that the problem is real, cut the scope and write your own acceptance tests before you build.
Created with AI assistance and edited for this site. Examples are illustrative and do not represent customer research. About the publisher.