21-Day Challenge
Day02

Day 2 — The 4-part prompt formula that gets results every time

Vague prompts get vague results. Today you learn the exact formula that tells Claude Code precisely what to build — and use it to create your first real webpage.


Simple explanation

Welcome to Day 2. Yesterday you installed Claude Code and ran your first prompt. Today you learn how to talk to it properly. This is the most important lesson in the entire 21 days. Everything else builds on this. Why most prompts fail When non-developers first use Claude Code they write prompts like this: "Build me a website." Claude Code tries its best. It builds something generic. It asks clarifying questions. An hour later nothing is right and you do not know why. The problem is not Claude Code. The problem is the prompt had no real information in it. AI builds exactly what you describe. Not what you meant. Not what you imagined. What you actually said. The 4-part prompt formula Every prompt you write from today should have these four parts: Part 1 — Context: Tell Claude Code what already exists. "I am building a website for a free 5-day challenge. It currently has a homepage and an about page." Part 2 — The Ask: One specific thing only. Not two things. Not a list. "Add a new page called Contact." Part 3 — The Details: Exactly how it should work. "The contact page should have a heading that says Get in touch, a field for name, a field for email, a field for message, and a button that says Send message." Part 4 — The Constraint: What NOT to change. "Do not change anything on the homepage or about page. Match the existing fonts and colors exactly."


What to do

Open Claude Code. Create a new folder on your desktop called "my-first-site". Navigate to it in the terminal by typing: cd Desktop/my-first-site Then type claude to start a session. Use the 4-part formula to ask Claude Code to build you a simple homepage with a heading, a short paragraph, and a button. Review what it builds. Does it match what you asked for? If something is wrong — do not rephrase the same prompt. Add more detail to the part that was wrong. Vague still in? Add more specifics. Wrong part changed? Add a stronger constraint. Today's result: You have used the 4-part formula to build your first real webpage. Save this formula somewhere permanent. You will use it every single day for the rest of this challenge and beyond.


Copy-paste prompt

I am building a simple personal website. It currently has nothing — this is the first file. Build a homepage with: a navigation bar with the links Home, About, and Contact; a hero section with a heading that says "Welcome" and a short paragraph underneath; a button that says "Learn more". Do not add anything I have not asked for. Keep the design clean, minimal, and modern.


Course note

The 4-part formula — Context, Ask, Details, Constraint — is the foundation of every lesson in this course. Mastering it on Day 2 makes every day that follows faster and more reliable.

Key takeaway

Vague prompts get vague results. The 4-part formula — Context, Ask, Details, Constraint — gives Claude Code everything it needs to build exactly what you want.

Start here

Start the free 5-day challenge

Next step

Join the AI course waitlist

Resource

Get the free prompt pack

Was this helpful?