Claude Code
authorKRIATIZ
02 · Steering the agent / lesson 3 of 3

Giving the agent tasks

20 minIntermediate5 steps

The agent does what it understood. A good task has a goal, context, constraints and a way to verify. For big changes, plan first, code second.

data and requestsproblem
Lesson stepsstep 1 of 5
  1. Vague
  2. Context
  3. Verify
  4. Plan
  5. Loop
step 1 / 5problem

"Make a filter"

The agent doesn’t know where the filter goes, how it should work or when to stop. It guesses and redoes.

Key point

A vague task costs steps and limits.

← → steps · space pause · R restart · ⌘K search
You will learn 6
Lesson notes

Anatomy of a task

PartExample
Goal"Add a date filter for orders"
Context"The list is in @src/pages/Orders.vue, the API in @src/api/orders.ts"
Constraints"No new dependencies, use our DatePicker"
Verification"Add a test and run npm test"
Done when"The filter is kept in the URL and tests pass"

Plan mode

For multi-file tasks turn on plan mode (Shift+Tab). The agent explores the code and proposes a plan without changing anything. You edit the plan, and only then the agent writes code. Fixing a plan is cheaper than rewriting an implementation.

Plan first, no code changes:
how do we add multilingual support to catalogue pages?
Which files change, what are the risks?

File references and errors

  • @path/to/file adds a file to context right away.
  • Paste the full error text or stack trace, not "something doesn’t work".
  • You can paste a UI screenshot right into the terminal: the agent will see it.

Split big tasks

"Rebuild authentication" is five tasks: models, migrations, API, UI, tests. Give them one by one in a session, or with /clear between independent parts. Review git diff after each part.

When the agent goes the wrong way

  • Press Esc to stop it and clarify the task.
  • Say directly what’s wrong: "don’t change the DB schema, add a field to the DTO".
  • If the session is tangled, start over with /clear and a better task. Often faster than fixing.
"Ask me questions first if anything is unclear" helps on tasks with non-obvious requirements.

Task template

Goal: …
Context: @file1 @file2, currently it works like …
Constraints: …
Verify: run …, add a test for …
Done when: …

Today's task

Take a medium-sized backlog task. Ask for a plan in plan mode, edit it, then let the agent implement it with tests.

Want your team to get more out of the agent?

I run hands-on Claude Code workshops on your project’s real tasks.

Let’s talk
Vladyslav Koshelyev
Vladyslav Koshelyev

Developer at KRIATIZ. I build chatbots, websites and automation for businesses. Author of the course.

About the author · Telegram