Learn Claude Code banner
kodytang666 kodytang666

Learn Claude Code

Development community

Description

This article is a disassembly and research paper on the Agent project based on Claude Code source code. All content comes from direct analysis of the source code.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude Code Internals: A Source Code Deep Dive

A deep-dive course into Claude Code's internals, built from direct source code analysis.

![封面](https://d3qyja3w7macx2.cloudfront.net/eyJidWNrZXQiOiJ1bXUuY29tIiwia2V5IjoicGljd2Vpa2UvdGVhY2hlci93ZWlrZS9FVmM5ZTQvMTc3NjQ5NTU4My42MzYuNTcyMzYuMjAwMjcyODUxLnBuZyIsImVkaXRzIjp7InJlc2l6ZSI6eyJmaXQiOiJjb3ZlciIsIndpZHRoIjo4MDB9LCJyb3RhdGUiOjB9fQ==)

Languages / 语言

Language Directory
中文 zh-cn/
English en-us/

Social

douyin ID: 286435703

juejin column: https://juejin.cn/column/7629597189515247667

Usage / 使用方法

Clone Claude Code source code, then clone this repo into the project root — so you can jump to source locations while reading the articles.

# 1. Clone Claude Code source code
git clone claude-code codebase
cd claude-code

# 2. Clone this repo into the project root
git clone https://github.com/kodytang666/learn-claude-code.git

After this setup, file references in the articles (e.g. `src/query.ts`) can be opened directly in your IDE.

Course Overview / 文章概览

This course targets two audiences:

  • Beginners: New to Agent systems, want to understand how a production-grade Agent works end to end
  • Advanced readers: Already building Agents, want to study Claude Code's specific design choices around prompt cache, task isolation, context compaction, and more

All content is derived from reading the actual Claude Code source code — no guesswork.

Table of Contents

Chapter File Topic
0 00-overview Course overview & Agent workflow
1 01-agent-loop Agent Loop: the core query engine
2 02-system-prompt-construction System Prompt: construction & priority
3 03-tool-system Tool System: calls, permissions & deferred disclosure
4 [04-todo-task-system](04-todo-t