Vibe coding with Claude Code course Β· Module 1: Claude Code and Cursor

Anatomy of a good request: goal, place, constraints, check

9 min read Β·
In this lesson12

Welcome back! The "Our Crew" section already stands on the page, and you know what Claude sees and what it does not know. Today we deal with the order itself: what parts make up a request that Claude carries out well the first time, and what to do when the conversation goes the wrong way.

The problem: fixing a guess takes longer than a good order

"Fix the page" is a riddle for Claude. It does not know what should change, in which file, what not to touch or when to stop, so it guesses. Sometimes it hits the mark, more often it does something its own way, and you spend three rounds on corrections. The Claude Code documentation points out one more thing: Claude reads a request cautiously and builds the smallest thing that satisfies it, because it cannot see how big an effect you expect. If you want more, you have to say so. Two minutes spent on the request save a quarter of an hour of corrections.

Four blocks of a good request

In lesson 0_1 you met three parts of a request: goal, place and constraints. Today a fourth joins them and closes the order:

BlockThe question it answersExample
Goalwhat should be created, and why?the crew cards should look like old parchment
Placein which file and in which part of it?@pirate.html, only the CSS rule of the cards
Constraintswhat not to touch and what not to use?no new files or libraries, the heading stays
Checkhow will we know it is done, and how should Claude prove it?show the changed rule and the output of ls

The captain's recipe: write the blocks in this order. The goal first, because everything else depends on it. Place and constraints next, because they narrow the road. The check last, because it says when the voyage is over. The check is exactly what beginners skip most often, and it is the most valuable: the documentation advises giving Claude something that can be run and that returns a clear result, and always asking for proof, that is, a command and its output. A report that says "done" without proof tells you little, as you learned in lesson 0_4.

Point to the place with the @ sign

Instead of writing "in the file with the pirate page", type @ and the file path in the request. After you type @, Claude Code suggests matching files, and Tab or Enter inserts the selected path. An example question with such a pointer:

Explain what the CSS rules in @pirate.html do

The @pirate.html notation adds the content of the file to the conversation, so Claude does not have to look for it or guess which file you mean. The file itself does not change because of it: it is only a pointer. You can point to several files in one request, and @ with a folder name adds the list of its files, without their content.

Give instead of describing

The same rule works more widely: if you have what Claude needs, give it instead of describing it in words. You have three ways:

  • a file: @ and the path, as above;
  • a screenshot: Claude does not see the browser, but it understands an image. Simplest is to save the screenshot in the project folder and give its path in the request, for example "Look at the screenshot cards.png: the cards overlap. Fix it in @pirate.html";
  • command output: the exclamation mark command from lesson 0_3, for example ! ls, adds the command and its output to the conversation, and Claude comments on it right away.

When you do not know what you want

Sometimes you only have a vague idea. Then do not invent a request by force, but ask Claude for an interview. Claude will ask you questions about things you have not thought through yet and write the answers into a specification, that is, a file that describes what should be built and how to tell it is done. For example:

I want to add a "Find the treasure" mini game to pirate.html, but I have
not thought it through yet. Interview me until you can write a
specification, and then save it in a file SPEC.md.

Claude will ask, often with ready answers to choose from: how many squares the board has, what happens after a hit, what the game certainly does not do. The interview itself builds nothing, and in Manual mode Claude will ask for permission only before saving SPEC.md. When the file exists, type /clear: this command starts a new conversation, and the old one stays available to resume. Start building in the fresh conversation with a request that contains @SPEC.md. A clean context and a written definition of "done" work better than a long conversation full of ideas you rejected along the way.

Small steps and a hand on the helm

Split a big task into steps and give them one at a time. Then watch how Claude works:

  • watch the first minute: that is when it is easiest to notice that Claude is sailing the wrong way;
  • Esc when it strays: it interrupts the work, keeps what is already done and waits for your guidance;
  • after two failed corrections, /clear: if you have corrected the same thing twice and it is still wrong, the third correction only adds to a conversation that already holds two failed attempts. It is better to start over with one request that collects everything you learned along the way.

What not to do any more

Old guides are full of tricks that do not help today. The official Claude Code best practices speak about them plainly:

Old adviceWhy not any more
CAPITAL LETTERS and the word IMPORTANTcurrent models follow a plain sentence, and too much emphasis makes Claude apply the rule too zealously
"think hard", "be thorough"this is plain text, not a switch; how deeply Claude thinks is steered by a separate effort setting that you will meet in later locations
"don't be lazy", "don't stop"such sentences more often cause overzealousness than help; instead, give Claude a check to pass

Captain's tip: write calmly and specifically, as to an experienced boatswain.

An answer style for learning

You are learning to read code, so it helps when Claude explains its decisions. The Explanatory output style does that, and you switch it on with a command in the session:

/output-style explanatory

From the next message Claude adds short Insight blocks to the conversation, explaining why it wrote the code one way and not another. The explanations go only into the conversation, not into your files as comments. The choice is saved in the project's local settings, so it also applies to later sessions in this folder. You return to the normal style with /output-style default. There is also a Learning style, in which Claude additionally leaves a few lines of code for you to write yourself; that is an option for later, because this course mainly trains commanding and reading.

Before and after: the "Our Crew" section

This is a request that leaves Claude too much to guess:

Make the crew section prettier.

Apart from the general topic, all the blocks are missing. "Prettier" may mean new colours, images, animations or a completely different layout, and Claude may create a new styles file or change the heading along the way. The same request built from four blocks looks like this:

Request for Claude Code:

Goal: the cards in the "Our Crew" section should look like old
parchment: a cream background, a brown border and rounded corners.
Place: @pirate.html, only the CSS rule .crew-card in the <style> tag.
Constraints: do not change the content of the cards or the "Ahoj Piraci!"
heading, do not create new files and do not add libraries.
Check: at the end show the changed rule and the output of the ls command,
so I can see that the folder still holds only pirate.html.

The labels "Goal:", "Place:" and the rest help at the beginning. Once the blocks become a habit, you will write the same thing in ordinary sentences.

What Claude wrote

Open pirate.html in Cursor and find the card rule in the <style> tag. Your colours may differ in shade, but the structure will be similar:

.crew-card {
  border: 3px solid #8b5a2b;
  border-radius: 12px;
  background-color: #f5e6c8;
  padding: 12px;
  margin: 12px 0;
}

The dot before crew-card marks a class: the rule applies to every element with class="crew-card", that is, all three cards. border sets the border: its thickness, line type and colour, here brown. border-radius rounds the corners, and background-color gives the cream background. The rule does not change the content of the cards or the h1 heading: it concerns only the look of elements with the crew-card class.

Captain's review

  1. One file: only pirate.html changed, and the ls output from Claude confirms it. Read that output yourself instead of trusting the summary.
  2. Constraints: the heading is still red, and the names and descriptions in the cards are as before.
  3. Check: Claude showed the rule and the command output. If it did not, ask for it.
  4. A typical mistake: the agent "while at it" fixes other places, for example the font of the whole page or the colour of the heading. In Manual mode you will notice it in the proposed change before you agree; answer No and refine the request.

Finally open the page in the browser: the cards should have a cream background and rounded corners.

Next step

The page is growing, so you have more and more to lose. In lesson 0_6 you will spread the safety net: you will learn the limits of /rewind and start keeping a logbook in Git.

Remember: a good order says where we sail, by which route, what to avoid and how we will know the port.

Code for this lesson: request.md
# A request before and after

## Before: Claude has to guess

Make the crew section prettier.

The goal is missing (what does "prettier" mean?), and so are the place
(which file and which rule?), the constraints (what not to touch?) and
the check (how do we know it is done?).

## After: four blocks in the order of the captain's recipe

Goal: the cards in the "Our Crew" section should look like old
parchment: a cream background, a brown border and rounded corners.
Place: @pirate.html, only the CSS rule .crew-card in the <style> tag.
Constraints: do not change the content of the cards or the "Ahoj Piraci!"
heading, do not create new files and do not add libraries.
Check: at the end show the changed rule and the output of the ls command,
so I can see that the folder still holds only pirate.html.

## Your turn

Below, write your own request made of four blocks, for example about a
page footer with the text "Black Pearl".

Goal:
Place:
Constraints:
Check:

Spotted a mistake in this lesson?

Check yourself

Answer the questions from this lesson. Pick an answer to see right away whether it is correct.

  1. 1. The request reads: "In @pirate.html add a footer with the text Black Pearl under the crew section. Do not change other sections and do not create new files." Which block is missing?

  2. 2. What does the @pirate.html notation do in a request for Claude Code?

  3. 3. Request A: "Make the crew section prettier." Request B: "The cards in the Our Crew section should look like parchment. Change only the .crew-card rule in @pirate.html, do not touch the content of the cards or the heading, do not create files. At the end show the rule and the output of ls." Which is better and why?

  4. 4. You have corrected Claude twice on the same matter and it is still wrong. What do you do?

  5. 5. What does the /output-style explanatory command change?

Hands-on tasks in the game

  • Vertical ordering

    You do not know what you want yet. Arrange the steps from the idea to the build:

  1. QuestionQuiz: The missing block of a request
  2. QuestionQuiz: The @ sign in a request
  3. Put in orderSorting: From an idea to a specification
  4. QuestionQuiz: Which request is better
  5. QuestionQuiz: The second failed correction
  6. QuestionQuiz: The Explanatory output style

Useful articles