Agents vs Skills
When should you use a subagent vs. a skill? This decision framework helps you pick the right tool for your Claude Code workflow.
TL;DR
Agents
Isolated workers with custom capabilities. Use for complex tasks that need separation.
Skills
Knowledge and patterns in your main conversation. Use for standards and guidance.
Keep scrolling for the full breakdown...
Quick Comparison
| Aspect | Agents (Subagents) | Skills |
|---|---|---|
| Purpose | Isolated context for focused tasks | Add knowledge to main conversation |
| Activation | Explicit invocation or delegation | Automatic via semantic matching |
| Context | Separate window (isolated) | Shared with main conversation |
| Model | Can use different model per agent | Uses conversation's model |
| Tools | Custom tool access per agent | Inherits conversation's tools |
| Best for | Complex isolated tasks | Standardizing workflows |
When Agents Shine
Use subagents when you need complete isolation, different capabilities, or specialized focus.
Complex, Isolated Tasks
Large research tasks that would pollute main context. Let the agent work independently.
Different Tool Permissions
Read-only auditors, database-only agents, restricted security reviewers.
Different Model Needs
Use Haiku for fast searches, Opus for complex analysis — optimize per task.
Long-Running Research
Deep codebase exploration. Agents can be resumed to continue previous work.
Team Specialization
Encapsulate different team members' specialized workflows as agents.
Context Pollution Prevention
Keep messy exploration out of your main conversation flow.
Examples: Code review specialist (read-only), Security auditor (restricted tools), Data scientist analyzing logs, Debugger searching for errors across the codebase.
When Skills Shine
Use skills when you want to teach Claude patterns, add knowledge, or standardize workflows without isolation.
Standardizing Approaches
Commit message formats, PR review guidelines, coding standards your team follows.
Adding Domain Knowledge
Your company's architecture patterns, codebase conventions, internal processes.
Quick Reference Materials
Complex docs that should be available but not always loaded. Progressive disclosure.
Tool Guidance
Teaching Claude how to use specific tools effectively — your DB schema, API patterns.
Simple, Reusable Workflows
Single-purpose guidance that Claude should auto-discover when relevant.
Team Conventions
Error handling patterns, logging standards, testing approaches everyone should follow.
Examples: Commit message style guide, Code explanation with ASCII diagrams, Security review checklist, SQL patterns for your schema, PDF form-filling with validation.
?Decision Framework
Ask yourself these questions to decide:
"Do I need isolation from my main conversation?"
Yes → Agent
"Should this be auto-discovered based on my request?"
Yes → Skill
"Do I need a different model or tool permissions?"
Yes → Agent
"Is this a pattern I want Claude to follow repeatedly?"
Yes → Skill
"Is this a complex multi-step task?"
Yes → Agent
"Is this just documentation or guidance?"
Yes → Skill
Using Both Together
Agents can automatically load specific skills! Configure this in your agent's YAML frontmatter:
--- name: code-reviewer description: Reviews code with our team standards model: sonnet skills: - commit-style - security-checklist - error-handling-patterns ---
Power Combo Examples
Deployment Agent + Deploy Skill
Agent handles the complex deployment pipeline; Skill provides your team's deploy checklist.
Research Agent + Domain Skills
Agent explores codebase; Skills teach it your architecture patterns and conventions.
Pro Tip: Think of agents as who does the work, and skills as how they should do it. A code reviewer agent + your code style skill = consistent reviews following your standards.
Ready to build your own?
Start with our Agents & Skills guide for step-by-step creation instructions.