Petr's AI School

02 - Meet Claude Code

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

What surprised you?

Homework 01 - set up Claude Code

  • What did you tell it to do?
  • What was the output?
AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Today

Let's discover what Claude Code has to offer.

  • starting claude code
  • command line
  • keyboard shortcuts
  • models
  • context
  • modes
  • referencing @files
  • tools
  • status line
AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Start in a folder

Windows: right-click ai-school, Open in Terminal, type claude

Mac: drag the folder onto Terminal, type claude

VS Code: File, Open Folder, then the Spark icon ✦

Desktop app: Code tab, Select folder

Same folder, different window.

Let's open your Downloads folder - there is going to be definitely something interesting.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

The screen

  • Top: which model, which folder. Whatever is in that folder, it can read.
  • The > line: where you type.
  • Bottom: which mode you are in. The work shows above the prompt as it happens.
AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Watch the tools

Type: what is in this folder?

⏺ Bash(ls)
  ⎿  budget.xlsx  notes.md  offer.pdf
⏺ Read(notes.md)
  ⎿  Read 42 lines
  • Every ⏺ line is a tool.
  • The model asked for it. The harness ran it. The result went back to the model.
  • Ctrl + O shows the whole transcript, every tool call.
AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

The loop

Diagram: Anthropic, Claude Code docs

Gather context, take action, check the result, repeat. You can press Esc at any point.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Model + harness + tools, seen live

Chat

Model only.
Cannot see your files.
Set of limited tools from Anthropic.

Work

Model + tools inside one folder you hand over.
Tools living partly in Anthropic Cloud.

Code

Model + every tool on your computer.
You set the mode.

Code is ultimate power over the tools. 💪

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Slash commands

Type / and a menu opens. Keep typing to filter it.

Type Does
/help lists everything
/clear new conversation
/resume pick an old one
/model change the model
/effort how hard it thinks
Type Does
/context how full the whiteboard is
/usage how much of your plan is left
/memory your instructions files
/statusline set up the status line
/exit leave

Type / and look. Then run /help.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Six keys

Key Does
Esc stop what it is doing
Esc Esc clear what you typed; on an empty line: rewind file changes
Shift + Tab switch permission mode
↑ your previous prompt
Tab accept a suggestion
? on an empty line: every shortcut

Nice to know: Ctrl + C clear or exit · Ctrl + L redraw · Shift + Enter new line · ! runs a terminal command · Ctrl + V paste an image (Windows: Alt + V) · Alt + P model · Ctrl + O transcript

Everything else is on the cheat sheet in the wiki.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Pointing at files

  • Type @ and the first letters of the name, then Tab
  • Drag a file from Explorer into the window
  • Paste a screenshot: Ctrl + V (Windows: Alt + V)
  • Folders work too: @ and a folder name points at the whole folder

Type: summarise @notes.md in three bullets

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Live demo: your status line

Type: /statusline show the model, the folder name and how full the context is in %. Like "Opus | C:/Users/Petr | 85%"

It set itself up by writing two files. You saw each step. Nothing appears? The wiki guide Set up a status line has the manual way.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Models and effort

Model: which brain

/model or Alt + P

  • Fable the expert, slow
  • Opus hard work
  • Sonnet everyday work
  • Haiku quick and cheap

Effort: how long it thinks

/effort low up to /effort max

  • the default: medium on Opus 5.5, high on the others
  • low for chores
  • max when it is hard and you can wait

Risky task? A stronger model, not a cheaper one.

Type /model, look, press Esc.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school
petr-ai-school
petr-ai-school

Context: the whiteboard

  • /context shows how full it is. Your status line shows the % all the time.
  • /clear hangs up a new whiteboard. The old one is saved.
  • /resume brings an old one back.
  • /compact summarises the whiteboard to make room. You should never need it.
  • From the terminal: claude -c continues the last one.

/context, then /clear, then /resume and pick the one you just left.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Permission modes: Shift + Tab

Mode Label at the bottom Runs without asking
Manual ⏸ manual mode on reading only
Accept edits ⏵⏵ accept edits on reading and file edits
Plan ⏸ plan mode on reading, then it writes a plan
Auto ⏵⏵ auto mode on everything a second model calls safe

You start in Auto on paid plans. The habit: Plan, then Auto.

Shift + Tab to Manual. Type rename notes.md to notes-old.md. Read the question. Press Esc to say no. Then Shift + Tab until Plan.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Your turn

In Plan mode, type:

Make a file called index.md that lists every file in this folder with one line about each. Do not change the other files.

  1. Read the plan. Argue with it if you want.
  2. Choose Yes, and use auto mode.
  3. Watch the ⏺ lines.
  4. Open index.md in Explorer. It is there.
  5. Press Esc Esc and pick the rewind. It is gone.
AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Nothing to fear

  • Esc stops it - don't be afraid to use it
  • Esc Esc undoes its file edits (not moves or deletes)
  • It works only in the folder you opened
  • /clear resets the whiteboard
  • A usage limit pauses you. Nothing breaks
  • Keep a copy of anything precious
AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Chat, Work, Code: which one?

  • Chat when there are no files. A question, a draft, a translation. Few tools.
  • Work when the task lives in one folder and you want a result quickly and want to go away from it.
  • Code when you want the full toolbox: many folders, programs, the web. And you watch each step. Reuse, build.

Same brain in all three. More tools, more it can do.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Homework

  1. Make the status line yours. Tell /statusline what you want, in your own words.
  2. One real task. Copy a messy folder of yours. Plan, read, then Auto: sort the files into subfolders, unsure ones into _review.
  3. Find one slash command we did not cover. Bring what it does.
  4. Bring an answer: which tool call surprised you?

Work on a copy. The original stays where it is. Esc Esc cannot undo moving files into folders.

AI School - #2 Meet Claude Code | CC BY-SA 4.0
petr-ai-school

Terms from today

Slash command · Session · Effort · File mention · Permission mode · Context window · Compaction · Tool · Agent loop · Harness · Model · Claude model family · Benchmark · Chat, Work and Code · Terminal · Project

Guides: Reading the Claude Code screen · Working safely

All of them are linked from the lecture page in the wiki.

AI School - #2 Meet Claude Code | CC BY-SA 4.0

Questions?

AI School - #2 Meet Claude Code | CC BY-SA 4.0

Fallback: if /statusline fails on a Windows laptop, open the wiki guide and show the two files. Do not debug on stage.