DeepLearnClaudeCode CLAUDE.md

DeepLearnClaudeCode CLAUDE.md is an instructions file for Claude Code from lvfei198401/DeepLearnClaudeCode. It costs 819 tokens per session, scanned A, original, MIT.

Project instructions for studying a reconstructed copy of Claude Code’s source code. The repository contains files extracted from a published package for research, along with commands for extracting and counting the restored source.

In plain words
What is it for?
Use them when navigating the restored TypeScript source, extracting it again from source maps, or understanding Claude Code’s tools, commands, services, and dependencies.
Why use it?
They explain the repository’s purpose, layout, limitations, and working conventions so an agent can inspect it without treating it like a normal product codebase.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/lvfei198401/deeplearnclaudecode/claude-md
Clone the repo
git clone --depth 1 https://github.com/lvfei198401/DeepLearnClaudeCode

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for DeepLearnClaudeCode CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lvfei198401/deeplearnclaudecode/claude-md.svg)](https://agentmods.dev/instructions/lvfei198401/deeplearnclaudecode/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lvfei198401/deeplearnclaudecode/claude-md"><img src="https://agentmods.dev/badge/instructions/lvfei198401/deeplearnclaudecode/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 819 This file is loaded in full into every session.
When invoked 819 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00819 $0.00819
Opus 5 $0.00409 $0.00409
Sonnet 5 $0.00164 $0.00164
Haiku 4.5 $0.00082 $0.00082

Measured 5d ago against content hash eec64d7850e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

DeepLearnClaudeCode CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 64 lines

What it actually says

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

项目概述

本仓库是从 @anthropic-ai/claude-code npm 包(版本 2.1.88)的 source map (cli.js.map) 中还原的 TypeScript 源码,仅供研究学习用途。源码版权归 Anthropic 所有。

仓库结构

  • package/ — 原始 npm 发布包内容(cli.js 为打包后的单文件入口,cli.js.map 为 source map)
  • extract-sources.js — 从 source map 提取源码的 Node.js 脚本
  • restored-src/ — 还原出的源码(4756 个文件,含 1884 个 .ts/.tsx 文件)
    • restored-src/src/ — Claude Code 主应用源码
    • restored-src/node_modules/ — 还原出的依赖源码
  • 详细文件清单.mdrestored-src/src/ 的完整目录树(需要查找具体文件时参考此文件)

常用命令

# 重新提取源码(需要 source-map 包)
node extract-sources.js

# 统计代码行数
python count_lines.py

本仓库不包含构建/测试/lint 脚本,因为是从打包产物逆向还原而非原始开发仓库。

核心架构 (restored-src/src/)

入口main.tsx — CLI 启动入口,使用 Commander.js 解析命令行参数,通过 React (Ink) 渲染终端 UI。

工具系统 (tools/):每个工具一个目录,对应 Claude 可调用的能力(BashTool、FileEditTool、GrepTool、AgentTool、WebFetchTool 等 40+ 个)。工具接口定义在 Tool.ts

命令系统 (commands/):斜杠命令实现(/commit、/compact、/config、/help 等),注册在 commands.ts

服务层 (services/):

  • api/ — Anthropic API 通信、bootstrap 数据
  • mcp/ — MCP (Model Context Protocol) 服务器管理与工具调用
  • oauth/ — OAuth 认证流程
  • analytics/ — GrowthBook 特性开关、遥测
  • lsp/ — Language Server Protocol 集成
  • compact/ — 上下文压缩策略
  • policyLimits/ — 策略与速率限制

多 Agent 协调 (coordinator/):子 Agent 编排与协作模式。

状态管理

  • state/ — 全局状态定义
  • context/ + context.ts — React Context 提供系统/用户上下文
  • bootstrap/state.ts — 启动阶段状态初始化

其他关键模块

  • hooks/ — 用户自定义 hook 执行(响应工具调用等事件的 shell 命令)
  • skills/ — 技能系统(可扩展的预定义提示词模板)
  • plugins/ — 插件系统
  • query/ + QueryEngine.ts — 查询引擎
  • bridge/ — 桌面应用与 Web 端的通信桥接层
  • remote/ — 远程会话管理
  • utils/ — 大量工具函数(git 操作、模型选择、认证、环境检测、设置管理等)
  • vim/ — Vim 模式键绑定
  • voice/ — 语音交互支持
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 64 lines · 819 tokens per session scan A eec64d7850e7

Subscribe to this mod's changes

DeepLearnClaudeCode CLAUDE.md is an instructions file published in the GitHub repository lvfei198401/DeepLearnClaudeCode (2 stars, last pushed 5mo ago), licensed MIT. It adds 819 tokens to every session, about $0.0041 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens