managing-subagents

Determine subagent delegation and configure agent types for /agents workflows.

Updated Nov 26, 2025
One-click install
npx skills add https://github.com/thoeltig/claude-code-toolkit --skill managing-subagents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-subagents
Source: https://github.com/thoeltig/claude-code-toolkit/tree/main/plugins/claude-code-capabilities/skills/managing-subagents
Command: npx skills add https://github.com/thoeltig/claude-code-toolkit --skill managing-subagents

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill empowers you to effectively manage Claude's subagents, optimizing task delegation, context preservation, and performance. It guides you in deciding when to use a subagent, evaluating existing configurations, creating new specialized agents, and improving their effectiveness, transforming complex, multi-step tasks into streamlined, automated workflows.

Core Features & Use Cases

  • Intelligent Delegation: Use a decision matrix to determine if a task is best handled by a subagent or direct tool calls, ensuring optimal resource usage and preventing main conversation clutter.
  • Subagent Lifecycle Management: Create, evaluate, and improve custom subagents with tailored system prompts, tool access, and model selection for specialized tasks like code review or data analysis.
  • Context Preservation & Parallelization: Leverage subagents to prevent main conversation context pollution and enable parallel execution of independent tasks, significantly speeding up complex workflows.
  • Use Case: You frequently need to analyze specific code modules for security vulnerabilities. Instead of manually running multiple tools and sifting through results in the main conversation, this Skill can help you create a "security-auditor" subagent. This subagent, with its specialized prompt and restricted tool access, can then be delegated the task, returning a concise report without cluttering your primary workflow.

Quick Start

Use the managing-subagents skill to evaluate if analyzing the 'auth' module for security issues should use a subagent.

Frequently Asked Questions about managing-subagents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I delegate a task to a subagent instead of handling it directly?

Delegate to a subagent when a task is specialized, independent, or risks cluttering your main conversation context. Use the decision matrix to evaluate whether the task benefits from isolated tool access, a tailored system prompt, and parallel execution without polluting primary workflow state.

How do I create a specialized subagent for recurring tasks like code review or security audits?

Define a custom subagent by selecting an agent type (Explore, Plan, general, or custom), writing a specialized system prompt scoped to the task, restricting tool permissions to only what's needed, and configuring model selection. Generate concrete task prompts and interaction steps for /agents workflows or CLI definitions.

How does managing subagents prevent context pollution in complex workflows?

Subagents operate in isolated context windows, keeping intermediate results, tool calls, and reasoning separate from your main conversation. This preserves primary workflow clarity and enables parallel execution of independent tasks, significantly accelerating multi-step processes.

Can I evaluate and improve existing subagent configurations?

Yes. Assess existing subagent configurations by reviewing system prompts, tool permissions, and agent type selection against task requirements. Optimize performance by adjusting specialization, refining tool access, and tuning model parameters for your specific use case.

What configuration details do I need to define a subagent in CLI-based workflows?

Parse YAML frontmatter to load decision matrices and agent definitions. Specify agent type, system prompt, tool permissions, model selection, and concrete task instructions. Generate the full configuration for /agents workflows or command-line agent definitions.

How do subagents handle task delegation at scale across multiple independent workflows?

Subagents parallelize independent tasks by executing them in separate context spaces simultaneously. This approach prevents bottlenecks in main conversation flow, manages agent configurations efficiently, and optimizes Claude's performance across recurring patterns and specialized workloads.