Create files with Claude
You describe, Claude builds
⏱ Est. ~7 min
01 · Read
So far you've used Claude Code to understand code. Now let's use it to build things from scratch.
This is where things get fun. Instead of writing every line of HTML, CSS, and JavaScript yourself, you describe what you want in natural language. Claude writes the code and creates the files, and you review the result.
Your role shifts from typist to director. You decide what to build, describe it clearly, and steer Claude toward the right outcome. The quality of Claude's output depends directly on how clearly you describe what you want.
💡 Picture thisIt's like working with a talented but very literal architect. Say "build me a house" and you'll get a house — but maybe not the one you imagined. Say "build me a two-story house with a wraparound porch, blue siding, and big kitchen windows" and you'll get something close to what you pictured.
02 · Prompt template
Let's make a web page. Ask Claude to build an HTML page with a navigation bar. Be specific about what should be in the nav bar.
Make me an HTML page with a navigation bar containing three links — Home, About, Contact — styled in a clean, modern look.
03 · Real-machine exercise
Open the file Claude created in a browser to see the result. You can open it from the terminal.
open index.html
04 · Prompt template
Now ask Claude to add something to what it built. This shows Claude's ability to understand context — it knows what files exist and edits them intelligently.
Add a dark mode color scheme to this page. Put it in a separate CSS file and link it from the HTML.
05 · Read
Look at what just happened. You described what you wanted in natural language — twice. Claude wrote code both times. Your job was to review it, test it in the browser, and iterate.
This is the modern dev flow with AI:
1. Describe what you want 2. Review what Claude built 3. Test (open it in a browser, run it, etc.) 4. Iterate by asking for changes
You're not just a passenger — you're the decision-maker. Claude is fast, but you're the one who knows whether the result is right and good enough.
Key points
- Claude creates real files in your project directory
- Always review and test Claude's output
- Claude remembers context — it knows what files already exist
- Iterate by asking for changes, not starting over
06 · Fill in the blank
After Claude creates files, you should always _____ them before committing.
07 · Quiz
What's the recommended workflow for building files with Claude Code?
- Copy from the web → paste → run
- Describe → review → test → iterate
- Write the code yourself → ask Claude to fix errors
- Let Claude build everything without reviewing
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.