dadiaomengmeimei

Claude Code Sourcemap Learning Notebook — AI skill for Claude Code

AI community

Reverse-engineering Claude Code's 512K+ lines of TypeScript — architecture, design decisions, and 11 transferable patterns for building AI Agents.

How to install Claude Code Sourcemap Learning Notebook

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

What Claude Code Sourcemap Learning Notebook does

Reverse-engineering Claude Code's 512K+ lines of TypeScript — architecture, design decisions, and 11 transferable patterns for building AI Agents.

Alternatives in AI

  • Context Engineering Agent Skills — Context engineering patterns for agent skills 13.9k ★
  • Auto Re Agent — Open-source AI reverse-engineering agent using Ghidra and LLMs to reconstruct and validate C/C++ functions fro 1.4k ★
  • Engineering Notebook — A Bun CLI that ingests Claude Code and Codex session transcripts, generates LLM-powered daily summaries, and s 320 ★

README

Claude Code Sourcemap Learning Notebook

[![GitHub](https://img.shields.io/badge/GitHub-dadiaomengmeimei-blue?logo=github)](https://github.com/dadiaomengmeimei/claude-code-sourcemap-learning-notebook) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

🌐 [中文版 / Chinese Version](README_CN.md)

**Reverse-engineering Claude Code's 512K+ lines of TypeScript — extracting the architecture, design decisions, and 11 transferable patterns that make a production AI Agent work.**

Not just a code walkthrough. An architectural analysis that explains *why* each design choice was made, with alternatives compared.

What You'll Learn

  • 🔄 Query Loop — Streaming tool execution, read-write lock concurrency, 3-layer AbortController cascade
  • 🛠️ Tool System — buildTool() factory + Zod schema as prompt, 40+ tools with 18+ feature flags
  • 🔒 5-Layer Security — Permission rules → mode → tool checks → path safety → macOS Seatbelt sandbox
  • 🤖 Multi-Agent — Coordinator orchestration, default isolation with explicit sharing, cache-friendly forking
  • 🔌 MCP & Skills — 3-layer skill architecture, bundled skill lazy extraction, /simplify 3-agent parallel review
  • 🧠 Prompt Engineering — 7 categories with 40+ prompt files, static/dynamic separation for cache optimization
  • 🎙️ Voice & Buddy — Record-first-connect-later latency elimination, deterministic generation

Chapters

# Topic Core Source Files Time
00 Index & Architecture Overview — 10min
01 Global Architecture main.tsx, App.tsx, QueryEngine.ts 30min
02 Tool System Tool.ts, tools.ts, GlobTool.ts 45min
03 Permission & Security permissions.ts, filesystem.ts 45min
04 Query Loop & API ⭐ query.ts, `StreamingToo