← From Zero to Deployed Alle LektionenAll lessons Setup ModelleModels

Phase 2 · Bauen mit Agenten

12 · Claude Code einrichten

Du hast Claude Code installiert, bist eingeloggt und arbeitest im Projektordner.

Phase 2 · Building with agents

12 · Set up Claude Code

You have Claude Code installed, signed in, and working in the project folder.

Claude Code ist dein Haupt-Werkzeug in Phase 2: ein Agent, der echten Code in deinem Projekt schreibt und ändert. Alle Befehle stehen ausführlich auf der Setup-Seite.

Die Idee

Stell dir eine sehr fleißige Kollegin vor, die im selben Ordner arbeitet wie du. Du sagst, was du willst; sie schlägt Änderungen vor; du schaust drauf und sagst „ja, mach“. Genau so fühlt sich Claude Code an.

Wenn du das Instagram-Frontend baust, sagst du: „Füge unter jedem Foto einen Like-Button ein.“ Der Agent zeigt dir, welche Dateien er anfasst — du bestätigst, und erst dann passiert es.

So funktioniert es

Drei Schritte (Details im Setup):

  1. Installieren und mit claude --version prüfen.
  2. Einloggen: claude starten, im Browser anmelden.
  3. Im Projektordner arbeiten: in den Projektordner wechseln und dort claude starten — nur dann sieht der Agent genau die richtigen Dateien.
mkdir instagram-klon && cd instagram-klon
claude

Die Arbeitsweise ist immer gleich: vorschlagen → prüfen → erlauben. Du bleibst am Steuer.

flowchart LR
    A[Du: Anweisung] --> B[Claude Code: Vorschlag]
    B --> C{Du prüfst}
    C -->|erlauben| D[Änderung wird gemacht]
    C -->|ablehnen| A

So steuerst du es

Claude Code läuft im Terminal und darf Dateien lesen/schreiben und Befehle ausführen — jeweils erst nach deiner Bestätigung. Starte ihn immer im Projektordner, damit der Kontext (die Dateien) stimmt. Den Code selbst schaust du in VS Code oder Cursor an — Claude hat (noch) keine eigene volle IDE.

So sagst du es dem Agenten:

„Lege eine Datei hallo.txt mit dem Inhalt hi an.“ (erster, gefahrloser Test)

„Arbeite nur in diesem Projektordner und zeig mir jede Änderung, bevor du sie anwendest.“

„Erkläre kurz, was du vorhast, bevor du mehrere Dateien auf einmal änderst.“

Typische Fehler: den Agenten außerhalb des Projektordners starten (dann fehlt ihm der Kontext); Änderungen ungeprüft erlauben; oder ihn ohne Git arbeiten lassen (siehe Lektion 11).

Kurz-Check

  1. Warum startest du Claude Code im Projektordner?
  2. Wie lautet die Grundschleife der Zusammenarbeit?
  3. Womit schaust du dir den Code an?
Antworten anzeigen
  1. Damit der Agent genau die Projektdateien sieht und keinen fremden Kontext mischt.
  2. Vorschlagen → prüfen → erlauben.
  3. In einer IDE wie VS Code oder Cursor — Claude hat noch keine eigene.

Claude Code is your main tool in Phase 2: an agent that writes and changes real code in your project. All commands are on the setup page in detail.

The idea

Imagine a very diligent colleague working in the same folder as you. You say what you want; they propose changes; you look and say "yes, do it." That is exactly how Claude Code feels.

When you build the Instagram frontend, you say: "Add a like button under each photo." The agent shows which files it will touch — you confirm, and only then does it happen.

How it works

Three steps (details in setup):

  1. Install and check with claude --version.
  2. Sign in: run claude, log in via the browser.
  3. Work in the project folder: change into the project folder and run claude there — only then does the agent see exactly the right files.
mkdir instagram-clone && cd instagram-clone
claude

The way of working is always the same: propose → review → allow. You stay in control.

flowchart LR
    A[You: instruction] --> B[Claude Code: proposal]
    B --> C{You review}
    C -->|allow| D[Change is applied]
    C -->|reject| A

How you steer it

Claude Code runs in the terminal and may read/write files and run commands — each only after your confirmation. Always start it in the project folder so the context (the files) is right. You view the code itself in VS Code or Cursor — Claude has no full IDE of its own (yet).

How to tell the agent:

"Create a file hello.txt with the content hi." (a first, safe test)

"Work only in this project folder and show me every change before you apply it."

"Briefly explain what you intend before changing several files at once."

Common mistakes: starting the agent outside the project folder (then it lacks context); allowing changes unreviewed; or letting it work without Git (see lesson 11).

Quick check

  1. Why do you start Claude Code in the project folder?
  2. What is the basic loop of collaboration?
  3. What do you view the code with?
Show answers
  1. So the agent sees exactly the project files and mixes in no foreign context.
  2. Propose → review → allow.
  3. In an IDE like VS Code or Cursor — Claude has none of its own yet.