<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Extending on Claude Code Wiki</title><link>http://www.markalston.net/claude-code-wiki/extending/</link><description>Recent content in Extending on Claude Code Wiki</description><generator>Hugo</generator><language>en-us</language><atom:link href="http://www.markalston.net/claude-code-wiki/extending/index.xml" rel="self" type="application/rss+xml"/><item><title>Subagents, Skills, and MCP Servers: Architecture Deep Dive</title><link>http://www.markalston.net/claude-code-wiki/extending/extension-mechanisms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://www.markalston.net/claude-code-wiki/extending/extension-mechanisms/</guid><description>&lt;h1 id="subagents-skills-and-mcp-servers-architecture-deep-dive"&gt;Subagents, Skills, and MCP Servers: Architecture Deep Dive&lt;a class="anchor" href="#subagents-skills-and-mcp-servers-architecture-deep-dive"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="executive-summary"&gt;Executive Summary&lt;a class="anchor" href="#executive-summary"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Claude Code extends capabilities through three distinct mechanisms with different isolation models, memory characteristics, and context window implications:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Aspect&lt;/th&gt;
 &lt;th&gt;Subagents&lt;/th&gt;
 &lt;th&gt;Skills&lt;/th&gt;
 &lt;th&gt;MCP Servers&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Task delegation with reasoning&lt;/td&gt;
 &lt;td&gt;Knowledge/workflow injection&lt;/td&gt;
 &lt;td&gt;External tool/API access&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Reasoning&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Full AI (isolated instance)&lt;/td&gt;
 &lt;td&gt;Inherits main instance&lt;/td&gt;
 &lt;td&gt;None (deterministic)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Memory&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Session-based, resumable&lt;/td&gt;
 &lt;td&gt;Shared with main&lt;/td&gt;
 &lt;td&gt;Stateless per call&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Context&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Own isolated window&lt;/td&gt;
 &lt;td&gt;Injected into main&lt;/td&gt;
 &lt;td&gt;Minimal overhead&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Invocation&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Explicit (Task tool)&lt;/td&gt;
 &lt;td&gt;Auto-discovered&lt;/td&gt;
 &lt;td&gt;Explicit tool calls&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;State&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Fresh but resumable&lt;/td&gt;
 &lt;td&gt;Part of main conversation&lt;/td&gt;
 &lt;td&gt;Truly stateless&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="table-of-contents"&gt;Table of Contents&lt;a class="anchor" href="#table-of-contents"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#subagents-skills-and-mcp-servers-architecture-deep-dive"&gt;Subagents, Skills, and MCP Servers: Architecture Deep Dive&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#executive-summary"&gt;Executive Summary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#table-of-contents"&gt;Table of Contents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#subagents-task-tool"&gt;Subagents (Task Tool)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-they-are"&gt;What They Are&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-characteristics"&gt;Key Characteristics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-to-use-subagents"&gt;When to Use Subagents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-when-to-create-a-custom-subagent"&gt;Example: When to Create a Custom Subagent&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#example-1-domain-specific-code-reviewer"&gt;Example 1: Domain-Specific Code Reviewer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-2-legacy-system-migration-assistant"&gt;Example 2: Legacy System Migration Assistant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-3-incident-response-debugger"&gt;Example 3: Incident Response Debugger&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-not-to-create-a-subagent"&gt;When NOT to Create a Subagent&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#skills"&gt;Skills&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-they-are-1"&gt;What They Are&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#technical-structure"&gt;Technical Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-characteristics-1"&gt;Key Characteristics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#context-window-impact"&gt;Context Window Impact&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-to-use-skills"&gt;When to Use Skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-when-to-create-a-custom-skill"&gt;Example: When to Create a Custom Skill&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#example-1-api-design-guidelines"&gt;Example 1: API Design Guidelines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-2-database-migration-checklist"&gt;Example 2: Database Migration Checklist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-3-security-review-lens"&gt;Example 3: Security Review Lens&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-not-to-create-a-skill"&gt;When NOT to Create a Skill&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#skills-vs-claudemd"&gt;Skills vs CLAUDE.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#skills-vs-subagents"&gt;Skills vs Subagents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#pattern-lens-skill--reviewer-subagent"&gt;Pattern: Lens (Skill) + Reviewer (Subagent)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-pattern"&gt;The Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-code-review"&gt;Example: Code Review&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-to-use-which"&gt;When to Use Which&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#other-domains-that-fit-this-pattern"&gt;Other Domains That Fit This Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-servers"&gt;MCP Servers&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-they-are-2"&gt;What They Are&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-characteristics-2"&gt;Key Characteristics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#output-limits"&gt;Output Limits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-to-use-mcp-tools"&gt;When to Use MCP Tools&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#context-window-implications"&gt;Context Window Implications&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#main-instance"&gt;Main Instance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#subagent-context-distribution"&gt;Subagent Context Distribution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-context-impact"&gt;MCP Context Impact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#memory-system-architecture"&gt;Memory System Architecture&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#two-kinds-of-memory"&gt;Two Kinds of Memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#instruction-memory-hierarchy"&gt;Instruction Memory Hierarchy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#auto-memory"&gt;Auto Memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#memory-isolation-boundaries"&gt;Memory Isolation Boundaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-memory-stores"&gt;What Memory Stores&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#memory-impact-on-context"&gt;Memory Impact on Context&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#data-flow-comparison"&gt;Data Flow Comparison&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#subagent-flow"&gt;Subagent Flow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-tool-flow"&gt;MCP Tool Flow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#decision-matrix"&gt;Decision Matrix&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#quick-reference"&gt;Quick Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#best-practices"&gt;Best Practices&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#subagent-configuration"&gt;Subagent Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#skill-design"&gt;Skill Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-server-usage"&gt;MCP Server Usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#context-optimization"&gt;Context Optimization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-insight"&gt;Key Insight&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-three-extension-mechanisms"&gt;The Three Extension Mechanisms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#references"&gt;References&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="subagents-task-tool"&gt;Subagents (Task Tool)&lt;a class="anchor" href="#subagents-task-tool"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="what-they-are"&gt;What They Are&lt;a class="anchor" href="#what-they-are"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Subagents are specialized AI assistants spawned via the &lt;code&gt;Task&lt;/code&gt; tool. Each operates as an independent Claude instance with its own conversation context.&lt;/p&gt;</description></item><item><title>Building Custom Subagents &amp; Skills: Extending Claude Code</title><link>http://www.markalston.net/claude-code-wiki/extending/custom-extensions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://www.markalston.net/claude-code-wiki/extending/custom-extensions/</guid><description>&lt;h1 id="building-custom-subagents--skills-extending-claude-code"&gt;Building Custom Subagents &amp;amp; Skills: Extending Claude Code&lt;a class="anchor" href="#building-custom-subagents--skills-extending-claude-code"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="executive-summary"&gt;Executive Summary&lt;a class="anchor" href="#executive-summary"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Claude Code&amp;rsquo;s capabilities can be extended through custom subagents (autonomous task executors with isolated context), skills (injected instructions that guide behavior), and plugins (packages that bundle everything together). This article covers how to build each from scratch &amp;ndash; file structures, YAML configuration, tool permissions, model selection, and the architectural patterns that make extensions effective.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Extension&lt;/th&gt;
 &lt;th&gt;What It Is&lt;/th&gt;
 &lt;th&gt;File Location&lt;/th&gt;
 &lt;th&gt;When It Runs&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Subagent&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Isolated AI worker&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;.claude/agents/*.md&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;When Claude delegates a task&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Skill&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Injected instructions&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;.claude/skills/*/SKILL.md&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;Auto-discovered or &lt;code&gt;/invoked&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Plugin&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Packaged bundle of all three&lt;/td&gt;
 &lt;td&gt;Plugin marketplace or local&lt;/td&gt;
 &lt;td&gt;When plugin is enabled&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="table-of-contents"&gt;Table of Contents&lt;a class="anchor" href="#table-of-contents"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#building-custom-subagents--skills-extending-claude-code"&gt;Building Custom Subagents &amp;amp; Skills: Extending Claude Code&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#executive-summary"&gt;Executive Summary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#table-of-contents"&gt;Table of Contents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#subagents"&gt;Subagents&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-subagents-are"&gt;What Subagents Are&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#subagent-file-structure"&gt;Subagent File Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#subagent-yaml-reference"&gt;Subagent YAML Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#system-prompt-body"&gt;System Prompt Body&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#tool-permissions"&gt;Tool Permissions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#model-selection"&gt;Model Selection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#permission-modes"&gt;Permission Modes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#persistent-memory"&gt;Persistent Memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hooks-in-subagents"&gt;Hooks in Subagents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#preloading-skills"&gt;Preloading Skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#cli-defined-subagents"&gt;CLI-Defined Subagents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#foreground-vs-background"&gt;Foreground vs Background&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-code-reviewer"&gt;Example: Code Reviewer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-test-runner"&gt;Example: Test Runner&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#skills"&gt;Skills&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-skills-are"&gt;What Skills Are&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#skill-file-structure"&gt;Skill File Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#skill-yaml-reference"&gt;Skill YAML Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#invocation-control"&gt;Invocation Control&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#auto-discovery-and-token-cost"&gt;Auto-Discovery and Token Cost&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#string-substitutions"&gt;String Substitutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#dynamic-context-injection"&gt;Dynamic Context Injection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#running-skills-in-a-subagent"&gt;Running Skills in a Subagent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hooks-in-skills"&gt;Hooks in Skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-commit-skill"&gt;Example: Commit Skill&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-pr-review-skill"&gt;Example: PR Review Skill&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-lens--reviewer-pattern"&gt;The Lens + Reviewer Pattern&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#lens-reviewer-architecture"&gt;Lens Reviewer Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#when-to-use-which"&gt;When to Use Which&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#domains-that-fit"&gt;Domains That Fit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#example-security-domain"&gt;Example: Security Domain&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#plugins"&gt;Plugins&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-plugins-are"&gt;What Plugins Are&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#plugin-directory-structure"&gt;Plugin Directory Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-plugin-manifest"&gt;The Plugin Manifest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-servers-in-plugins"&gt;MCP Servers in Plugins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hooks-in-plugins"&gt;Hooks in Plugins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#plugin-namespacing"&gt;Plugin Namespacing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#testing-plugins-locally"&gt;Testing Plugins Locally&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#installation-and-management"&gt;Installation and Management&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#managing-extensions-with-claudeup"&gt;Managing Extensions with claudeup&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#claudeup-commands"&gt;claudeup Commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#directory-layout"&gt;Directory Layout&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#scope-and-priority"&gt;Scope and Priority&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#subagents-1"&gt;Subagents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#skills-1"&gt;Skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#permission-rules"&gt;Permission Rules&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#best-practices"&gt;Best Practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#anti-patterns"&gt;Anti-Patterns&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#references"&gt;References&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="subagents"&gt;Subagents&lt;a class="anchor" href="#subagents"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="what-subagents-are"&gt;What Subagents Are&lt;a class="anchor" href="#what-subagents-are"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A subagent is an isolated AI worker that Claude delegates tasks to. Each subagent gets its own context window, its own system prompt, and a defined set of tools. When Claude spawns a subagent, the main conversation&amp;rsquo;s context is protected &amp;ndash; the subagent does its work, returns a result, and that result is all that enters the main context.&lt;/p&gt;</description></item><item><title>Custom Hooks Cookbook: Practical Recipes for Automating Claude Code</title><link>http://www.markalston.net/claude-code-wiki/extending/hooks-cookbook/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://www.markalston.net/claude-code-wiki/extending/hooks-cookbook/</guid><description>&lt;h1 id="custom-hooks-cookbook-practical-recipes-for-automating-claude-code"&gt;Custom Hooks Cookbook: Practical Recipes for Automating Claude Code&lt;a class="anchor" href="#custom-hooks-cookbook-practical-recipes-for-automating-claude-code"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="executive-summary"&gt;Executive Summary&lt;a class="anchor" href="#executive-summary"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Hooks let you run code at specific points in Claude Code&amp;rsquo;s lifecycle &amp;ndash; before a tool runs, after a file is edited, when a session starts, when Claude finishes responding. This cookbook provides copy-paste-ready recipes for the most common use cases: auto-formatting, command safety, test gates, notifications, logging, and context injection. Each recipe includes the hook configuration, the script, and notes on gotchas.&lt;/p&gt;</description></item><item><title>Integration Patterns: Connecting Claude Code with External Tools and Services</title><link>http://www.markalston.net/claude-code-wiki/extending/integration-patterns/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://www.markalston.net/claude-code-wiki/extending/integration-patterns/</guid><description>&lt;h1 id="integration-patterns-connecting-claude-code-with-external-tools-and-services"&gt;Integration Patterns: Connecting Claude Code with External Tools and Services&lt;a class="anchor" href="#integration-patterns-connecting-claude-code-with-external-tools-and-services"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="executive-summary"&gt;Executive Summary&lt;a class="anchor" href="#executive-summary"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Claude Code connects to external systems through four integration mechanisms: MCP servers for tool access, hooks for workflow automation, headless mode for CLI scripting, and GitHub Actions for CI/CD. Each serves a different purpose and operates at a different layer. This article covers when to use each, how they work, and practical patterns for combining them.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Mechanism&lt;/th&gt;
 &lt;th&gt;Purpose&lt;/th&gt;
 &lt;th&gt;Direction&lt;/th&gt;
 &lt;th&gt;Runs When&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;MCP servers&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Connect external tools/data&lt;/td&gt;
 &lt;td&gt;Claude calls out&lt;/td&gt;
 &lt;td&gt;Claude decides to use it&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Hooks&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Automate around Claude&amp;rsquo;s work&lt;/td&gt;
 &lt;td&gt;System calls scripts&lt;/td&gt;
 &lt;td&gt;Lifecycle events fire&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Headless mode&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Script Claude from outside&lt;/td&gt;
 &lt;td&gt;External calls in&lt;/td&gt;
 &lt;td&gt;Your script invokes it&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;CI/CD automation&lt;/td&gt;
 &lt;td&gt;Events call Claude&lt;/td&gt;
 &lt;td&gt;GitHub events trigger it&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="table-of-contents"&gt;Table of Contents&lt;a class="anchor" href="#table-of-contents"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#integration-patterns-connecting-claude-code-with-external-tools-and-services"&gt;Integration Patterns: Connecting Claude Code with External Tools and Services&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#executive-summary"&gt;Executive Summary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#table-of-contents"&gt;Table of Contents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-integration-landscape"&gt;The Integration Landscape&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-servers-connecting-external-tools"&gt;MCP Servers: Connecting External Tools&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#transport-types"&gt;Transport Types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#configuration-scopes"&gt;Configuration Scopes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#authentication"&gt;Authentication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#practical-mcp-examples"&gt;Practical MCP Examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-tool-search"&gt;MCP Tool Search&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#mcp-resources"&gt;MCP Resources&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#hooks-automating-workflows"&gt;Hooks: Automating Workflows&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#hook-lifecycle"&gt;Hook Lifecycle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hook-types"&gt;Hook Types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#common-hook-patterns"&gt;Common Hook Patterns&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#async-hooks"&gt;Async Hooks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hook-configuration-locations"&gt;Hook Configuration Locations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#headless-mode-cli-automation"&gt;Headless Mode: CLI Automation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#basic-usage"&gt;Basic Usage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#output-formats"&gt;Output Formats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#system-prompt-customization"&gt;System Prompt Customization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#piping-and-composition"&gt;Piping and Composition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#automation-flags"&gt;Automation Flags&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#github-actions-cicd-integration"&gt;GitHub Actions: CI/CD Integration&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-official-action"&gt;The Official Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#setup"&gt;Setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#common-workflows"&gt;Common Workflows&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#cost-considerations"&gt;Cost Considerations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#claude-as-mcp-server"&gt;Claude as MCP Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#plugins-packaging-integrations"&gt;Plugins: Packaging Integrations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#integration-decision-framework"&gt;Integration Decision Framework&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#combining-integration-patterns"&gt;Combining Integration Patterns&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#mcp--hooks-auto-validated-external-access"&gt;MCP + Hooks: Auto-Validated External Access&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#headless--github-actions-automated-pr-reviews"&gt;Headless + GitHub Actions: Automated PR Reviews&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hooks--headless-self-correcting-ci-pipeline"&gt;Hooks + Headless: Self-Correcting CI Pipeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#project-scoped-mcp--claudemd-team-consistency"&gt;Project-Scoped MCP + CLAUDE.md: Team Consistency&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#best-practices"&gt;Best Practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#anti-patterns"&gt;Anti-Patterns&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#using-mcp-when-a-hook-would-suffice"&gt;Using MCP When a Hook Would Suffice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#headless-mode-without-turn-limits"&gt;Headless Mode Without Turn Limits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#blocking-hooks-that-should-be-async"&gt;Blocking Hooks That Should Be Async&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#hardcoding-credentials-in-project-config"&gt;Hardcoding Credentials in Project Config&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#over-broad-hook-matchers"&gt;Over-Broad Hook Matchers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#references"&gt;References&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-integration-landscape"&gt;The Integration Landscape&lt;a class="anchor" href="#the-integration-landscape"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Claude Code integrates with external systems through four distinct mechanisms. Each operates at a different layer and serves a different purpose:&lt;/p&gt;</description></item><item><title>Agent Teams: Multi-Agent Orchestration in Claude Code</title><link>http://www.markalston.net/claude-code-wiki/extending/agent-teams/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://www.markalston.net/claude-code-wiki/extending/agent-teams/</guid><description>&lt;h1 id="agent-teams-multi-agent-orchestration-in-claude-code"&gt;Agent Teams: Multi-Agent Orchestration in Claude Code&lt;a class="anchor" href="#agent-teams-multi-agent-orchestration-in-claude-code"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="executive-summary"&gt;Executive Summary&lt;a class="anchor" href="#executive-summary"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Agent teams let multiple Claude Code instances work together on complex tasks. One session acts as team lead, coordinating work and assigning tasks. Teammates work independently in their own context windows, communicate through direct messaging, and share a task list. This is an experimental feature (disabled by default) that&amp;rsquo;s most valuable for tasks that benefit from parallel work, competing perspectives, or specialized roles.&lt;/p&gt;</description></item></channel></rss>