danielrosehill Claude commited on
Commit
0d5160e
·
1 Parent(s): c3c7ae8

Add Claude Agent Picker Pattern documentation with fun design

Browse files

- Created dark theme with gradient backgrounds and animations
- Added floating emoji badges and smooth image transitions
- Included all vital images (6 images total with Git LFS)
- Added complete markdown documentation
- Copied Anthropic subagent reference doc
- Implemented responsive design with Inter and JetBrains Mono fonts

🤖 Generated with Claude Code
https://claude.com/claude-code

Co-Authored-By: Claude <[email protected]>

.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
37
+ *.jpg filter=lfs diff=lfs merge=lfs -text
38
+ *.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,11 +1,37 @@
1
  ---
2
- title: Claude Agent Picker Idea
3
- emoji: 📚
4
  colorFrom: indigo
5
  colorTo: purple
6
  sdk: static
7
  pinned: false
8
- short_description: Sketch for a multiagent creation utility
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Claude Agent Picker Pattern
3
+ emoji: 🎯
4
  colorFrom: indigo
5
  colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ short_description: A creative pattern for managing multi-agent systems in Claude Code
9
  ---
10
 
11
+ # Claude Agent "Picker" Pattern
12
+
13
+ A late-night idea for intelligently assembling multi-agent crews for Claude Code projects while managing context window constraints.
14
+
15
+ ## What's This About?
16
+
17
+ This space presents a conceptual pattern for solving a common problem in AI agent orchestration: **context flooding**. When you have too many agents or MCP tools, the orchestration layer gets overwhelmed trying to parse through all the definitions.
18
+
19
+ ## The Concept
20
+
21
+ The "Agent Picker" pattern proposes:
22
+
23
+ 1. **Agent Farm**: A centralized library of reusable subagent configurations
24
+ 2. **HTPG (Harsh Team Picker Guy)**: An intelligent pre-kickoff agent that:
25
+ - Evaluates project requirements
26
+ - Selects optimal agent crews with minimal overlap
27
+ - Manages context window limits
28
+ - Adapts agent configs for specific projects
29
+
30
+ ## View the Full Documentation
31
+
32
+ Click the space above to view the complete write-up with diagrams and detailed explanations!
33
+
34
+ ---
35
+
36
+ **Author**: [Daniel Rosehill](https://danielrosehill.com)
37
+ **Date**: October 31, 2025
index.html CHANGED
@@ -1,19 +1,64 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Claude Agent Picker Pattern 🎯</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
9
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
10
+ </head>
11
+ <body>
12
+ <div class="hero-gradient"></div>
13
+ <div class="container">
14
+ <div class="header-badge-container">
15
+ <span class="emoji-badge">🎯</span>
16
+ <span class="emoji-badge">🤖</span>
17
+ <span class="emoji-badge">🧠</span>
18
+ </div>
19
+ <div id="content"></div>
20
+ <footer class="footer">
21
+ <p>💡 A late-night idea by <a href="https://danielrosehill.com" target="_blank">Daniel Rosehill</a></p>
22
+ <p class="footer-date">October 31, 2025</p>
23
+ </footer>
24
+ </div>
25
+
26
+ <script>
27
+ // Fetch and render the markdown
28
+ fetch('source/README.md')
29
+ .then(response => response.text())
30
+ .then(text => {
31
+ // Configure marked
32
+ marked.setOptions({
33
+ breaks: true,
34
+ gfm: true
35
+ });
36
+
37
+ // Convert markdown to HTML
38
+ const html = marked.parse(text);
39
+
40
+ // Update image paths to point to source/images/
41
+ const updatedHtml = html.replace(/src="images\//g, 'src="source/images/');
42
+
43
+ document.getElementById('content').innerHTML = updatedHtml;
44
+
45
+ // Add some animation to images after loading
46
+ setTimeout(() => {
47
+ document.querySelectorAll('img').forEach((img, index) => {
48
+ img.style.opacity = '0';
49
+ img.style.transform = 'translateY(20px)';
50
+ setTimeout(() => {
51
+ img.style.transition = 'all 0.6s ease-out';
52
+ img.style.opacity = '1';
53
+ img.style.transform = 'translateY(0)';
54
+ }, index * 100);
55
+ });
56
+ }, 100);
57
+ })
58
+ .catch(error => {
59
+ console.error('Error loading markdown:', error);
60
+ document.getElementById('content').innerHTML = '<p class="error">Error loading content. Please try again.</p>';
61
+ });
62
+ </script>
63
+ </body>
64
  </html>
source/README.md ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Claude Agent "Picker" Pattern (Claude Code)
2
+
3
+ ![Concept](https://img.shields.io/badge/Type-Concept-blue)
4
+ ![Notes](https://img.shields.io/badge/Status-Notes-yellow)
5
+ ![Idea](https://img.shields.io/badge/Stage-Idea-purple)
6
+ ![Claude Code](https://img.shields.io/badge/Tool-Claude_Code-orange)
7
+
8
+ ![alt text](images/3.jpg)
9
+ Oct / 31 / 2025
10
+
11
+ ## The Problem
12
+
13
+ Agents have to be used judiciously.
14
+
15
+ Just like MCP tools.
16
+
17
+ Too many cooks in the kitchen (and all that).
18
+
19
+ The actual problem in technical terms: context flooding:
20
+
21
+ - The more agents, the more descriptions the orchestration agent (plain Claude) has to parse through to figure out which subagent to delegate a task to.
22
+ - The more MCP tool definitions Claude has to read... the same thing.
23
+
24
+ ![alt text](images/2.jpg)
25
+
26
+ A thought:
27
+
28
+ If AI tooling progresses faster than context widows grow, this problem can be expected to get more acute and its consequences to be more widely felt.
29
+
30
+ Once upon a time, LLMs were envisioned as tools for handling (simple) text. Nowadays, our somewhat fantastical ambition has evolved to that LLMs can maintain good inference while simultaneously dealing with:
31
+
32
+ - Lots of text (code)
33
+ - Tool definitions (MCP)
34
+ - Agent maps
35
+
36
+ Etc.
37
+
38
+ ## Why Both With Subagents At All?
39
+
40
+ Some are strenously against multiagent systems.
41
+
42
+ But this quote from the Anthropic docs illustrates why it's worth persevering with working with subagents in spite of this limit:
43
+
44
+ "Each subagent operates in its own context, preventing pollution of the main conversation and keeping it focused on high-level objectives."
45
+
46
+ Which is a very big deal when context pollution can flatten out otherwise great inference.
47
+
48
+ For creating performant agentic systems, using emerging tooling judiciously has become almost as vital an enterprise as knowing what tooling to use.
49
+
50
+ Thus, a late night idea for a workaround pattern (even if imperfect, flawed, etc):
51
+
52
+ ---
53
+
54
+ # The Idea
55
+
56
+ ![alt text](images/1.jpg)
57
+
58
+ I call it the agent picker because the first thought I had when writing this was the high school ritual of picking teammates for a game of soccer (was that just my school? It seems awfully callous!).
59
+
60
+ It offers a hacky workaround because:
61
+
62
+ - If you add a whole bunch of system level agents ... you get the problem above
63
+ - If you add them at the project level ... the CLI starts warning about the context problem
64
+
65
+ At the time of writing, the inner mechanics of agent delegation are opaque.
66
+
67
+
68
+
69
+ ---
70
+
71
+ # The Model
72
+
73
+ ## Agent Farm
74
+
75
+ ![alt text](images/4.png)
76
+
77
+ Or more accurately the "subagent farm" but that sounds even odder.
78
+
79
+ You may go through creative bursts in which you think ... "that would be an amazing subagent." It may have application across multiple Claude workspaces.
80
+
81
+ This agent may be useful on a personal project and equally helpful on a work project with collaborators. It doesn't matter. What matters is the *idea* and config behind the agent and how it leverages AI to help achieve a project.
82
+
83
+ For simplicity, let's sketch the filetree as:
84
+
85
+ `~/subagents`
86
+
87
+ ## The Harsh Team Picker Guy (HTPG)
88
+
89
+ ![alt text](images/5.png)
90
+
91
+ Our next task:
92
+
93
+ We want an agent whose purpose is to intelligently assemble a multi-agent crew for a workspace.
94
+
95
+ Note to self (and anyone reading this): this is very unlikely an original idea. But hey, who knows.
96
+
97
+ Either way, here's my twist on it:
98
+
99
+ - Claude Code knows its own context window and the parameters of how much context it can fit in the "other stuff" that goes on top of user prompts (namely, agent definitions and MCP tools).
100
+
101
+ Downstream, this agent could select both. In this implementation (V1) let's just stick to subagent crew formation.
102
+
103
+ So Harsh Team Picker Guy (HTPG) is a friendly pre-kickoff agent.
104
+
105
+ In real world terms, I imagine HTPG as the project lead when you offload some project to an outsourced company. The project lead listens, takes notes, and assigns internal resources to your job. HTPG does thusly.
106
+
107
+ HTPG has to have some firepower, though. So I envision him working like this, in sequence:
108
+
109
+ ### Task 1: Crew shortlisting / selection
110
+
111
+ - Evaluate the project spec the user is proposing
112
+ - Draw up a shortlist of subagents to form a "crew" with minimal task overlap and maximal "synergy"
113
+
114
+ ### Task 2: Truncate crew to fit context limit (user-set)
115
+
116
+ - Calculate the approximate cumulative context window that the desired-for crew would impose
117
+ - If beyond the defined limit, make some substitutions until we can get a crew together that fits within that limit.
118
+
119
+ ![alt text](images/6.png)
120
+ *Graphic: Selected subagents are truncated for context optimisation before (almost) being dispatched into a repo*
121
+
122
+ Potential "tactics" for substitution:
123
+
124
+ - Remove least important subagents
125
+ - Truncate descriptions / shorten system prompts of constituent agents
126
+
127
+ ### Task 3: Variable-based agent config adaption
128
+
129
+ Finally - tweak the (stock) configs: this could be variable substitution to give our cookie cutter subagents a bit of context about the project. But mostly we expect and hope that this will happen through Claude's excellent built-in orchestration.
130
+
131
+ ### Task 4 (Wrap): Copy adapted crew to target directory (project workspace)
132
+
133
+ This completes the flow.
134
+
135
+ ---
136
+
137
+ The flow (describing the intended scripting in natural language):
138
+
139
+ - Crew gets copied to a temp directory
140
+ - Crew gets edited slightly for the task at hand by variable insertion
141
+ - Crew gets copied into the project directory at `./claude/agents`
142
+ - CLAUDE.md gets created there. CLAUDE.md contains a brief overview of the crew.
143
+ - User gets a success message and is informed that their repo has been created with a nice team of subagents (that won't overrun context)
144
+ - User can create as many stock agents as they wish and know that they will be kept safe in a library and assembled when needed for projects
145
+
146
+ ## Reference
147
+
148
+ For more details on how subagents work in Claude Code, see the [Anthropic subagent documentation](./anthropic-doc.md) (captured at time of writing).
149
+
source/anthropic-doc.md ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Source: https://docs.claude.com/en/docs/claude-code/sub-agents
2
+
3
+ 31/Oct/2025
4
+ # Subagents
5
+
6
+ > Create and use specialized AI subagents in Claude Code for task-specific workflows and improved context management.
7
+
8
+ Custom subagents in Claude Code are specialized AI assistants that can be invoked to handle specific types of tasks. They enable more efficient problem-solving by providing task-specific configurations with customized system prompts, tools and a separate context window.
9
+
10
+ ## What are subagents?
11
+
12
+ Subagents are pre-configured AI personalities that Claude Code can delegate tasks to. Each subagent:
13
+
14
+ * Has a specific purpose and expertise area
15
+ * Uses its own context window separate from the main conversation
16
+ * Can be configured with specific tools it's allowed to use
17
+ * Includes a custom system prompt that guides its behavior
18
+
19
+ When Claude Code encounters a task that matches a subagent's expertise, it can delegate that task to the specialized subagent, which works independently and returns results.
20
+
21
+ ## Key benefits
22
+
23
+ <CardGroup cols={2}>
24
+ <Card title="Context preservation" icon="layer-group">
25
+ Each subagent operates in its own context, preventing pollution of the main conversation and keeping it focused on high-level objectives.
26
+ </Card>
27
+
28
+ <Card title="Specialized expertise" icon="brain">
29
+ Subagents can be fine-tuned with detailed instructions for specific domains, leading to higher success rates on designated tasks.
30
+ </Card>
31
+
32
+ <Card title="Reusability" icon="rotate">
33
+ Once created, subagents can be used across different projects and shared with your team for consistent workflows.
34
+ </Card>
35
+
36
+ <Card title="Flexible permissions" icon="shield-check">
37
+ Each subagent can have different tool access levels, allowing you to limit powerful tools to specific subagent types.
38
+ </Card>
39
+ </CardGroup>
40
+
41
+ ## Quick start
42
+
43
+ To create your first subagent:
44
+
45
+ <Steps>
46
+ <Step title="Open the subagents interface">
47
+ Run the following command:
48
+
49
+ ```
50
+ /agents
51
+ ```
52
+ </Step>
53
+
54
+ <Step title="Select 'Create New Agent'">
55
+ Choose whether to create a project-level or user-level subagent
56
+ </Step>
57
+
58
+ <Step title="Define the subagent">
59
+ * **Recommended**: Generate with Claude first, then customize to make it yours
60
+ * Describe your subagent in detail and when it should be used
61
+ * Select the tools you want to grant access to (or leave blank to inherit all tools)
62
+ * The interface shows all available tools, making selection easy
63
+ * If you're generating with Claude, you can also edit the system prompt in your own editor by pressing `e`
64
+ </Step>
65
+
66
+ <Step title="Save and use">
67
+ Your subagent is now available! Claude will use it automatically when appropriate, or you can invoke it explicitly:
68
+
69
+ ```
70
+ > Use the code-reviewer subagent to check my recent changes
71
+ ```
72
+ </Step>
73
+ </Steps>
74
+
75
+ ## Subagent configuration
76
+
77
+ ### File locations
78
+
79
+ Subagents are stored as Markdown files with YAML frontmatter in two possible locations:
80
+
81
+ | Type | Location | Scope | Priority |
82
+ | :-------------------- | :------------------ | :---------------------------- | :------- |
83
+ | **Project subagents** | `.claude/agents/` | Available in current project | Highest |
84
+ | **User subagents** | `~/.claude/agents/` | Available across all projects | Lower |
85
+
86
+ When subagent names conflict, project-level subagents take precedence over user-level subagents.
87
+
88
+ ### Plugin agents
89
+
90
+ [Plugins](/en/docs/claude-code/plugins) can provide custom subagents that integrate seamlessly with Claude Code. Plugin agents work identically to user-defined agents and appear in the `/agents` interface.
91
+
92
+ **Plugin agent locations**: Plugins include agents in their `agents/` directory (or custom paths specified in the plugin manifest).
93
+
94
+ **Using plugin agents**:
95
+
96
+ * Plugin agents appear in `/agents` alongside your custom agents
97
+ * Can be invoked explicitly: "Use the code-reviewer agent from the security-plugin"
98
+ * Can be invoked automatically by Claude when appropriate
99
+ * Can be managed (viewed, inspected) through `/agents` interface
100
+
101
+ See the [plugin components reference](/en/docs/claude-code/plugins-reference#agents) for details on creating plugin agents.
102
+
103
+ ### CLI-based configuration
104
+
105
+ You can also define subagents dynamically using the `--agents` CLI flag, which accepts a JSON object:
106
+
107
+ ```bash theme={null}
108
+ claude --agents '{
109
+ "code-reviewer": {
110
+ "description": "Expert code reviewer. Use proactively after code changes.",
111
+ "prompt": "You are a senior code reviewer. Focus on code quality, security, and best practices.",
112
+ "tools": ["Read", "Grep", "Glob", "Bash"],
113
+ "model": "sonnet"
114
+ }
115
+ }'
116
+ ```
117
+
118
+ **Priority**: CLI-defined subagents have lower priority than project-level subagents but higher priority than user-level subagents.
119
+
120
+ **Use case**: This approach is useful for:
121
+
122
+ * Quick testing of subagent configurations
123
+ * Session-specific subagents that don't need to be saved
124
+ * Automation scripts that need custom subagents
125
+ * Sharing subagent definitions in documentation or scripts
126
+
127
+ For detailed information about the JSON format and all available options, see the [CLI reference documentation](/en/docs/claude-code/cli-reference#agents-flag-format).
128
+
129
+ ### File format
130
+
131
+ Each subagent is defined in a Markdown file with this structure:
132
+
133
+ ```markdown theme={null}
134
+ ---
135
+ name: your-sub-agent-name
136
+ description: Description of when this subagent should be invoked
137
+ tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted
138
+ model: sonnet # Optional - specify model alias or 'inherit'
139
+ ---
140
+
141
+ Your subagent's system prompt goes here. This can be multiple paragraphs
142
+ and should clearly define the subagent's role, capabilities, and approach
143
+ to solving problems.
144
+
145
+ Include specific instructions, best practices, and any constraints
146
+ the subagent should follow.
147
+ ```
148
+
149
+ #### Configuration fields
150
+
151
+ | Field | Required | Description |
152
+ | :------------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
153
+ | `name` | Yes | Unique identifier using lowercase letters and hyphens |
154
+ | `description` | Yes | Natural language description of the subagent's purpose |
155
+ | `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |
156
+ | `model` | No | Model to use for this subagent. Can be a model alias (`sonnet`, `opus`, `haiku`) or `'inherit'` to use the main conversation's model. If omitted, defaults to the [configured subagent model](/en/docs/claude-code/model-config) |
157
+
158
+ ### Model selection
159
+
160
+ The `model` field allows you to control which [AI model](/en/docs/claude-code/model-config) the subagent uses:
161
+
162
+ * **Model alias**: Use one of the available aliases: `sonnet`, `opus`, or `haiku`
163
+ * **`'inherit'`**: Use the same model as the main conversation (useful for consistency)
164
+ * **Omitted**: If not specified, uses the default model configured for subagents (`sonnet`)
165
+
166
+ <Note>
167
+ Using `'inherit'` is particularly useful when you want your subagents to adapt to the model choice of the main conversation, ensuring consistent capabilities and response style throughout your session.
168
+ </Note>
169
+
170
+ ### Available tools
171
+
172
+ Subagents can be granted access to any of Claude Code's internal tools. See the [tools documentation](/en/docs/claude-code/settings#tools-available-to-claude) for a complete list of available tools.
173
+
174
+ <Tip>
175
+ **Recommended:** Use the `/agents` command to modify tool access - it provides an interactive interface that lists all available tools, including any connected MCP server tools, making it easier to select the ones you need.
176
+ </Tip>
177
+
178
+ You have two options for configuring tools:
179
+
180
+ * **Omit the `tools` field** to inherit all tools from the main thread (default), including MCP tools
181
+ * **Specify individual tools** as a comma-separated list for more granular control (can be edited manually or via `/agents`)
182
+
183
+ **MCP Tools**: Subagents can access MCP tools from configured MCP servers. When the `tools` field is omitted, subagents inherit all MCP tools available to the main thread.
184
+
185
+ ## Managing subagents
186
+
187
+ ### Using the /agents command (Recommended)
188
+
189
+ The `/agents` command provides a comprehensive interface for subagent management:
190
+
191
+ ```
192
+ /agents
193
+ ```
194
+
195
+ This opens an interactive menu where you can:
196
+
197
+ * View all available subagents (built-in, user, and project)
198
+ * Create new subagents with guided setup
199
+ * Edit existing custom subagents, including their tool access
200
+ * Delete custom subagents
201
+ * See which subagents are active when duplicates exist
202
+ * **Easily manage tool permissions** with a complete list of available tools
203
+
204
+ ### Direct file management
205
+
206
+ You can also manage subagents by working directly with their files:
207
+
208
+ ```bash theme={null}
209
+ # Create a project subagent
210
+ mkdir -p .claude/agents
211
+ echo '---
212
+ name: test-runner
213
+ description: Use proactively to run tests and fix failures
214
+ ---
215
+
216
+ You are a test automation expert. When you see code changes, proactively run the appropriate tests. If tests fail, analyze the failures and fix them while preserving the original test intent.' > .claude/agents/test-runner.md
217
+
218
+ # Create a user subagent
219
+ mkdir -p ~/.claude/agents
220
+ # ... create subagent file
221
+ ```
222
+
223
+ ## Using subagents effectively
224
+
225
+ ### Automatic delegation
226
+
227
+ Claude Code proactively delegates tasks based on:
228
+
229
+ * The task description in your request
230
+ * The `description` field in subagent configurations
231
+ * Current context and available tools
232
+
233
+ <Tip>
234
+ To encourage more proactive subagent use, include phrases like "use PROACTIVELY" or "MUST BE USED" in your `description` field.
235
+ </Tip>
236
+
237
+ ### Explicit invocation
238
+
239
+ Request a specific subagent by mentioning it in your command:
240
+
241
+ ```
242
+ > Use the test-runner subagent to fix failing tests
243
+ > Have the code-reviewer subagent look at my recent changes
244
+ > Ask the debugger subagent to investigate this error
245
+ ```
246
+
247
+ ## Example subagents
248
+
249
+ ### Code reviewer
250
+
251
+ ```markdown theme={null}
252
+ ---
253
+ name: code-reviewer
254
+ description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
255
+ tools: Read, Grep, Glob, Bash
256
+ model: inherit
257
+ ---
258
+
259
+ You are a senior code reviewer ensuring high standards of code quality and security.
260
+
261
+ When invoked:
262
+ 1. Run git diff to see recent changes
263
+ 2. Focus on modified files
264
+ 3. Begin review immediately
265
+
266
+ Review checklist:
267
+ - Code is simple and readable
268
+ - Functions and variables are well-named
269
+ - No duplicated code
270
+ - Proper error handling
271
+ - No exposed secrets or API keys
272
+ - Input validation implemented
273
+ - Good test coverage
274
+ - Performance considerations addressed
275
+
276
+ Provide feedback organized by priority:
277
+ - Critical issues (must fix)
278
+ - Warnings (should fix)
279
+ - Suggestions (consider improving)
280
+
281
+ Include specific examples of how to fix issues.
282
+ ```
283
+
284
+ ### Debugger
285
+
286
+ ```markdown theme={null}
287
+ ---
288
+ name: debugger
289
+ description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
290
+ tools: Read, Edit, Bash, Grep, Glob
291
+ ---
292
+
293
+ You are an expert debugger specializing in root cause analysis.
294
+
295
+ When invoked:
296
+ 1. Capture error message and stack trace
297
+ 2. Identify reproduction steps
298
+ 3. Isolate the failure location
299
+ 4. Implement minimal fix
300
+ 5. Verify solution works
301
+
302
+ Debugging process:
303
+ - Analyze error messages and logs
304
+ - Check recent code changes
305
+ - Form and test hypotheses
306
+ - Add strategic debug logging
307
+ - Inspect variable states
308
+
309
+ For each issue, provide:
310
+ - Root cause explanation
311
+ - Evidence supporting the diagnosis
312
+ - Specific code fix
313
+ - Testing approach
314
+ - Prevention recommendations
315
+
316
+ Focus on fixing the underlying issue, not just symptoms.
317
+ ```
318
+
319
+ ### Data scientist
320
+
321
+ ```markdown theme={null}
322
+ ---
323
+ name: data-scientist
324
+ description: Data analysis expert for SQL queries, BigQuery operations, and data insights. Use proactively for data analysis tasks and queries.
325
+ tools: Bash, Read, Write
326
+ model: sonnet
327
+ ---
328
+
329
+ You are a data scientist specializing in SQL and BigQuery analysis.
330
+
331
+ When invoked:
332
+ 1. Understand the data analysis requirement
333
+ 2. Write efficient SQL queries
334
+ 3. Use BigQuery command line tools (bq) when appropriate
335
+ 4. Analyze and summarize results
336
+ 5. Present findings clearly
337
+
338
+ Key practices:
339
+ - Write optimized SQL queries with proper filters
340
+ - Use appropriate aggregations and joins
341
+ - Include comments explaining complex logic
342
+ - Format results for readability
343
+ - Provide data-driven recommendations
344
+
345
+ For each analysis:
346
+ - Explain the query approach
347
+ - Document any assumptions
348
+ - Highlight key findings
349
+ - Suggest next steps based on data
350
+
351
+ Always ensure queries are efficient and cost-effective.
352
+ ```
353
+
354
+ ## Best practices
355
+
356
+ * **Start with Claude-generated agents**: We highly recommend generating your initial subagent with Claude and then iterating on it to make it personally yours. This approach gives you the best results - a solid foundation that you can customize to your specific needs.
357
+
358
+ * **Design focused subagents**: Create subagents with single, clear responsibilities rather than trying to make one subagent do everything. This improves performance and makes subagents more predictable.
359
+
360
+ * **Write detailed prompts**: Include specific instructions, examples, and constraints in your system prompts. The more guidance you provide, the better the subagent will perform.
361
+
362
+ * **Limit tool access**: Only grant tools that are necessary for the subagent's purpose. This improves security and helps the subagent focus on relevant actions.
363
+
364
+ * **Version control**: Check project subagents into version control so your team can benefit from and improve them collaboratively.
365
+
366
+ ## Advanced usage
367
+
368
+ ### Chaining subagents
369
+
370
+ For complex workflows, you can chain multiple subagents:
371
+
372
+ ```
373
+ > First use the code-analyzer subagent to find performance issues, then use the optimizer subagent to fix them
374
+ ```
375
+
376
+ ### Dynamic subagent selection
377
+
378
+ Claude Code intelligently selects subagents based on context. Make your `description` fields specific and action-oriented for best results.
379
+
380
+ ## Performance considerations
381
+
382
+ * **Context efficiency**: Agents help preserve main context, enabling longer overall sessions
383
+ * **Latency**: Subagents start off with a clean slate each time they are invoked and may add latency as they gather context that they require to do their job effectively.
384
+
385
+ ## Related documentation
386
+
source/images/1.jpg ADDED

Git LFS Details

  • SHA256: 745aa827682da004dd5cf762c557906dd723ccc0b7ce153ab1915bb91ec453b1
  • Pointer size: 131 Bytes
  • Size of remote file: 326 kB
source/images/2.jpg ADDED

Git LFS Details

  • SHA256: 582d46c4309fee1767ac86d09355b4725d22b31db23c85721c418aa31336f017
  • Pointer size: 131 Bytes
  • Size of remote file: 190 kB
source/images/3.jpg ADDED

Git LFS Details

  • SHA256: e0f5d5114d4090168710490e21bcd3370e94785fa0f63e0c049d9801239c1bc7
  • Pointer size: 131 Bytes
  • Size of remote file: 116 kB
source/images/4.png ADDED

Git LFS Details

  • SHA256: dbb4dbb53509e1e34b0dd055e889cdb0a624ca80e95e7c0f77e08f791f4323a2
  • Pointer size: 132 Bytes
  • Size of remote file: 1.25 MB
source/images/5.png ADDED

Git LFS Details

  • SHA256: 213ffbb56c577ab75e34861b2472ee6f37260e25eb7cb57af4cb3b12f2c09253
  • Pointer size: 132 Bytes
  • Size of remote file: 1.26 MB
source/images/6.png ADDED

Git LFS Details

  • SHA256: 24a9c70e88d6cc4ec1aa10542be1da40175551809123bac085d4cd91938ce904
  • Pointer size: 132 Bytes
  • Size of remote file: 1.03 MB
style.css CHANGED
@@ -1,28 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
 
 
 
 
 
 
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
28
  }
 
1
+ :root {
2
+ --primary: #6366f1;
3
+ --primary-dark: #4f46e5;
4
+ --secondary: #8b5cf6;
5
+ --accent: #ec4899;
6
+ --bg-dark: #0f172a;
7
+ --bg-card: #1e293b;
8
+ --bg-card-hover: #334155;
9
+ --text-primary: #f1f5f9;
10
+ --text-secondary: #cbd5e1;
11
+ --text-muted: #94a3b8;
12
+ --border: #334155;
13
+ --code-bg: #1e293b;
14
+ }
15
+
16
+ * {
17
+ margin: 0;
18
+ padding: 0;
19
+ box-sizing: border-box;
20
+ }
21
+
22
  body {
23
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
24
+ background: var(--bg-dark);
25
+ color: var(--text-primary);
26
+ line-height: 1.7;
27
+ position: relative;
28
+ overflow-x: hidden;
29
+ }
30
+
31
+ .hero-gradient {
32
+ position: fixed;
33
+ top: 0;
34
+ left: 0;
35
+ right: 0;
36
+ height: 400px;
37
+ background: linear-gradient(135deg,
38
+ rgba(99, 102, 241, 0.15) 0%,
39
+ rgba(139, 92, 246, 0.15) 50%,
40
+ rgba(236, 72, 153, 0.15) 100%);
41
+ filter: blur(60px);
42
+ z-index: -1;
43
+ pointer-events: none;
44
+ }
45
+
46
+ .container {
47
+ max-width: 900px;
48
+ margin: 0 auto;
49
+ padding: 3rem 2rem;
50
+ position: relative;
51
+ z-index: 1;
52
+ }
53
+
54
+ .header-badge-container {
55
+ display: flex;
56
+ gap: 1rem;
57
+ justify-content: center;
58
+ margin-bottom: 2rem;
59
+ }
60
+
61
+ .emoji-badge {
62
+ font-size: 2.5rem;
63
+ animation: float 3s ease-in-out infinite;
64
+ display: inline-block;
65
+ }
66
+
67
+ .emoji-badge:nth-child(2) {
68
+ animation-delay: 0.5s;
69
+ }
70
+
71
+ .emoji-badge:nth-child(3) {
72
+ animation-delay: 1s;
73
+ }
74
+
75
+ @keyframes float {
76
+ 0%, 100% { transform: translateY(0); }
77
+ 50% { transform: translateY(-10px); }
78
+ }
79
+
80
+ /* Markdown Content Styling */
81
+ #content h1 {
82
+ font-size: 2.75rem;
83
+ font-weight: 800;
84
+ background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
85
+ -webkit-background-clip: text;
86
+ -webkit-text-fill-color: transparent;
87
+ background-clip: text;
88
+ margin-bottom: 1.5rem;
89
+ line-height: 1.2;
90
  }
91
 
92
+ #content h2 {
93
+ font-size: 2rem;
94
+ font-weight: 700;
95
+ color: var(--text-primary);
96
+ margin-top: 3rem;
97
+ margin-bottom: 1.5rem;
98
+ padding-bottom: 0.5rem;
99
+ border-bottom: 2px solid var(--border);
100
+ position: relative;
101
  }
102
 
103
+ #content h2::before {
104
+ content: '';
105
+ position: absolute;
106
+ bottom: -2px;
107
+ left: 0;
108
+ width: 60px;
109
+ height: 2px;
110
+ background: linear-gradient(90deg, var(--primary), var(--secondary));
111
+ }
112
+
113
+ #content h3 {
114
+ font-size: 1.5rem;
115
+ font-weight: 600;
116
+ color: var(--text-primary);
117
+ margin-top: 2rem;
118
+ margin-bottom: 1rem;
119
+ }
120
+
121
+ #content p {
122
+ color: var(--text-secondary);
123
+ margin-bottom: 1.25rem;
124
+ font-size: 1.05rem;
125
+ }
126
+
127
+ #content strong {
128
+ color: var(--text-primary);
129
+ font-weight: 600;
130
+ }
131
+
132
+ #content em {
133
+ color: var(--text-secondary);
134
+ font-style: italic;
135
+ }
136
+
137
+ /* Badge Styling */
138
+ #content img[alt*="shield"] {
139
+ display: inline-block;
140
+ margin: 0 0.25rem;
141
+ }
142
+
143
+ /* Images */
144
+ #content img {
145
+ max-width: 100%;
146
+ height: auto;
147
+ border-radius: 12px;
148
+ margin: 2rem 0;
149
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
150
+ border: 1px solid var(--border);
151
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
152
+ }
153
+
154
+ #content img:hover {
155
+ transform: translateY(-4px) scale(1.01);
156
+ box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
157
+ }
158
+
159
+ /* Lists */
160
+ #content ul, #content ol {
161
+ margin-left: 1.5rem;
162
+ margin-bottom: 1.5rem;
163
+ color: var(--text-secondary);
164
+ }
165
+
166
+ #content li {
167
+ margin-bottom: 0.75rem;
168
+ padding-left: 0.5rem;
169
+ }
170
+
171
+ #content ul li::marker {
172
+ color: var(--primary);
173
+ }
174
+
175
+ /* Code blocks */
176
+ #content code {
177
+ background: var(--code-bg);
178
+ padding: 0.2rem 0.5rem;
179
+ border-radius: 4px;
180
+ font-family: 'JetBrains Mono', monospace;
181
+ font-size: 0.9rem;
182
+ color: var(--accent);
183
+ border: 1px solid var(--border);
184
+ }
185
+
186
+ #content pre {
187
+ background: var(--code-bg);
188
+ padding: 1.5rem;
189
+ border-radius: 8px;
190
+ overflow-x: auto;
191
+ margin: 1.5rem 0;
192
+ border: 1px solid var(--border);
193
+ }
194
+
195
+ #content pre code {
196
+ background: none;
197
+ padding: 0;
198
+ border: none;
199
+ color: var(--text-secondary);
200
+ }
201
+
202
+ /* Blockquotes */
203
+ #content blockquote {
204
+ border-left: 4px solid var(--primary);
205
+ background: var(--bg-card);
206
+ padding: 1.5rem;
207
+ margin: 2rem 0;
208
+ border-radius: 0 8px 8px 0;
209
+ font-style: italic;
210
+ color: var(--text-secondary);
211
+ }
212
+
213
+ #content blockquote p {
214
+ margin-bottom: 0;
215
+ }
216
+
217
+ /* Links */
218
+ #content a {
219
+ color: var(--primary);
220
+ text-decoration: none;
221
+ border-bottom: 1px solid transparent;
222
+ transition: all 0.2s ease;
223
+ }
224
+
225
+ #content a:hover {
226
+ color: var(--secondary);
227
+ border-bottom-color: var(--secondary);
228
+ }
229
+
230
+ /* Horizontal Rules */
231
+ #content hr {
232
+ border: none;
233
+ height: 2px;
234
+ background: linear-gradient(90deg,
235
+ transparent 0%,
236
+ var(--border) 50%,
237
+ transparent 100%);
238
+ margin: 3rem 0;
239
+ }
240
+
241
+ /* Special callout boxes for important sections */
242
+ #content p:has(img[alt*="shield"]) {
243
+ display: flex;
244
+ flex-wrap: wrap;
245
+ gap: 0.5rem;
246
+ margin-bottom: 2rem;
247
+ }
248
+
249
+ /* Footer */
250
+ .footer {
251
+ margin-top: 5rem;
252
+ padding-top: 2rem;
253
+ border-top: 1px solid var(--border);
254
+ text-align: center;
255
+ }
256
+
257
+ .footer p {
258
+ color: var(--text-muted);
259
+ font-size: 0.95rem;
260
+ margin-bottom: 0.5rem;
261
+ }
262
+
263
+ .footer a {
264
+ color: var(--primary);
265
+ text-decoration: none;
266
+ transition: color 0.2s ease;
267
+ }
268
+
269
+ .footer a:hover {
270
+ color: var(--secondary);
271
+ }
272
+
273
+ .footer-date {
274
+ font-family: 'JetBrains Mono', monospace;
275
+ font-size: 0.85rem;
276
+ color: var(--text-muted);
277
+ }
278
+
279
+ /* Error state */
280
+ .error {
281
+ background: var(--bg-card);
282
+ padding: 2rem;
283
+ border-radius: 8px;
284
+ text-align: center;
285
+ color: var(--accent);
286
+ }
287
+
288
+ /* Responsive Design */
289
+ @media (max-width: 768px) {
290
+ .container {
291
+ padding: 2rem 1.5rem;
292
+ }
293
+
294
+ #content h1 {
295
+ font-size: 2rem;
296
+ }
297
+
298
+ #content h2 {
299
+ font-size: 1.5rem;
300
+ }
301
+
302
+ #content h3 {
303
+ font-size: 1.25rem;
304
+ }
305
+
306
+ .emoji-badge {
307
+ font-size: 2rem;
308
+ }
309
+
310
+ #content img {
311
+ margin: 1.5rem 0;
312
+ }
313
  }
314
 
315
+ /* Smooth scrolling */
316
+ html {
317
+ scroll-behavior: smooth;
 
 
 
318
  }
319
 
320
+ /* Selection styling */
321
+ ::selection {
322
+ background: var(--primary);
323
+ color: white;
324
  }