Subagents Guide

Delegate tasks to specialized subagents with separate contexts and restricted tool access.

497|68|Updated Sep 7, 2025
One-click install
npx skills add https://github.com/CaptainCrouton89/.claude --skill subagents-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Subagents Guide
Source: https://github.com/CaptainCrouton89/.claude/tree/main/.claude/skills/agents-guide
Command: npx skills add https://github.com/CaptainCrouton89/.claude --skill subagents-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to understanding and utilizing Claude Code's subagent system. It helps you effectively delegate complex, task-specific workflows to specialized AI assistants, ensuring context preservation, focused expertise, and granular permission control, ultimately streamlining your development process.

Core Features & Use Cases

  • Context Isolation: Subagents operate with separate contexts, preventing main conversation pollution and improving focus.
  • Customizable Expertise: Define subagents with tailored system prompts and specific tool access for domain-tuned performance.
  • Use Case: When tackling a multi-faceted project like a full-stack feature implementation, you can delegate backend work to a backend-developer subagent and frontend work to a frontend-ui-developer subagent, allowing each specialist to work efficiently without interfering with the main task's context.

Quick Start

Open the interactive subagents interface

/agents

Or create a project-scoped subagent manually

mkdir -p .claude/agents

Then create a Markdown file like .claude/agents/code-reviewer.md

---

name: code-reviewer

description: Expert code review specialist. Use proactively after writing code.

---

You are a senior code reviewer...

Frequently Asked Questions about Subagents Guide

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

FAQPage Schema
How do I delegate tasks to specialized AI assistants without losing context in my main workflow?

Subagents operate with separate contexts, preventing pollution of your main conversation. Define specialized subagents with tailored system prompts and restricted tool access using YAML frontmatter in .claude/agents/, then invoke them for focused work on code review, debugging, testing, or data analysis tasks.

What's the best way to prevent cross-contamination when handling multiple parallel tasks in software development?

Task delegation to subagents isolates context for each workflow. Configure least-privilege tool access per subagent, use automatic or explicit invocation, and apply project or user-level precedence rules to ensure specialized expertise without interference between parallel work streams.

Can I configure different tool permissions for different subagents working on the same project?

Yes. Subagents support granular tool configuration through YAML frontmatter definitions. Each subagent can have restricted tool access tailored to its domain—backend specialists access different tools than frontend or code review specialists—enabling secure delegation with least-privilege principles.

How do I set up a subagent for code review without affecting my main development context?

Create a .claude/agents/code-reviewer.md file with YAML frontmatter specifying the subagent name and description, then define a specialized system prompt. Invoke it after writing code; the separate context preserves your main workflow while the code-review subagent operates with focused expertise.

Do subagents work across different types of software development tasks like backend, frontend, and testing?

Yes. Subagents are applicable across code review, testing, debugging, data analysis, and documentation tasks. Create domain-specific subagents like `backend-developer` or `frontend-ui-developer`, each with tailored prompts and tool access, enabling parallel specialist work on multi-faceted projects.

What happens when project-level and user-level subagent definitions conflict?

Project-level precedence rules ensure consistent behavior when both exist. The system respects the hierarchy to guarantee predictable subagent invocation and tool access, preventing unexpected behavior in shared or multi-context environments.