Vibe Coding
Back to Claude Code

Claude Code / core concepts

How Claude Code works

Claude Code turns natural language tasks into code base operations: reading, planning, editing, running commands, interpreting results.

How Claude Code works key concepts infographic
How Claude Code works key concepts infographic

proxy loop

The core of Claude Code is a cycle: receive the goal, observe the code base, select the tool, read the results, and then decide the next step. It will continue to act in this loop instead of just answering once.

1

observe

Read files, search for symbols, check configurations, understand error output.

2

plan

Break the goal into steps and determine which files need to be modified and which commands need to be run.

3

action

Edit files, run shells, invoke MCP, use browser or IDE capabilities.

4

feedback

Continue iteration based on tests, builds, diffs, and bugs until acceptance is met or blocking is encountered.

Tools are not decoration

File reading, editing, Bash, MCP, Hooks, browsers and IDEs all fall into the context and permissions model. Claude's capabilities come from a combination of these tools and model reasoning.

Therefore, giving Claude a runnable project environment is more reliable than pasting a bunch of code in the chat. It can see real dependencies, command output, test failures and project rules.

Boundaries come from configuration

The most overlooked part of how this works is the boundaries: permission modes, settings files, CLAUDE.md, Hooks, MCP servers, and organization hosting settings all work together to influence Claude's behavior.

  • Having Claude first explain what is going to be done reduces the risk of making mistakes.
  • Use permission mode to control whether to automatically edit and run commands.
  • Mechanize team constraints with Hooks and rules.

Complete usage points

Supplement the core concepts, operation sequences, permission boundaries and verification requirements that are easily compressed and missed in official documents, making it easier for English readers to learn completely by page.

Working principle supplement

The execution of Claude Code is not a one-time answer, but a continuous agent loop. It observes projects based on your goals, selects tools, reads results, adjusts plans, and requests permissions when needed. Tool results and conversation history go together into the context window.

  • Observation: read files, search, view Git status, analyze error output.
  • Plan: Break the goal into steps and explain which files will be modified and how to verify it.
  • Action: Edit file, run command, call MCP, use browser or IDE integration.
  • Feedback: Continue fixes based on test and build output.
  • Delivery: Summarize changes, evidence, risks and next steps.

After understanding this set of cycles, you will know why it is necessary to provide a runnable environment, why it is necessary to retain permission approval, and why long tasks need to manage context.

Study Checklist

Put the content on this page into real tasks and use the five dimensions of entry, context, permissions, verification and team rules to check whether you have truly mastered it.

Study Checklist

After reading this page, do not just remember the concept name. You should be able to place "How Claude Code works" back into a real Claude Code engineering workflow: where the task starts, what context the system loads, which actions need approval, how the result is verified, and how to roll back when it fails.

If this is a concept page, be specific about how it affects the real task: does it change context, permissions, execution paths, validation methods, or changes the team collaboration process.

  • Be able to describe in your own words the specific problem this page solves, rather than just reciting the title.
  • Able to write a minimal example task with goals, scope, prohibitions, and acceptance criteria.
  • Be able to determine which information should be put into the current prompt and which should be captured as project rules or configurations.
  • Be able to explain which long-term rules should go into CLAUDE.md, and which runtime behavior should be handled by settings, permissions, Hooks, Skills and MCP.
  • Ability to check diffs, command output, test results, screenshots or PR notes after a task is completed instead of just trusting the natural language summary.

If this page is used for team training, ask learners to complete a small task with Claude Code: read and explain first, submit a plan, make the smallest useful change, and close with real verification commands plus human diff review.