This is the code repository for The Claude Code Operating Model, First Edition, published by Packt.
Jia Huang
Claude Code is evolving from a coding assistant into a programmable platform for building intelligent development workflows. As teams adopt AI-assisted development, the challenge is no longer just generating code but building reliable systems that can be extended, governed, and integrated into daily work. This book shows how to turn Claude Code into a structured development platform.
You will learn to add persistent project context, create reusable capabilities, coordinate agents, automate routine checks, and connect Claude Code with the tools behind modern delivery. Drawing on concrete engineering examples, the book covers scalable workflows for individual projects, teams, and enterprise environments. You will discover ways to improve consistency, enforce standards, manage risks, and keep control as AI becomes part of the development lifecycle.
Through hands-on examples, you will build extensible workflows, integrate external systems, automate governance, and support continuous delivery. The book also covers security, debugging, cost management, and adoption strategies that help teams move from experimentation to production use. By the end, you will be able to design and manage Claude Code-powered environments that improve productivity while supporting quality, reliability, and maintainability.
- Analyze Claude Code's layered architecture and execution model
- Coordinate specialized agents for complex app development tasks
- Design persistent project intelligence using memory systems
- Develop reusable capabilities through structured Skills
- Automate quality and governance with event-driven Hooks
- Integrate external databases and services using MCP standards
- Build programmable workflows with the Agent SDK
- Apply enterprise deployment patterns for secure, scalable AI adoption
- Claude Code as an Agent Framework: a Technical Architecture Overview
- Learning From the Past: Engineering Practice of the Memory System
- Teaching a Man to Fish: Engineering Reusable Skills
- Divide and Conquer: The Art of Sub-Agents and Task Delegation
- From Guidelines to Guardrails: Automating Control with Hooks
- Connecting Everything: Integrating External Tools with MCP
- Headless Mode and CI/CD Integration
- Building with Claude as the Engine: Agent SDK Intelligent Agent Development Kit
- From Personal Craft to Shared Asset: The Plugin Ecosystem
- From Individual to Team: Engineering Practices for Claude Code
- Afterword: The Way of the Blade
To follow the examples, you will need a working Claude Code installation and access to Claude (an Anthropic API key or an equivalent Claude subscription). A recent Node.js runtime is required, since Claude Code runs on Node; Python 3.10+ and Git are used throughout the examples. The book assumes comfort with the command line and a code editor. Everything else, Skills, sub-agents, Hooks, MCP servers, the Agent SDK, is introduced and set up as it is needed, so you can start from a plain installation and build up.
Keep the official Claude Code documentation open alongside the book. The mechanisms are stable, but exact flags, model names, and pricing evolve; when a specific detail has shifted since publication, the documentation is the source of truth.
# Prerequisites: Node.js 20+, Python 3.10+, Git
npm install -g @anthropic-ai/claude-code
claude --version
export ANTHROPIC_API_KEY=sk-ant-... # or sign in with a Claude subscription
git clone https://github.com/huangjia2019/claude-code-engingeering-EN.git
cd claude-code-engingeering-EN| Chapter | Directory | What you'll run |
|---|---|---|
| Chapter 1 | ch01-overview/ |
Setup check; the four-layer Harness map |
| Chapter 2 | ch02-memory/ |
CLAUDE.md before/after on a real project |
| Chapter 3 | ch03-skills/ |
Three Skills; progressive disclosure measured in tokens |
| Chapter 4 | ch04-subagents/ |
Serial bug-fix pipeline; parallel multi-lens review |
| Chapter 5 | ch05-hooks/ |
A hook that blocks rm -rf; a hook that auto-formats |
| Chapter 6 | ch06-mcp/ |
.mcp.json scopes; a custom MCP server |
| Chatrer 7 | ch07-headless-cicd/ |
GitHub Actions, GitLab CI, Jenkins |
| Chapter 8 | ch08-agent-sdk/ |
Custom tools, structured output, a FastAPI service |
| Chapter 9 | ch09-plugins/ |
An installable plugin; a private marketplace |
| Chapter 10 | ch10-team-practices/ |
Layered CLAUDE.md, permissions, cost, audit |
workshop/ holds the running order for the live Claude Code Engineering in Practice
workshop. It points into the chapter directories rather than duplicating them, so the labs and the
book never drift apart.
The book's organizing idea is that an agent is a Model plus a Harness, and the Harness has four layers. The chapters fill them in, in order:
| Layer | Question | Chapters |
|---|---|---|
| Context | What does the agent know? | 1–2 |
| Tools | What can it do? | 3, 4, 6 |
| Execution | Where does it run? | 7, 8, 9 |
| Governance | What is it allowed to do? | 5, 10 |
Jia Huang is an AI researcher at A*STAR, Singapore, and a technical author who writes about how AI agents are engineered. He is the author of Designing AI Agents and RAG from First Principles.
He proposed the dual-axis framework for agent design patterns, which classifies patterns by cognitive function and execution topology, and the Pattern Selection Card, a practical method for choosing patterns under real cost and latency constraints. His work focuses on the
engineering that surrounds the model rather than the model itself: context, tools, execution environments, and governance. He writes in both Chinese and English.
MIT — see LICENSE.