claude-harness

by luzhenqianVerified

Deconstructing Claude Code — interactive source code analysis, guided wc/helpe walkthroughs, and deep architectural exploration of Anthropic's AI coding agent.

103
Stars
49
Forks
MDX
Language
8/24/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/luzhenqian/claude-harness

Getting Started

Guides for using skills like claude-harness.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

English | 中文 | 日本語

Claude Harness

Deconstructing Claude Code — interactive source code analysis, guided walkthroughs, and deep architectural exploration.

Claude Harness is an open-source platform for exploring and understanding the internals of Claude Code, Anthropic's official AI coding agent. Through interactive code browsing, in-depth technical articles, and module-level analysis, it transforms 500K+ lines of TypeScript into an accessible learning experience.

Why This Project Exists

Claude Code is one of the most sophisticated AI agent harnesses ever built — a masterclass in tool design, context management, permission governance, and multi-agent coordination. But understanding its architecture from raw source alone is daunting.

Claude Harness makes that architecture legible. It provides:

  • Guided articles that walk through each subsystem with real code references
  • Interactive code browser with syntax highlighting and full-text search
  • Module visualizations that reveal the structural relationships in the codebase

Whether you're building your own AI agent, studying harness engineering patterns, or simply curious about how Claude Code works under the hood — this project is for you.

At a Glance

MetricValue
Source Files Analyzed1,902
Lines of Code514,587
Modules Mapped35
Technical Articles31+
LanguagesEnglish, 中文, 日本語

Key Features

Interactive Code Browser

Browse the full Claude Code source tree with a file explorer, syntax highlighting powered by Shiki, and instant client-side search via FlexSearch.

In-Depth Technical Articles

31 guided walkthroughs covering every major subsystem:

#Article
01The Big Picture: How a 512,000-Line AI CLI Is Built
02The Query Engine: The Complete Lifecycle of a Conversation
03The Tool System: How AI Safely Interacts with the Outside World
04The Streaming Tool Executor: How to Safely Let AI Operate Multiple Tools Simultaneously
05The Permission System: Walking the Tightrope Between Autonomy and Safety
06Context Management: When Even a Million Tokens Aren't Enough
07Startup Performance: How a Heavy CLI Achieves Fast Cold Starts
08Multi-Agent Orchestration: How the Coordinator Pattern Enables AI Collaboration
09Persistent Memory: How AI Remembers You Across Sessions
10Bridge System: Bidirectional Communication Architecture Between CLI and IDE
11MCP Protocol Integration: How AI Tools Connect to Everything
12Plugins and Skills: A Three-Layer Extensibility Architecture
13OAuth and Authentication: The Full Pipeline from Keychain to Token Refresh
14Terminal UI Framework: Building a CLI with React
15Keybindings and Vim Mode: Editor-Level Interaction in a CLI
16Screen System: Designing Fullscreen Interaction Modes
17State Management: React State Architecture Without Redux
18Telemetry and Observability: OpenTelemetry in a CLI Application
19Configuration System: Schema Validation, Migrations, and Multi-Source Merging
20Feature Flags and Conditional Compilation: The Art of Compile-Time Code Elimination
21The File Operations Trio: Design Philosophy of Read, Write, and Edit
22BashTool: Letting AI Safely Execute Shell Commands
23The Search System: The Glob + Grep + Full-Text Search Combination
24Web Tools: How AI Accesses the Internet
25LSP Integration: How Language Server Protocol Enhances AI Coding
26The Buddy System: A Virtual Pet Game Inside Your Codebase
27The Output Style System: Bringing Brand Identity to Terminal Output
28Remote Execution and Scheduled Triggers: The Headless AI Agent
29Session Management: Interruption, Resumption, and Sharing
30API Client: Deep Integration with the Anthropic API
31Error Handling and Self-Healing: How AI Recovers from Failures

Module Explorer

Visualize the 35 major modules with file counts, line counts, and descriptions:

utils          564 files   181K lines   Utility functions
components     389 files    82K lines   Ink UI components (~140)
services       130 files    54K lines   External service integrations
tools          184 files    51K lines   Agent tool implementations (~40)
commands       207 files    27K lines   Slash commands (~50)
hooks          104 files    19K lines   React hooks
ink             96 files    20K lines   Ink renderer wrapper
...and 28 more

Multi-Language Support

Full internationalization with English, Chinese (中文), and Japanese (日本語) — with locale-aware routing and automatic fallback.

Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router)
UIReact 19 + Tailwind CSS 4
Code HighlightingShiki
SearchFlexSearch
ArticlesMDX via next-mdx-remote
i18nnext-intl
AnimationsMotion
DiagramsMermaid
MonorepoTurbo
DeploymentVercel

Getting Started

Prerequisites

  • Node.js 22+ (see .node-version)
  • pnpm (or npm)

Installation

# Clone the repository
git clone https://github.com/anthropics/claude-harness.git
cd claude-harness

# Install dependencies
pnpm install

# Generate metadata (file tree, module stats, search index)
pnpm generate

# Start development server
pnpm dev

The app will be available at http://localhost:3000.

Build for Production

pnpm build

Project Structure

claude-harness/
├── content/
│   └── articles/
│       ├── en/                    # English articles
│       ├── zh/                    # Chinese articles (31 guides)
│       └── ja/                    # Japanese articles
│
├── packages/
│   ├── claude-code-source/        # (source no longer distributed — see its README)
│   ├── scripts/                   # Metadata generation pipeline
│   │   └── src/
│   │       ├── generate-file-tree.ts
│   │       ├── generate-module-stats.ts
│   │       ├── generate-search-index.ts
│   │       └── generate-source-summary.ts
│   │
│   └── web/                       # Next.js web application
│       └── src/
│           ├── app/[locale]/      # Locale-aware pages
│           │   ├── articles/      # Article list & detail
│           │   ├── code/          # Interactive code browser
│           │   └── modules/       # Module explorer
│           ├── components/        # Shared UI components
│           ├── lib/               # Utilities & data loading
│           └── i18n/              # Internationalization config
│
├── turbo.json                     # Turbo monorepo config
├── vercel.json                    # Vercel deployment config
└── package.json                   # Root workspace config

Data Generation Pipeline

The pnpm generate command runs four scripts that process Claude Code source (provided locally) into structured metadata:

  1. File Tree — Recursively scans the source directory into a hierarchical JSON tree (1,902 entries)
  2. Module Stats — Analyzes 35 top-level modules with file/line counts
  3. Source Summary — Aggregates totals across the entire codebase
  4. Search Index — Builds a full-text FlexSearch index for client-side search

These generated files power the web UI's code browser, module explorer, and search functionality.

Architecture

+---------------------------------------------------+
|                  Web Application                   |
|                                                    |
|  +----------+ +----------+ +--------+ +---------+  |
|  | Articles | |   Code   | | Module | | Search  |  |
|  |  (MDX)   | | Browser  | |Explorer| | (Flex)  |  |
|  +----+-----+ +----+-----+ +---+----+ +----+----+  |
|       |             |           |           |       |
|  +----v-------------v-----------v-----------v----+  |
|  |             Generated Metadata                |  |
|  |  file-tree.json module-stats.json search-idx  |  |
|  +------------------------+----------------------+  |
+---------------------------|-------------------------+
                            |
                  +---------v---------+
                  | Generation Scripts |
                  | (packages/scripts) |
                  +---------+---------+
                            |
                  +---------v---------+
                  | Claude Code Source |
                  |  (not distributed) |
                  +--------------------+

Contributing

Contributions are welcome! Here are some ways to help:

  • Add articles — Write new technical walkthroughs in content/articles/
  • Translate — Help expand English and Japanese article coverage
  • Improve UI — Enhance the code browser, module explorer, or search experience
  • Fix bugs — Check the Issues tab for open items

Writing Articles

Articles are MDX files in content/articles/{locale}/. Each file needs frontmatter:

---
title: "Your Article Title"
description: "Brief description"
order: 32
tags: ["tag1", "tag2"]
readTime: "15 min"
---

Your content here...

Related Projects

License

MIT

Frequently Asked Questions

What is claude-harness?

claude-harness is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by luzhenqian. Deconstructing Claude Code — interactive source code analysis, guided wc/helpe walkthroughs, and deep architectural exploration of Anthropic's AI coding agent. It has 103 GitHub stars.

Is claude-harness safe to use?

Yes. claude-harness passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-harness?

Clone the repository with "git clone https://github.com/luzhenqian/claude-harness" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-harness written in?

claude-harness is primarily written in MDX. It is open-source under luzhenqian on GitHub, so you can review or fork the full source.

Are there alternatives to claude-harness?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-harness against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details