Skip to content

Repository files navigation

The Claude Code Operating Model, First Edition

This is the code repository for The Claude Code Operating Model, First Edition, published by Packt.

Build scalable AI coding systems with Skills, MCP, Hooks, agent orchestration, and SDK patterns

Jia Huang

Free PDF       Graphic Bundle       Amazon      

About the book

The Claude Code Operating Model, First Edition

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.

Key learnings

  • 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

Chapters

Unity Cookbook, Fifth Edition
  1. Claude Code as an Agent Framework: a Technical Architecture Overview
  2. Learning From the Past: Engineering Practice of the Memory System
  3. Teaching a Man to Fish: Engineering Reusable Skills
  4. Divide and Conquer: The Art of Sub-Agents and Task Delegation
  5. From Guidelines to Guardrails: Automating Control with Hooks
  6. Connecting Everything: Integrating External Tools with MCP
  7. Headless Mode and CI/CD Integration
  8. Building with Claude as the Engine: Agent SDK Intelligent Agent Development Kit
  9. From Personal Craft to Shared Asset: The Plugin Ecosystem
  10. From Individual to Team: Engineering Practices for Claude Code
  11. Afterword: The Way of the Blade

Requirements for this book

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.

Setup

# 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

Chapters

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

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 four layers

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

Get to know the author

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.

Other related books

License

MIT — see LICENSE.

About

The Claude Code Operating Model, published by Packt

Resources

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages