LevelUpWith

Explore / Claude Code Day to Day: From First Prompt to Safe Habits / Lesson 1

Lesson 1: Agent, Not Chatbot: What Claude Code Is

Learn what separates a coding agent that reads files and runs commands in your project from a chat assistant you copy and paste from, and what this independent course (not affiliated with or endorsed by Anthropic) will have you build on a small sample project.

Free to read, no account needed. Part of Claude Code Day to Day: From First Prompt to Safe Habits.

By the end of this level you'll be able to

  • Explain in plain language how a coding agent differs from a chat assistant, using a concrete bug-fix example
  • Decide which everyday tasks suit an agent and which are still quicker by hand or in chat
  • Set up the course sample project in a git repository and know that feature details must be checked against Anthropic's current pages

Before we start

This course is independent. It is not affiliated with, endorsed by or produced by Anthropic, and it reproduces none of Anthropic's course or documentation text. Its lessons are exercises you run on your own machine.

Claude Code changes often. Feature names, limits and plans in any course, this one included, can go stale within weeks. When a detail matters, check Anthropic's current documentation at code.claude.com/docs.

The one idea: who does the legwork?

A chat assistant is like a knowledgeable colleague on the phone. They only know what you read out to them, and you do everything they suggest yourself.

A coding agent is like that colleague sitting at your keyboard. It can open the files, run the tests and make the change itself, while you watch and approve.

Anthropic describes Claude Code as an agentic coding tool that reads your codebase, edits files and runs commands. Those three verbs are the whole difference:

  • Reads: it finds the relevant code itself, so you don't paste it in.
  • Edits: it changes the files on disk, so you don't copy code back.
  • Runs: it executes commands such as your tests and sees the output.

It runs in a terminal, in editors such as VS Code and JetBrains, in a desktop app and in a browser. We pick a surface later. The idea is the same on all of them.

A bug fix, both ways

The sample project you are about to create has a function that splits a restaurant bill. Splitting between zero people crashes it with a ZeroDivisionError.

With a chat assistant:

  1. You run the code and see the crash.
  2. You copy the error and paste it into the chat.
  3. The chat asks to see the function, so you find the file and paste that too.
  4. It suggests a fix, and you copy it back into your editor.
  5. You re-run the tests, and if something else breaks you start pasting again.

You are the courier. The assistant only sees what you remembered to paste.

With an agent, you type one request in the project folder:

split_total crashes when people is 0. Find out why, fix it,
add a test for that case and run the tests.

The agent then searches the project for split_total and reads tipcalc.py. It proposes an edit and a new test, runs the test suite, reads the result and reports back. If the test fails, it sees the failure itself and tries again.

Gotcha: "does it itself" does not mean "unsupervised". In its default mode Claude Code reads files freely but asks your approval before it modifies a file or runs most shell commands. You are still the reviewer. Later lessons cover those prompts properly.

The next lesson covers how that read, act and check cycle works. For now, remember that the agent gathers its own evidence and checks its own work.

When an agent is the right tool

An agent is not always faster. This is my rule of thumb:

Task Best fit Why
Fix a bug whose cause could be in several files Agent It can search, read and run tests
Explain how an unfamiliar project fits together Agent The answer is in files it can open
Rename a function used in 30 places, then run tests Agent Tedious, checkable work across many files
Fix a typo you are already looking at By hand Typing the request takes longer than the fix
"What is the difference between a list and a tuple?" Chat A general question that needs no project files
Brainstorm a name or draft an email Chat No files to read, nothing to run

The test I use: does the task need facts from my project, or need something to be run? If so, use an agent. If the answer does not depend on your files, chat is fine. If you can make the change in ten seconds, just make it.

The trade-off is that an agent can make many changes quickly, including wrong ones. That is why the sample project goes into git before an agent touches it.

Set up the sample project

You need git and Python 3. Check both:

git --version      # any recent version is fine
python --version   # on macOS/Linux you may need: python3 --version

Create the folder and a repository:

mkdir tipcalc
cd tipcalc
git init -b main   # -b names the first branch; without it git still defaults to master

Expect: Initialized empty Git repository in .../tipcalc/.git/

In your editor, create three files in that folder.

tipcalc.py:

def tip_amount(bill, percent):
    # 10 percent of 50.00 -> 5.0
    return round(bill * percent / 100, 2)


def split_total(bill, percent, people):
    # Deliberate bug, left for a later lesson: people=0 crashes
    total = bill + tip_amount(bill, percent)
    return round(total / people, 2)

test_tipcalc.py:

import unittest
from tipcalc import tip_amount, split_total


class TipCalcTests(unittest.TestCase):
    def test_tip_amount(self):
        self.assertEqual(tip_amount(50, 10), 5.0)

    def test_split_total(self):
        # 100 + 20 tip = 120, split 4 ways = 30 each
        self.assertEqual(split_total(100, 20, 4), 30.0)


if __name__ == '__main__':
    unittest.main()

.gitignore:

__pycache__/

Run the tests, then commit:

python -m unittest     # expect: Ran 2 tests ... OK
git add .
git commit -m "Initial sample project"
git status             # expect: nothing to commit, working tree clean

Gotcha: if the commit fails asking who you are, set your identity once with git config --global user.name "Your Name" and git config --global user.email "you@example.com", then commit again.

Best practice: a clean git status before you hand work to an agent means every change it makes shows up as a diff you can review or throw away.

Exercise

  1. Run python -c "from tipcalc import split_total; print(split_total(100, 20, 0))" and read the crash.
  2. Write down each step you would take to fix it with a chat assistant, and count the copy-and-paste trips.
  3. Write the single request you would give an agent instead. Keep it; you will use it later.

Key takeaways

  • A chat assistant advises and you do the work. A coding agent reads your files, edits them and runs commands in your project.
  • An agent can check its own work, for example by running the tests and reading the result.
  • Use an agent when the task needs project facts or something run. Use chat for general questions, and your own hands for trivial edits.
  • By default the agent asks before changing files or running most commands, so you remain the reviewer.
  • Commit to git first, so the agent's changes are visible and reversible.
  • This course is independent of Anthropic. Check feature details against Anthropic's current pages.

A 6-question knowledge check follows this lesson in the app, free and without an account.

More like this

  • Rolling Out Claude: An Admin's Plan from Pilot to Value

    Build a complete, defensible Claude rollout plan for your team or company, one decision at a time: structure and identity, access, governance, spend and visibi…

    Course · Claude · AI & Agents · Capable · 20 levels · 4 free · Professionally curated by levelupwith.com

  • Claude Code for Teams: Rules, Skills, Hooks, Plugins

    Build a complete, shareable Claude Code setup for your team, one working file per lesson: CLAUDE.md and path-scoped rules, skills, slash commands, subagents, h…

    Course · Claude · AI & Agents · Capable · 20 levels · 4 free · Professionally curated by levelupwith.com

  • Claude at Work: No-Code Skills for Knowledge Workers

    Learn to brief Claude clearly, check what it gives you, and set up Projects, Artifacts, Skills, memory, connectors and Research for real work in sales, marketi…

    Course · Claude · AI & Agents · Capable · 18 levels · 4 free · Professionally curated by levelupwith.com

  • Delegating Real Work to Claude: Tasks, Files and Apps

    Learn to hand Claude multi-step work on your real files, browser and Office apps, with clear briefs, firm limits and approval gates, then review the results so…

    Course · Claude · AI & Agents · Capable · 18 levels · 4 free · Professionally curated by levelupwith.com

  • Prompting Claude: Instructions, Context and Testing

    Write prompts that Claude follows reliably, manage what goes into its context window, and test and improve your prompts with evidence instead of guesswork. Eac…

    Course · Claude · AI & Agents · Capable · 20 levels · 4 free · Professionally curated by levelupwith.com

  • Finished Work with Claude Artifacts, No Code

    Brief, refine, brand, check, share and export finished designs, decks, documents, dashboards and motion pieces in Claude without writing code. Every level ends…

    Course · Claude · AI & Agents · Capable · 18 levels · 4 free · Professionally curated by levelupwith.com