html Claude Code – The Complete Guide · Apple Development Tutorials
Back to Overview
Claude Code

Claude Code – The Complete Guide

From First Steps to Expert Knowledge

Author: Christian Drapatz · Status: May 2026 · Claude Code v2.1+ · macOS · Linux · Windows

Claude Code

The Complete Guide – From First Steps to Expert Knowledge

Author: Christian Drapatz

Status: May 2026 · Claude Code v2.1+ · macOS · Linux · Windows

Disclaimer

The contents of this website are based on personal experience as well as publicly accessible sources such as documentation, training, videos and community contributions. All content has been independently compiled, summarized and formulated in our own words. There is no verbatim reproduction of protected content. The tutorials provided are free of charge and serve solely for knowledge transfer. Despite careful creation, no warranty can be assumed for completeness or timeliness. All mentioned brands, products and technologies are the property of their respective owners.

1 Introduction – What is Claude Code?

Claude Code is Anthropic's terminal-based AI agent for software development. The decisive difference from a chat assistant: Claude Code works directly in the project. It reads the codebase, executes commands, writes and edits files – all from the terminal.

Three characteristics make Claude Code special:

  • Context: On startup, it automatically loads CLAUDE.md – a briefing file with project context, conventions and rules.
  • Extensibility: Reusable workflows can be saved as Skills and called via slash command. External services like GitHub, databases or browsers integrate via MCP servers.
  • Autonomy: With Auto Mode and Worktrees, Claude Code can independently build, test and commit complete features.

This guide leads from the first start to a fully configured setup. The learning path in Chapter 21 shows how to proceed step by step without overcommitting.

2 Quick Start in 10 Minutes

Five steps to get started right away:

  1. Install: Open terminal and start the installer.
    curl -fsSL https://claude.ai/install.sh | bash
    Then reopen the terminal.
  2. Start: Change to the project directory and claude enter. On first launch, browser login occurs.
  3. Privacy: Immediately after login, under claude.ai → Settings → Privacy → Help Improve Claude set to Off .
  4. Initialize: /init enter – Claude analyzes the project and creates CLAUDE.md automatically.
  5. Get Started: Formulate task, Shift+Tab for Plan Mode, review plan, then have it implemented.

Note: You don't need to configure anything manually. Just ask Claude Code what you need – it creates the right configuration. CLAUDE.md ensures everything is loaded on the next start.

3 Prerequisites, Plans and Models

3.1 Pricing Plans at a Glance

A paid Anthropic account is mandatory – the free Claude.ai plan does not work. Authentication is available via Subscription login or API Key.

PlanPriceModel (Default)When Suitable
Proapprox. $20/monthSonnet 4.6Solo, occasional coding
Maxapprox. $100–200/monthOpus 4.7Solo, multiple hours daily; complex refactorings
Team Standardapprox. $25/seat (min. 5)Sonnet 4.6Teams; contractually no training on your data
Team Premiumapprox. $125/seatOpus-equivalentTeams with Max-like needs
EnterpriseCustom PricingCustomSSO, Audit-Logs, Zero-Data-Retention
API directlyPay-per-UseFreely selectableSensitive codebases; 7 days retention, no training

Rule of thumb: Start with Pro. If limits become noticeable after two weeks, switch to Max. For sensitive code, choose Team or API directly.

3.2 Models and Effort-Levels

ModelStrengthWhen to use
Opus 4.7Highest quality, slowerArchitecture, complex refactorings, security reviews
Sonnet 4.6Good quality/speed balanceDaily coding, building features
Haiku 4.5Fast and inexpensiveBrowsing, simple searches, routine checks

Model switching with /model opus, /model sonnet or /model haiku. Opus 4.7 supports Effort-Levels with /effort:

LevelTypical tasks
lowRename file, build command, simple searches
mediumWrite functions, small refactors
highMulti-file refactors, complex debugging
xhighDefault with Opus 4.7 – Architecture, design decisions
maxHardest debugging, security reviews, edge cases (current session only)

Tip: max automatically switches back after the session to xhigh – this protects against accidental token burning.

3.3 Usage Limits

Every plan has daily and weekly quotas. Check limits:

  • /status in the Terminal – shows plan, model status and remaining usage
  • claude.ai/settings/usage in the Browser – complete breakdown of all quotas
CategoryDescription
Current SessionConsumption of the current session across all models.
All ModelsWeekly total limit across Opus, Sonnet and Haiku combined.
Sonnet OnlySonnet usage counts simultaneously towards this limit as well as the weekly and 5-hour session limit.
Claude DesignIn research preview with its own weekly limit. Does not count towards other limits.
Additional UsageCan be enabled to continue using Claude after reaching a limit. Activates API mode for paid overage.

Note: When a limit is reached, Claude responds with an error message. The limit resets automatically daily, hourly, or weekly depending on the category.

4 Installation

There are two ways: the Terminal CLI and the Desktop App. Both share login and configuration.

Terminal Installation (recommended)

No more Node.js required – runs directly as a binary and updates automatically:

# macOS / Linux
curl -fsSL https://claude.ai/install.sh | bash

# Windows (PowerShell)
irm https://claude.ai/install.ps1 | iex

# macOS via Homebrew (manuelles Update)
brew install claude-code

After installation:

claude --version    # Version prüfen
claude doctor       # Diagnose
claude              # Starten und Browser-Login

Desktop App

Download at claude.com/download. The app provides parallel sessions in isolated Git worktrees as well as a tab for local and cloud sessions.

Updates

claude update           # Sofortiges Update
brew upgrade claude-code  # Bei Homebrew

5 Privacy and Security

These settings belong before your first real session.

5.1 Mandatory Setting Before First Session

Important: Immediately after login: claude.ai → Settings → Privacy → Help Improve Claude → Off

Without this setting, sessions have five years retention instead of 30 days and flow into model training. Applies to all Consumer plans (Pro and Max). Team and Enterprise plans have contractually shorter retention.

5.2 What Claude Transmits

Every file Claude reads is transmitted in full to Anthropic's servers – it does not automatically scan the project, but every explicitly read file is transmitted. Particularly sensitive:

  • .envFiles with API keys and passwords
  • Certificates (.p12, .mobileprovision) and SSH keys
  • Medical, legal, or otherwise protected data

Exclude files with .claudeignore

How .gitignore prevents .claudeignore automatic reading of certain files:

# .claudeignore
/Config/Secrets/
*.env
**/TestData/real_patients/**
/Resources/Credentials/

Attention: If Claude is explicitly instructed to read a .claudeignorefile, it will still be transferred. The file only protects against automatic access.

Behavior rules in CLAUDE.md

For regulated projects, a data protection block in the CLAUDE.md is recommended:

# Datenschutz
NIEMALS lesen:
- /TestData/ (Patientendaten)
- Dateien mit "patient", "versicherte" oder "KV-Nummer" im Namen
- /Config/Live/*.json (Produktionskonfiguration)

Use in regulated environments

Claude Code processes requests on US servers (AWS). For GDPR and SGB V relevant health data:

ApproachSuitabilityEffort
Transfer only code, never real dataPractically suitableLow
Use anonymized / fictitious test dataRecommendedMedium
.claudeignore + CLAUDE.md data protection blockMandatory in the projectLow
Conclude Anthropic Enterprise plan with DPALegally soundHigh
Local model (e.g. Ollama) as alternativeCompletely offlineHigh

Golden rule: Claude Code is a tool for code – not for data. Those who keep that separation clean can use Claude Code productively even in regulated environments.

5.3 How Claude Code protects you

  • Read-only by default: Prompts before every edit and every Bash command.
  • Write limit: Only start directory and subdirectories – therefore always start in the project root.
  • Command Blocklist: curl and wget are blocked by default.
  • Prompt Injection Protection: Web-Fetch content is handled so that injected instructions do not automatically lead to tool calls.

Important: Permissions protect against actions, not against data leakage. If Claude is allowed to read a file, its content goes to Anthropic. Therefore, explicitly block secrets files using a Deny rule.

6 First Steps and Daily Commands

6.1 Starting in the Project

cd mein-projekt
claude

On first start: select theme, browser login, claude doctor for verification. Then /init enter – this generates a CLAUDE.md with project context, build commands, and conventions. This file is automatically loaded in every subsequent session.

6.2 The Most Important Slash Commands

CommandFunction
/initAutomatically generates a CLAUDE.md for the project
/clearDeletes the current conversation – fresh start, saves tokens
/compactCompresses the context when the window is full
/usageDashboard: plan limits, daily costs, streaks
/statusDisplay plan, active model, and usage limits
/costQuick display of current session costs
/reviewCode review of recent changes
/modelModel switching, e.g. /model opus
/effortEffort level: low / medium / high / xhigh / max
/mcpManage MCP connections and check status
/memoryDisplay and edit loaded CLAUDE.md
/ultrareviewMulti-stage in-depth code review
/loopSelf-paced loops for repeated tasks
/permissionsRequest allowlist suggestion from previous tool calls

Session Management

claude -c            # Letzte Session fortsetzen
claude -r "name"     # Session per Name fortsetzen
@datei.swift         # Datei in den Kontext laden
@Sources/Views/      # Ordner in den Kontext laden

6.3 Modes

Shift+Tab switches between modes:

  • Normal: Asks before every action.
  • Auto-Accept: Actions without confirmation, unless blocked by Deny. For long sessions in a pushed branch.
  • Plan Mode: Read-only – Claude creates only a plan. Ideal for the Analyze-Plan-Build workflow.
  • Auto Mode (Max-Plan): Claude makes decisions completely independently. Not for production deploys.

7 CLAUDE.md – The Project Memory

CLAUDE.md is the most important file in the setup. It is automatically loaded on every session and gives Claude the context that he would otherwise have to guess anew each time.

7.1 What Belongs In It

Answer four questions, nothing more:

  • What is the project? (Stack, platform targets, language)
  • How is it built and tested? (Build and test commands, tooling)
  • What conventions apply? (Code style, folder structure, architecture rules)
  • What should Claude not do? (Prohibitions, taboo areas)

Does not belong: Tutorials, lengthy explanations, marketing, documentation texts. The file is a briefing card, not a wiki. Maximum 200 lines.

7.2 Where the File Is Located

Contents are merged, not overwritten:

  • ~/.claude/CLAUDE.md – global, applies to all projects
  • CLAUDE.md in the project root – applies only to this project (commit to repo!)
  • CLAUDE.local.md in the project root – personal, not in Git
  • Subfolder CLAUDE.md – is only loaded when working there

7.3 Example and Best Practices

Global CLAUDE.md (~/.claude/CLAUDE.md):

# Allgemein
Antworte auf Deutsch.
Halte dich kurz.
Bei größeren Änderungen erst einen Plan vorschlagen.

# Verbote
Niemals Inhalte aus .env oder secrets/ lesen.
Kein git push --force ohne explizite Bestätigung.

Project CLAUDE.md (Example Swift / SwiftUI):

# Projekt
SwiftUI-App, Targets: macOS, iPadOS, iPhone

# Build
xcodebuild -scheme AppName \
  -destination "platform=iOS Simulator,name=iPhone 16"

# Navigation
- iPhone: NavigationStack
- macOS/iPadOS: NavigationSplitView

# Verbote
Keine DispatchQueue – nur async/await.

Tip: Create the global file once. In the project /init run, shorten the generated file immediately to the essentials, commit to repo. In the first sessions, add what Claude obviously doesn't know.

8 The Nine Building Blocks at a Glance

Claude Code consists of nine building blocks that work together:

Building BlockWhen ActiveWhere DefinedFor What
CLAUDE.mdAlwaysProject rootContext, conventions, rules
PermissionsAlwayssettings.jsonAllow and deny
HooksOn eventssettings.jsonMechanics, automation
SkillsOn invocationskills/Reusable tasks
SubagentsOn invocationagents/Own context, brief answer
MCP-ServerOn invocationsettings.jsonExternal tools
SandboxOn activationsettings.jsonLimit scope
PluginsOn activationplugins/Bundle of multiple components
Loops/TasksPeriodicallysettings.jsonRoutine, observation

9 Directory structure and settings.json

All components follow the same logic: global in the home directory, project-specific in the project, local-personal in a file that is not committed to Git.

~/.claude/                       # Globale Konfiguration
├── CLAUDE.md                    # Globale Vorlieben
├── settings.json                # Globale Permissions, Hooks, MCP
├── skills/<name>/SKILL.md       # Globale Skills
└── agents/<name>/AGENT.md       # Globale Subagents

.claude/                         # Projektspezifisch (ins Git)
├── settings.json                # Projekt-Permissions, Hooks, MCP
├── skills/<name>/SKILL.md       # Projekt-Skills
└── agents/<name>/AGENT.md       # Projekt-Subagents

CLAUDE.local.md                  # Persönlich, nicht ins Git
.claude/settings.local.json      # Lokal, nicht ins Git

Structure of settings.json

{
  "permissions": {
    "allow": ["Read", "Edit", "Bash(git diff*)"],
    "deny":  ["Bash(rm -rf *)", "Read(.env*)"]
  },
  "hooks": { "PostToolUse": [...] },
  "mcpServers": { "github": {...} },
  "model": "claude-opus-4-7"
}

The three levels (global, project, local) are merged. Deny always wins.

Important: True JSON files must not contain comments and no trailing commas. .claude/settings.local.json and .claude/cache/ in the .gitignore include.

10 Permissions

Permissions control what Claude is allowed to do without asking and what is off-limits. A Deny rule is a wall.

10.1 The three levels

LevelBehavior
AllowMay be executed without asking
AskDefault for everything that is not explicitly allowed or forbidden – Claude asks
DenyNot allowed at all – absolute block

10.2 Formulating rules

Read                    # Lesezugriff allgemein
Edit                    # Datei-Edits allgemein
Read(.env*)             # Lesen von .env-Dateien
Bash(git status*)       # nur git status
Bash(git *)             # alle git-Befehle
Bash(xcodebuild *)      # alle xcodebuild-Calls

10.3 Recommended configuration

Global ~/.claude/settings.json – hard prohibitions:

{
  "permissions": {
    "deny": [
      "Bash(rm -rf *)",  "Bash(sudo *)",
      "Bash(curl *)",    "Bash(wget *)",
      "Read(.env*)",     "Read(**/secrets/**)",
      "Read(**/.ssh/**)", "Read(**/Credentials/**)"
    ]
  }
}

Project-specific .claude/settings.json – allow routine:

{
  "permissions": {
    "allow": [
      "Read", "Edit",
      "Bash(git status*)", "Bash(git diff*)",
      "Bash(git log*)",    "Bash(git add *)",
      "Bash(git commit *)", "Bash(xcodebuild *)",
      "Bash(swift test*)"
    ]
  }
}

Tip: /permissions allowlist suggests a sensible Allow list from the last tool calls. Simply work through two or three sessions and then run the command.

11 Hooks

Hooks are shell commands that Claude automatically executes at certain events. They are for mechanics, not for logic.

Lifecycle events

  • PostToolUse – after every tool call; classic for formatters and linters
  • PreToolUse – before every tool call; for additional checks
  • Stop – at session end; for desktop notifications

Important variables

$CLAUDE_FILE_PATH     # die bearbeitete Datei
$CLAUDE_TOOL_NAME     # welches Tool lief
$CLAUDE_PROJECT_DIR   # Projektroot

Example – SwiftFormat after every edit

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "if [[ \"$CLAUDE_FILE_PATH\" == *.swift ]]; then swiftformat \"$CLAUDE_FILE_PATH\"; fi"
          }
        ]
      }
    ]
  }
}

Example – desktop notification at session end

{
  "hooks": {
    "Stop": [
      {
        "hooks": [{
          "type": "command",
          "command": "osascript -e 'display notification \"Claude fertig\" with title \"Claude Code\"'"
        }]
      }
    ]
  }
}

Note: Hooks must be fast (under one second), idempotent, and fail silently. Start with a single hook – the formatter.

12 Skills

Skills are named, reusable instructions that are called up specifically. They save time on everything that repeats in daily work.

12.1 Structure of a skill

--- name: new-view
description: Legt eine neue SwiftUI-View nach unseren Konventionen an
---

Erstelle eine neue SwiftUI-View. Schritte:

1. Datei unter Sources/Views/<Feature>/<Name>View.swift anlegen
2. @Observable ViewModel einbinden
3. Preview-Provider ergänzen
4. In die Navigation eintragen

Call: /new-view ProfilEditor. Arguments land as $ARGUMENTS or $1, $2 in the Skill.

12.2 Recommended Community Skills

SkillFunctionInstallation
SuperpowersStructured workflow: plan first, test second, code last/plugin install superpowers@claude-plugins-official
Frontend DesignProfessional, modern UIs instead of generic AI look/plugin install frontend-design@claude-plugins-official
Skill CreatorCreates new Skills based on description/plugin install skill-creator@claude-plugins-official
Trail of BitsSecurity Audit (SQL Injection, XSS, …)/plugin marketplace add trailofbits/skills
Prompt MasterOptimizes prompts for 30+ AI toolsgit clone .../nidhinjs/prompt-master ~/.claude/skills/
Marketing Skills40 Marketing Experts: SEO, Ads, Copywriting, Growthnpx skills add coreyhaines31/marketingskills
CLAUDE.md OptimizerKeeps CLAUDE.md lean, outsources non-essentialsgit clone .../wrsmith108/claude-md-optimizer ~/.claude/skills/
Webapp TestingBrowser-based automated testing/plugin install webapp-testing@claude-plugins-official

Tip: First sense where you're repeating yourself. Skills that are theoretically invented usually miss the target.

13 Subagents

Subagents are Claude instances for clearly defined tasks. They run with their own context and return only a summary to the main session.

Skill vs. Subagent: A Skill works in the main chat and enlarges the context there. A Subagent works separately and delivers only the result. When a task consumes a lot of context but returns little – use a Subagent.

Structure – Example Code Reviewer

--- name: code-reviewer
description: Senior Code-Reviewer. Nach Code-Änderungen proaktiv aufrufen.
tools: Read, Grep, Glob, Bash(git diff*)
model: sonnet
---

Du bist Senior Code-Reviewer für ein Swift-Projekt.
Analysiere nur die geänderten Dateien.
Gib zurück: max. 5 kritische Punkte, sortiert nach Priorität.
Keine langen Erklärungen.

Three fields that matter

  • description – decides whether Claude calls the agent automatically.
  • tools – limits what the agent can do. Keep it tight.
  • model – Research/Reviews: sonnet; Architecture analysis: opus; simple searches: haiku.

14 MCP Servers

MCP Servers (Model Context Protocol) are external tools that Claude can call. This turns Claude into an agent that executes real actions: read GitHub Issues, execute database queries, control cloud services.

14.1 Basics and Setup

claude mcp add github -- npx -y @modelcontextprotocol/server-github
claude mcp add --transport http my-api https://meine-api.de/mcp
claude mcp list
/mcp                    # Status aller Server prüfen
MCP-ServerFunction
GitHubRead issues, prepare PRs, manage branches
SupabaseControl database queries, tables, RLS-Policies directly from Claude
Context7Load current library docs – no outdated model knowledge
Exa / PerplexityWeb search from Claude
PlaywrightBrowser automation, screenshots, E2E tests
Pipedream8,000+ apps in one MCP: Gmail, Slack, Stripe, Notion, …

14.2 The Senior Engineer Stack – 5 free MCPs

MCPFunctionPrerequisites
CodeRabbitSenior Engineer review for security, performance, maintainabilityGitHub Personal Access Token
Pipedream8,000+ apps in one MCPPipedream Account (free)
ExaSmart Search (1,000 requests/month free)Exa API Key
Sequential ThinkingStructured thinking – Anthropic's official reference serverNone
Memory MCPLong-term memory across projectsNone

Security: Anthropic audits no third-party MCP servers. Only use trusted sources. API keys never in committed files.

15 Plugins

Plugins are pre-made packages that bundle multiple components: Skills, Hooks, Subagents, Settings, sometimes MCP Servers.

Management

/plugins
claude plugin add <name>
claude plugin list
claude plugin remove <name>
/reload-plugins

Recommended Plugins

PluginFunctionInstallation
Context ModeRuns in the background, saves tokens (10.645 Stars)/plugin marketplace add mksglu/context-mode
claude-memPersistent memory across sessions (68.482 Stars)npx claude-mem install
Everything Claude CodeComprehensive power-user bundle (168.287 Stars)/plugin marketplace add affaan-m/everything-claude-code
Huashu DesignPrototypes and slides via natural languagenpx skills add alchaincyf/huashu-design

Important: Work without plugins for a while first – if you don't know the building blocks, you can't judge plugins.

16 Loops and scheduled tasks

Loops and tasks let Claude work at intervals or at fixed times.

Hook vs. Loop: A hook reacts to something that just happened. A loop runs on its own.

Use cases

  • Loops: Monitor build status, check CI builds every 3 minutes, test results
  • Scheduled tasks: Daily release notes, meeting preparation, maintenance tasks

In practice

/loop 5m check ob der staging-build fertig ist und melde dich
/loop 10m /security-review
/schedule "0 8 * * 1-5" /daily-standup-prep
/loop status
/loop stop

In settings.json

{
  "scheduled_tasks": [
    {
      "name": "daily-standup",
      "schedule": "0 8 * * 1-5",
      "command": "/daily-standup-prep",
      "notify": true
    }
  ]
}

Note: Define a clear end condition, realistic intervals (3–10 minutes). Never use loops for destructive actions.

17 Token optimization and cost control

17.1 Model selection and /clear

  • Model selection: Opus costs roughly 5x Sonnet per token. Use Opus strategically for architecture and refactoring, Sonnet for everyday work.
  • /clear: Every token in context costs again with each request. Long sessions without /clear become disproportionately expensive.
  • Subagents: Own context, brief response to main chat. Main context stays small.

17.2 claude-mem – Persistent memory

Claude Code forgets context after each session. claude-mem solves this problem: it summarizes every tool call, stores observations locally in SQLite, and loads them in the next session.

StepWhat happens
CaptureEvery tool call is automatically intercepted
CompressReduction from up to 10,000 to approx. 500 tokens (5–10× in daily use)
StoreLocal SQLite database
RetrieveClaude loads only the relevant context for the current task
npx claude-mem install
# Alternativ
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem

Security notice: The HTTP API on port 37777 has no authentication. Configure the firewall so that port 37777 is only accessible from localhost.

17.3 RTK – Token Compression

RTK (Rust Token Killer) is a CLI proxy that summarizes command output before it reaches Claude. Result: 60–90 % fewer tokens.

CommandTokens beforeTokens afterSavings
git status~800~50~94 %
git push~200~10~95 %
ls (large)~1,500~150~90 %
npm test~3,000~300~90 %
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | sh
rtk init -g        # Hooks für Claude Code aktivieren
rtk init --show    # Status prüfen
rtk gain           # Einsparungen anzeigen

18 Cloud Automations with Routines

Routines are fully autonomous cloud automations – without a local server.

PlanRoutine runs per day
Pro5
Max15
Team / Enterprise25

Set up routine

  1. claude.ai/code/routines open
  2. New routine → assign name
  3. Write prompt (as precisely as an assignment to an employee)
  4. Select GitHub Repository
  5. Choose Trigger: Schedule, API or GitHub Event
  6. Connect Connectors (Gmail, Slack, etc.)
  7. Run now for testing – only activate the schedule after that

Example – Daily Email Summary

Geh in meine E-Mails über den Gmail Connector.
Lies alle ungelesenen E-Mails seit gestern.
Fass jede E-Mail in einem Satz zusammen.
Sortiere nach: Dringend, Aktion nötig, Info.
Schick mir die Zusammenfassung als Slack-Nachricht.

Example – PR Review on every Pull Request

Ein neuer Pull Request wurde geöffnet.
Prüfe den Code auf Sicherheitsprobleme, Performance-Probleme,
Code-Stil und Lesbarkeit.
Schreib ein Review als Kommentar auf den PR.

Important: Routines run completely autonomously. All actions happen under your own name. Store API keys in the environment variables of the cloud environment.

19 Advanced Workflows

19.1 Parallel Work with Worktrees

claude --worktree mein-feature   # Worktree starten
claude -w                        # Schneller Worktree-Start

The desktop app offers a Code tab with worktree checkbox – most convenient for 3–5 parallel sessions.

Killer combination: On the Max plan: Opus 4.7 + /effort max + Auto Mode + 1M Context = start a complete project and return after hours to an independently revised, tested, and committed result.

19.2 The Verification Loop

The single most important tip from Boris Cherny (Claude Code founder):

"If Claude has that feedback loop, it will 2–3x the quality of the output."
Wir bauen jetzt zusammen Feature X.
Bevor du eine einzige Zeile Code schreibst, definiere zuerst,
wie du selbst prüfst, ob das fertige Feature funktioniert:

1. Welcher Test, Befehl oder Browser-Check beweist, dass es geht?
2. Was ist dein Plan?
3. Erst nach Zustimmung umsetzen.

19.3 Sandbox for autonomous work

/sandbox
# Oder in settings.json:
{
  "sandbox": {
    "enabled": true,
    "filesystem": {
      "writable": ["$CLAUDE_PROJECT_DIR/Sources", "$CLAUDE_PROJECT_DIR/Tests"],
      "readable": ["$CLAUDE_PROJECT_DIR"]
    },
    "network": { "enabled": false }
  }
}

Tip: Sandbox + Auto-Accept: Claude works fast, but technically cannot break out of the defined area.

19.4 Plan Mode first

For complex tasks: Shift+Tab → plan. Claude creates a plan that you review. Only switch to implementation mode once the plan is convincing.

20 Claude in other tools

20.1 Claude for Word

Anthropic has integrated Claude directly into Microsoft Word. Changes appear as suggestions with change tracking.

Prerequisites

  • Claude Team or Enterprise (Pro on waitlist)
  • Microsoft 365 (not Word 2016/2019)
  • File format .docx

Installation

  1. marketplace.microsoft.com – Search for Claude by Anthropic for Word
  2. Install, open Word, activate add-in (Mac: Tools → Add-ins)
  3. Log in with Claude account

Key features

  • Edit texts with change tracking (formatting preserved)
  • Check document for inconsistencies (cross-references, numbering, terms)
  • Questions with clickable source citations
  • Fill templates with preserved formatting
  • Cross-App: Word + Excel + PowerPoint in one conversation

Tip: "Shorten this paragraph and remove passive constructions." / "What is the liability cap and does it apply both ways?"

20.2 OpenAI Codex as second model

The Codex plugin integrates the OpenAI Codex CLI directly into Claude Code. This enables code reviews by a second, independent model – without leaving the Claude session.

Note: This is not about OpenAI's old Codex model (discontinued 2023), but about the OpenAI Codex CLI – a terminal-based coding agent by OpenAI (April 2025, Open Source).

AI models recognize their own mistakes worse than others' – a second model brings a fresh perspective.

What it actually is

The OpenAI Codex CLI is a standalone command-line tool by OpenAI that works similar to Claude Code: it reads code, analyzes it, and provides feedback. All reviews are read-only – Codex does not modify any files.

Which account do I need?

CriterionChatGPT AccountOpenAI API Key
CostFree possible (with limits)Pay-per-use, very affordable
Setup effortLow (browser login)Medium (obtain API key)
LimitsDaily limited (Free)Limited only by credit balance
Recommended whenYou already use ChatGPTYou frequently do reviews
Cost per reviewFree / incl. in Plusapprox. 0.001–0.01 USD

Setup step by step

# Schritt 1 – Voraussetzungen prüfen
node --version    # muss 18.18 oder neuer sein

# Schritt 2 – Codex CLI installieren
npm install -g @openai/codex

# Schritt 3 – Authentifizieren
# Option A: ChatGPT-Account
codex login
# Option B: API Key
export OPENAI_API_KEY="sk-..."

# Schritt 4 – Plugin installieren
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins

# Schritt 5 – Installation prüfen
/codex:setup

Available Commands

CommandWhat it doesWhen to use
/codex:reviewNeutral review of recent changesAfter each feature as standard check
/codex:adversarial-reviewCritical review – searches specifically for errors, security vulnerabilitiesBefore a merge or release
/codex:rescueHand off task completely to CodexFor minor subtasks that Claude isn't currently solving
/codex:statusShows running background jobsWhen a long review is still running
/codex:resultRetrieves results of completed jobsAfter /codex:status
/codex:cancelCancels running jobsWhen a review is no longer needed

When is it worth it?

The plugin is useful when:

  • You already have a ChatGPT or OpenAI account (no extra effort)
  • You write code that is used in production (security, correctness important)
  • You want an independent check before a release
  • You /codex:adversarial-review want to integrate as the final check step before a merge

The plugin is less useful when:

  • You don't have an OpenAI account and don't want to create one
  • You mainly write experimental or throwaway code
  • The Claude-internal reviews with /ultrareview are already sufficient

Recommended workflow: Opus writes the code, then /codex:adversarial-review as a second opinion. Codex tokens cost approximately 1/4 of Opus – reviews are essentially free.

Learning path: From beginner to expert

Whoever sets everything up at once builds configuration they later won't understand:

  1. Step 1 – First real feature: Look for a manageable feature from your own project. Turn on Plan Mode, review the plan, then Auto-Accept to build, at the end /review.
  2. Step 2 – Sharpen CLAUDE.md: Notice patterns after two or three sessions. These insights belong in here: step by step, concise, precise.
  3. Step 3 – Clean up permissions: Create global deny rules once. Let project-specific allow lists grow from daily usage.
  4. Step 4 – Hooks for mechanics: Start with the formatter. SwiftFormat (or Prettier, Black) after every edit.
  5. Step 5 – Skills for repetitions: What's needed three times a month becomes a skill. Create it only when the need is felt.
  6. Step 6 – Subagents for complex tasks: If sessions get too long, outsource reviews and research to subagents.
  7. Step 7 – Use MCP strategically: Start with GitHub, read-only operations first.
  8. Step 8 – Advanced setup: Worktrees, Sandbox, Routines, RTK, and claude-mem for maximum efficiency.

22 What Claude Code is not

  • Not a substitute for your own understanding. Whoever doesn't understand the code Claude produces builds up technical debt.
  • Not a partner for strictly confidential work on consumer plans. On Pro and Max, every file read goes to Anthropic. Sensitive data belongs in Team, Enterprise, or API setup.
  • Not a real-time tool. Answers take their time, especially with Opus. For live pair programming, Claude is too slow.
  • Not a solution for very large monorepos. With repos in the multi-million-line range, Claude bogs down. Selective loading with @-mentions becomes mandatory.
  • Not a substitute for clean tests and CI. Claude can write tests – the pipeline must run them.

23 Troubleshooting

ProblemSolution
claude: command not found after installationClose the terminal completely and reopen it. If not fixed: check whether ~/.local/bin is in the PATH.
Browser login failsCommon causes: no paid plan, different account in browser, expired session. Solution: claude logout, then claude restart.
claude doctor reports an errorThe tool shows itself what's missing. Most common cases: incomplete PATH, missing login, outdated version. claude update execute.
Permission prompts are annoyingPermissions in .claude/settings.json maintain. /permissions allowlist suggests a ready-made allowlist.
Plugin doesn't work after installation/reload-plugins execute or restart Claude Code.
MCP server is displayed as unavailable/mcp checks the status. Set API keys as environment variables. Check Node.js version (18+ recommended).
Codex Plugin: /codex:setup failsCheck Node.js version 18.18+. Install Codex CLI: npm install -g @openai/codex. Then codex login run and /reload-plugins.
Routine fails on API key accessStore API keys in the Cloud Environment's environment variables. Explicitly specify in the prompt: "Use the API key from the environment variables."
Migration to new machine~/.claude/ back up without cache/. Do not take auth tokens along – log in again after the switch.

24 Glossary

TermExplanation
Auto-AcceptMode in which Claude acts without asking, unless blocked by Deny. Activate via Shift+Tab.
Auto ModeExtended autonomous mode (Max-Plan). Claude makes all decisions independently.
CLAUDE.mdMarkdown file that is automatically loaded at each session. Contains project context, build commands, conventions, and prohibitions.
Codex CLIOpen-source coding agent from OpenAI (released April 2025). Used via the Codex Plugin in Claude Code for independent code reviews.
Effort-LevelControls how long Opus 4.7 thinks about a problem. From low to max.
HookShell command that is automatically executed on a lifecycle event (PostToolUse, PreToolUse, Stop).
LoopLoop via /loopthat executes a command at intervals.
MCP-ServerExternal service (Model Context Protocol) that provides Claude with new tools.
PermissionsAllow/Deny rules in settings.json that specify what Claude is allowed or not allowed to do.
Plan ModeRead-only mode in which Claude only analyzes and plans. Via Shift+Tab.
PluginPre-configured bundle of multiple components (Skills, Hooks, Subagents, Settings).
RoutineCloud automation that runs completely autonomously without a local server.
RTKRust Token Killer – CLI proxy that summarizes command outputs (60–90% fewer tokens).
SandboxTechnically isolated area with file system and network isolation.
ScheduleScheduled task per /schedule with Cron syntax.
SkillReusable custom command in skills/<name>/SKILL.md, per /name callable.
SubagentSpecialized agent with its own context that returns only a summary.
WorktreeIsolated Git checkout for parallel work in multiple Claude instances.

Complete guide as PDF

Download all 24 chapters as a printable document.

Download PDF

Back to Overview