1 option
The Claude Code Operating Model : Build Scalable AI Coding Systems with Skills, MCP, Hooks, Agent Orchestration, and SDK Patterns.
- Format:
- Book
- Author/Creator:
- Huang, Jia.
- Language:
- English
- Subjects (All):
- Artificial intelligence--Industrial applications.
- Artificial intelligence.
- Coding theory.
- Computer programming.
- Physical Description:
- 1 online resource (348 pages)
- Edition:
- 1st ed.
- Place of Publication:
- Birmingham : Packt Publishing, Limited, 2026.
- Summary:
- Master Claude Code as an agentic coding and engineering platform for building governed AI workflows, autonomous agents, developer tooling, and enterprise-ready automation through practical patterns and deployment strategies Key Features Deploy AI-assisted development workflows securely across teams and production pipelines Understand Claude.
- Contents:
- Cover
- The Claude Code Operating Model
- Build scalable AI coding systems with Skills, MCP, Hooks, agent orchestration, and SDK patterns
- Contributors
- About the author
- About the reviewers
- Table of Contents
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Free benefits with your book
- How to unlock
- Share your thoughts
- 1
- Claude Code as an Agent Framework: a Technical Architecture Overview
- From Command-Line assistant to agent framework
- Four-Layer architecture model
- Memory layer: the CLAUDE.md system
- Extension layer: the four major extension components
- Integration layer: connecting to the outside world
- Programming layer: agent SDK
- Underlying perspective: harness and the agentic loop
- Component relationships and collaboration
- Comparison of trigger mechanisms
- Data flow: the journey of a request
- Plugins: packaging and distribution of combinations
- Technical selection guide
- Summary
- Reflection questions
- 2
- Learning From the Past: Engineering Practice of the Memory System
- Why AI needs "Memory
- The Five-Layer memory architecture
- CLAUDE.md writing paradigms
- First question: WHY (why do this?)
- Second question: WHAT (what to do, what not to do)
- Third question: HOW (how to do it step by step)
- Conditional Rule System
- In practice: three typical project configurations
- React frontend project configuration
- Node.js backend project configuration
- Python data project configuration
- 3
- Teaching a Man to Fish: Engineering Reusable Skills
- From CLAUDE.md to Skills: Two Dimensions of Knowledge
- Dissecting a Skill: Skeleton and Texture.
- Directory Structure
- YAML Frontmatter: The "ID Card" of a Skill
- Progressive Disclosure: The Return on Investment of Knowledge
- The Library Model
- The Budget Mechanism of description
- Trigger Mechanism: How Claude Code Decides Which Skill to Invoke
- Dual-Channel Activation Mechanism
- Description: The Soul of Skills
- Preventing Over-Triggering and Under-Triggering
- Reference Skills vs. Task Skills: Two Skill Philosophies
- SKILL.md Main Content: Router, Not Repository
- Router Mindset
- Contractual Reference
- The 500-Line Rule
- allowed-tools: Knowledge-Constrained Behavior
- Permission Design Templates
- Fine-Grained Bash Control Syntax
- Parameter Passing and Dynamic Injection
- ARGUMENTS and Positional Parameters
- Dynamic Context Injection
- Scope and Priority
- In Practice: Building 3 Skills from Scratch
- Task-oriented Skill: Intelligent Commit
- Composite Skill: Financial Analysis (Progressive Disclosure Full Case)
- Four Skill Design Patterns
- Skills from a Software Engineering Perspective
- Separation of Concerns
- Dependency Inversion
- Cache Optimization and Lazy Loading
- Principle of Least Privilege
- Open standards
- Reflection Questions
- 4
- Divide and Conquer: The Art of Sub-Agents and Task Delegation
- The Context Window Dilemma
- The Essence of Subagents
- Defining and Configuring Subagents
- Sub-agent Modes
- Read-Only: The Safe Observer
- Execution: High-Noise Task Processor
- Parallel: Multi-Expert Workflow
- Pipeline Mode: Serial Processing Chain
- Collaboration between Sub-agents and Skills
- Token Economics
- Subagents from a Software Engineering Perspective
- Single Responsibility Principle
- Bulkhead Pattern
- MapReduce Pattern
- Chain of Responsibility Pattern
- Practical Considerations
- Discussion Questions
- 5.
- From Guidelines to Guardrails: Automating Control with Hooks
- The Role of Hooks in the Claude Extension System
- Event Lifecycle: More Than Two Dozen Events
- Session-Level Events
- SessionStart
- SessionEnd
- PreCompact
- Tool Invocation Events
- PreToolUse (the most powerful event in the entire Hooks system)
- PostToolUse
- PostToolUseFailure
- PermissionRequest
- UserPromptSubmit
- Subagent Events
- SubagentStart
- SubagentStop
- Completion Events
- Stop
- Notification
- Newer Event Types
- TeammateIdle and TaskCompleted
- ConfigChange
- WorktreeCreate and WorktreeRemove
- Can It Be Blocked?": The Most Critical Dimension
- Configuration System: 6 Locations, 6 Purposes
- Three Types of Processors: A Deterministic Ladder
- Command Type: Deterministic Rules
- Prompt Type: Single Large Model Evaluation
- Agent Type: Multi-turn Intelligent Verification
- hookSpecificOutput: Protocol for Communicating with Claude
- Engineering Practice 1: Security Protection System
- PreToolUse: Dangerous Command Interception
- PreToolUse: Sensitive File Protection
- PostToolUse: Comprehensive Operation Auditing
- Complete Configuration
- Engineering Practice II: Automated Code Quality
- PostToolUse: Automatic Formatting
- PostToolUse: Lint Feedback Loop
- Stop Hook: Test Quality Gate
- Subagent Hooks: Precise Context Management
- Global vs. Frontmatter: The Precision Issue
- SubagentStart: Automatic Context Injection
- SubagentStop: Verifying Output Quality
- Asynchronous Hooks: Background execution without blocking
- Environment Variables and Debugging
- Environment Variables Available to Hooks
- The Three Debugging Techniques
- Common Pitfalls
- Engineering Design Methodology
- Discussion questions
- 6
- Connecting Everything: Integrating External Tools with MCP.
- From N×M to N+M: The Power of Standardization
- Architecture: Client-Server and JSON-RPC
- Transmission Methods: Three Forms of Connection
- Configuration Details: From CLI to Configuration File
- Quick CLI Configuration
- .mcp.json Configuration File
- Configuration File Location and Scope
- Practical Example 1: Connecting to a Database
- Practical Example 2: Building a Custom MCP Server
- Common MCP Server Ecosystem
- Official Servers
- Popular Third-Party Servers
- Practical Configuration Combinations
- Security Mechanisms: The Boundaries of Trust
- Three-Layered Defense Mechanism
- Security Risks and Countermeasures
- MCP+Skills: Kitchen and Recipe
- Enterprise Deployment
- Debugging and Troubleshooting
- Common Debugging Methods
- Token Management for MCP Tool Output
- Common Issues
- 7
- Headless Mode and CI/CD Integration
- From Interactive to Unattended: A Key Architectural Evolution
- Core Parameter System: Control Across Four Dimensions
- Output Format Control
- text format
- json format
- stream-json format
- Cost Guardrails
- Security Boundaries: Tool Permissions
- Execution Control: Model, Prompt, Structured Output
- Model Selection
- System Prompt Customization
- Structured Output
- Unix Pipelines: Integrating Claude into Command Line Workflows
- Practical Example 1: Automated Code Review with GitHub Actions
- Using the Official Action
- Direct CLI Invocation
- Practical Example 2: Multi-Stage CI Pipeline
- Streaming Output: Real-Time Monitoring of Long-Running Tasks
- Session Management: Maintaining Context Across Steps
- CI Environment Configuration: Production-Grade Checklist
- Required Environment Variables
- Performance Tuning Parameters
- Complete Configuration Template for GitHub Actions
- MCP Server Configuration in CI.
- Cross-Platform CI/CD Integration
- GitLab CI/CD Configuration
- Jenkins Pipeline Integration Configuration
- Local Automation Scripts
- Security Best Practices: From RBAC to Container Isolation
- Secrets Management
- Container Isolation
- Cost Protection
- Audit Logs
- From CLI to Agent SDK: Programming Interfaces for Headless Mode
- Progressive Implementation Strategy
- 8
- Building with Claude as the Engine: Agent SDK Intelligent Agent Development Kit
- Positioning of the Agent SDK: From Tool to Component
- Core API: The query Function
- Python Version
- TypeScript Version
- Message Types: Interpreting Claude's Output Stream
- system/init-Session Initialization
- assistant-Claude's Response
- user-Tool Execution Results
- result-Task Completion
- ClaudeAgentOptions: Fine-Grained Behavior Control
- Detailed Explanation of Permission Modes
- Pattern Matching for Tool Permissions
- Session Management: Context Continuity Across Calls
- Session Continuity Based on session_id
- Conversation Forking
- Custom Tools: Extending the Capability Boundaries of Claude
- Defining Tools with the @tool Decorator
- Register and Enable Custom Tools in Agent Configuration
- Using Pydantic Models for Parameter Validation
- Hooks in the Agent SDK: Programmatic Interception
- PreToolUse: Pre-execution Interception
- PostToolUse: Execute Post-Processing
- Relationship Between Agent SDK Hooks and Shell Hooks
- Four Layers of Security Defense
- Structured Output: Enforcing JSON Schema
- In Practice: Building a Code Analysis Web Service
- Agent SDK and Headless CLI: How to Choose
- Questions for Reflection
- 9
- From Personal Craft to Shared Asset: The Plugin Ecosystem
- The Role of Plugins: Encapsulation and Distribution of Capabilities.
- Physical Structure of a Plugin.
- Notes:
- Description based on publisher supplied metadata and other sources.
- Other Format:
- Print version: Huang, Jia The Claude Code Operating Model
- ISBN:
- 9781808082702
- OCLC:
- 1611787743
- Publisher Number:
- CIPO000419513
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.