Blog
27 June 2026/13 min read

10 Best Claude Code Sub-Agents for Power Users in 2026

Sub-agents are Claude Code's force multiplier: code reviewers, security reviewers, and test automators. Top patterns and prompt structures.

Robel
Author:Robel,AI Engineer
10 Best Claude Code Sub-Agents for Power Users in 2026

Book a Free Strategy Call

Skip the read: talk to Walid in 30 min.

Free strategy call. We map your AI engineering team, you keep the notes.

Claude Code changed in 2025. By 2026, the question is no longer "can an agent write code" but "how do I keep an agent focused while it does the work I actually want it to do." Sub-agents are the answer. They are scoped, isolated Claude instances with their own context window, their own tool list, and their own model. They turn one chatty assistant into a small engineering team.

The hard part is separating sub-agents that genuinely save context and time from prompt files masquerading as agents. Most of the "100+ sub-agent" collections floating around are markdown templates with no real scoping. The ones below are different: they either ship inside Claude Code itself, sit at the top of community repos that real teams use daily, or solve a single job well enough that power users keep them resident in ~/.claude/agents/ across every project.

This guide compares the 10 best Claude Code sub-agents in 2026. Real configs, honest pricing (most are free and open source), pros and cons, and a framework to pick the right ones for your workflow.

Best Claude Code sub-agents: a brief overview

  • Explore (built-in): Best for read-only codebase discovery without burning main-context tokens.
  • Plan (built-in): Best for gathering context before plan-mode strategy.
  • General-purpose (built-in): Best for multi-step tasks that need both exploration and edits.
  • code-reviewer (VoltAgent): Best for opinionated quality and best-practice review.
  • security-reviewer: Best for vulnerability scanning before code ships.
  • backend-developer (VoltAgent): Best for API, service, and database implementation work.
  • frontend-developer (VoltAgent): Best for React, accessibility, and UI implementation.
  • devops-engineer (VoltAgent): Best for CI/CD, infra-as-code, and deploy pipelines.
  • prompt-engineer: Best for writing and refining prompts for other agents.
  • test-automator: Best for generating and maintaining test suites diff-aware.
Sub-agentKey strengthPricingSpecialties
ExploreBuilt-in, runs on HaikuFree (built-in)Codebase search, file discovery
PlanBuilt-in, plan-mode researchFree (built-in)Context gathering, strategy
General-purposeBuilt-in, broad scopeFree (built-in)Multi-step exploration + edits
code-reviewerOpinionated review promptFree / OSSQuality, idiomatic patterns
security-reviewerVulnerability-focusedFree / OSSOWASP, secrets, auth flows
backend-developerAPI + service patternsFree / OSSREST, GraphQL, DB schema
frontend-developerReact + a11yFree / OSSComponents, state, accessibility
devops-engineerPipelines + IaCFree / OSSGitHub Actions, Terraform, Docker
prompt-engineerPrompt refinementFree / OSSSub-agent system prompts
test-automatorTest generationFree / OSSUnit, integration, e2e

1. Explore, best for read-only codebase discovery

Explore is the first sub-agent Claude Code ships with and the one most people underuse. It runs on Haiku by default, has Write and Edit tools denied, and exists for one job: search a codebase, read files, and return a short summary to the main agent. That summary is what lands in your main context window, not the 40 files it scanned to produce it.

For large repos this is the difference between a session that lasts an hour and one that compacts every 15 minutes. Claude Code will delegate to Explore automatically when you ask broad "where is X" or "how does Y work" questions.

Key features

  • Read-only by design (no Write, no Edit)
  • Runs on Haiku for speed and cost
  • Recursive directory scanning and pattern search
  • Returns compressed summaries, not raw file dumps
  • Auto-invoked by Claude Code when the task is exploratory

Best for

  • Solo developers working in repos over 50k lines
  • Teams that hit context limits mid-session
  • Onboarding to an unfamiliar codebase

Pricing

  • Free, ships with Claude Code
  • Token usage charged at Haiku rates (cheap)

Pros

  • Zero configuration, works out of the box
  • Cuts main-context spend dramatically on large repos
  • Genuinely fast; Haiku finishes most scans in seconds
  • Cannot accidentally modify files

Cons

  • Cannot answer questions that require running code or tests
  • Hardcoded model means you cannot upgrade it to Sonnet for harder reasoning

Free weekly brief

Steal our production automations

The exact n8n flows, Claude Code setups, and prompts we ship for clients, broken down step by step. No spam, unsubscribe anytime.

2. Plan, best for plan-mode research

Plan is the sub-agent Claude Code invokes when you enter plan mode. Its job is to gather enough context to present a real strategy before any code is written. It reads files, traces dependencies, and assembles the picture that lets the main agent produce a plan you can actually approve.

The trick with Plan is that it is invisible until you turn on plan mode (Shift+Tab in the CLI). Power users live in plan mode for anything non-trivial. The Plan sub-agent is why plan mode does not blow your context budget.

Key features

  • Auto-invoked by plan mode
  • Read-only scoping
  • Optimized to produce a structured plan summary
  • Shares context budget with Explore but tuned for strategy as well as discovery

Best for

  • Tasks with more than two steps
  • Refactors where you want approval before edits
  • Anyone who treats agent output as "code review in reverse"

Pricing

  • Free, ships with Claude Code

Pros

Cons

  • Only fires inside plan mode; new users miss it entirely
  • Plan quality degrades fast on under-specified prompts

3. General-purpose, best for multi-step exploration plus edits

General-purpose is Claude Code's catch-all built-in. When the task needs both reading and writing, multiple dependent steps, or reasoning over results from earlier steps, the main agent delegates to General-purpose. It is the default heavy-lifter and the one that runs on Sonnet by default.

Most users never realize they are using a sub-agent at all. That is the point. The main conversation stays focused, the actual work happens in an isolated context, and only the final summary comes back.

Key features

  • Full tool access (Read, Write, Edit, Bash, etc.)
  • Runs on Sonnet by default
  • Used for any task that is not pure exploration
  • Returns structured summaries to the parent agent

Best for

  • Feature implementation with research phase
  • Migrations that touch many files
  • Anything where you would otherwise spin up a fresh session

Pricing

  • Free, ships with Claude Code

Pros

  • No configuration required
  • Inherits your project's CLAUDE.md context
  • Handles the long tail of "do this thing for me" prompts

Cons

  • Broad scoping means it sometimes does more than asked, so narrow the prompt
  • Less specialized than a custom agent for repeated workflows

4. code-reviewer (VoltAgent), best for opinionated quality review

The VoltAgent code-reviewer sub-agent is the most-cloned community agent in 2026. It lives in awesome-claude-code-subagents under 04-quality-security and ships a long, opinionated system prompt that walks Claude through quality, idiomatic patterns, error handling, and architectural smells. Drop it into ~/.claude/agents/code-reviewer.md and @code-reviewer works in every project.

It pairs especially well with a pre-commit hook or a "review my last diff" prompt. Where it shines is being more aggressive than the main agent about flagging real problems: overlong functions, missing error paths, leaky abstractions.

Key features

  • 200+ line system prompt covering quality dimensions
  • Project-scope or user-scope install via Markdown + YAML
  • Triggers on diff or file path
  • Returns severity-ranked findings

Best for

  • Solo devs who want a second pair of eyes
  • Teams without formal PR review
  • Pre-commit gates

Pricing

  • Free, open source (MIT)

Pros

  • More opinionated than the default agent
  • Catches issues the main agent rationalizes away
  • Easy to fork and tune for your stack

Cons

  • Default prompt is generic; needs tuning for your language to be useful
  • No built-in fix-first behavior; reports issues but does not patch them

5. security-reviewer, best for shipping with fewer holes

A security-focused sub-agent is the single highest-ROI custom agent for production code. Variants live in VoltAgent's repo and elsewhere, but the common shape is the same: a system prompt that walks Claude through OWASP categories, auth flows, secret handling, input validation, and dependency CVEs, then returns findings with severity and remediation.

This is the agent to run before merging anything that touches authentication, payment, file uploads, or external input. The main agent is often too polite about security; a dedicated reviewer is not.

Key features

  • OWASP Top 10 coverage in prompt
  • Checks for hardcoded secrets, leaky logs, insecure defaults
  • Auth flow review (session, JWT, OAuth)
  • Dependency vulnerability awareness

Best for

  • Anything user-facing
  • Fintech, healthtech, anything regulated
  • Pre-deploy audits

Pricing

  • Free, open source

Pros

  • Catches the classes of bug that ruin weekends
  • Composable with code-reviewer for a two-pass review
  • Trivial to wire into a pre-commit or CI hook

Cons

  • Will produce false positives on benign code, so read findings, do not autopatch
  • Not a replacement for a real security audit on regulated systems

6. backend-developer (VoltAgent), best for API and service work

VoltAgent's backend-developer is one of the most-downloaded specialists. It ships with prompt-level expertise in REST/GraphQL design, database schema modeling, caching, queues, and observability. You hand it a feature spec and it produces a layered implementation (routes, handlers, services, schema migrations) rather than a single file dump.

It is most useful when you are wiring a new domain (e.g., adding billing or an admin panel) and want the agent to think in services and boundaries instead of pasting code into one file.

Key features

  • REST and GraphQL patterns
  • Database schema design (Postgres, MySQL, Mongo)
  • Queue and worker patterns
  • Error handling and observability built into prompt

Best for

  • Greenfield API work
  • Adding new domains to existing services
  • Teams without a senior backend reviewer

Pricing

  • Free, open source (MIT)

Pros

  • Produces architecturally cleaner code than the default agent
  • Forces thinking about migrations and schema up front
  • Good defaults for logging and error handling

Cons

  • Opinionated; fights you if you prefer different patterns
  • Generic across stacks; tune for your specific language

7. frontend-developer (VoltAgent), best for React and accessibility

The frontend-developer counterpart lives in the same category. Its prompt is loaded with React patterns (hooks, server components, suspense), accessibility (ARIA, focus management, semantic HTML), and state management opinions. It produces component code that passes an a11y lint on first try far more often than the default agent.

If you are shipping production UI, this is one of the agents to keep in ~/.claude/agents/. Pair it with a code-reviewer invocation after the diff is ready.

Key features

  • React 19 and Next.js App Router patterns
  • Accessibility checks baked into prompt
  • Tailwind and CSS-in-JS aware
  • Component composition over inheritance

Best for

  • Production React applications
  • Accessibility-sensitive products
  • Teams without a dedicated UI engineer

Pricing

  • Free, open source

Pros

  • Genuinely improves a11y on output
  • Modern React idioms by default
  • Useful even on non-React projects for component thinking

Cons

  • React-centric; less useful for Vue, Svelte, or vanilla
  • Tailwind defaults may clash with your design system

8. devops-engineer (VoltAgent), best for pipelines and IaC

The devops-engineer sub-agent covers the work that backend and frontend devs do not love: CI/CD pipelines, Dockerfiles, Kubernetes manifests, Terraform modules, observability stacks. The prompt walks Claude through environment parity, secrets management, blue/green vs canary, and rollback design.

It is the agent to invoke when you ask "build me a deploy pipeline for this" instead of pasting the request into a fresh chat. Output quality is markedly higher than the default agent for infra files.

Key features

  • GitHub Actions, GitLab CI, CircleCI templates
  • Docker and multi-stage builds
  • Terraform and Pulumi patterns
  • Observability (OpenTelemetry, Prometheus) defaults

Best for

  • Teams without dedicated platform engineers
  • Setting up a new project's deploy pipeline
  • Standardizing infra across services

Pricing

  • Free, open source

Pros

  • Catches common pipeline mistakes (no caching, no parallelism, no secrets scoping)
  • Produces complete configs, not snippets
  • Pairs well with security-reviewer for secrets review

Cons

  • Cloud-agnostic by default; needs steering for AWS vs GCP vs Azure specifics
  • Manifests still need a human eyeball before they hit prod

9. prompt-engineer, best for refining other sub-agents

A prompt-engineer sub-agent is the meta-agent: its job is to write and refine the system prompts of other agents. You describe the agent you want, it produces a tight, scoped system prompt with clear constraints, examples, and tool list. Then you save the output as a new .md file in ~/.claude/agents/.

This is how power users compound. Instead of hand-writing every sub-agent, you ask @prompt-engineer to draft a migration-runner or a db-reviewer and iterate. It is also useful for tightening existing agents that have drifted.

Key features

  • Writes YAML frontmatter and Markdown body
  • Suggests tool scoping
  • Includes few-shot examples in output
  • Produces files that drop straight into .claude/agents/

Best for

  • Teams maintaining 5+ custom sub-agents
  • Anyone iterating fast on agent design
  • New Claude Code users learning the agent format

Pricing

  • Free, open source variants available

Pros

  • Massively shortens "build a new agent" loop
  • Output is consistent and well-structured
  • Teaches good agent-design patterns by example

Cons

  • Output still needs human review for tool scoping
  • Tends toward verbose system prompts, so trim them

10. test-automator, best for diff-aware test generation

A test-automator sub-agent generates and maintains tests for the code you just changed. The good ones look at the diff (or the files you point them at), produce unit, integration, and where relevant end-to-end tests, and explicitly call out coverage gaps. The best variants ship with prompts for Jest, Vitest, Pytest, Go test, and Playwright.

The reason this lands in a top-10 list: most teams skip tests when they let an agent write code. A dedicated test sub-agent makes that less painful. Invoke @test-automator after each feature and you ship with real coverage instead of "I'll add tests later."

Key features

  • Diff-aware test generation
  • Multi-framework support
  • Edge case and error path enumeration
  • Coverage gap reporting

Best for

  • Solo devs who skip tests
  • Teams retrofitting tests onto legacy code
  • Anyone using TDD with an agent

Pricing

  • Free, open source

Pros

  • Closes the biggest hole in agent-written code
  • Forces explicit edge case thinking
  • Output is usually runnable on first try

Cons

  • Cannot replace integration tests against real infra
  • Will happily generate brittle tests if the prompt is loose

How to choose the best Claude Code sub-agents for your workflow

1) Should I start with built-ins or custom sub-agents?

Start with built-ins. Explore, Plan, and General-purpose cover the 80% case and require zero setup. If you do nothing else, just learn when each one fires (Explore on read-only questions, Plan in plan mode, General-purpose for everything else) and you will save half your tokens.

Only add custom sub-agents once you find yourself writing the same prompt twice. That is the signal that the work has a shape worth scoping. Read our breakdown of Claude Code skills for a related pattern.

2) Project scope vs user scope: where should agents live?

User scope (~/.claude/agents/) is the right home for agents you use across every project: code-reviewer, security-reviewer, prompt-engineer. Project scope (.claude/agents/) is for agents tied to a specific stack: a react-19-component-builder for your Next.js app, a prisma-migrator for your data layer. Commit project-scope agents to git so the team shares them.

3) How do I avoid sub-agent sprawl?

Three rules. First, kill any sub-agent you have not invoked in the last 30 days. Second, never duplicate scope between two agents; if code-reviewer and quality-reviewer overlap, pick one. Third, prefer one well-tuned sub-agent over five generic ones. If you want a starting template, look at our Claude Code GitHub repos roundup for vetted examples.

4) When do I bring in outside help?

When the agent setup itself becomes the bottleneck. Teams hit this around month two: they have 15 sub-agents, three of them conflict, nobody owns the CLAUDE.md, and shipping slows down. A Claude Code agency audits the stack, prunes dead agents, writes a tight CLAUDE.md, and hands back a setup the team actually maintains.

Build a Claude Code setup that compounds

Sub-agents are leverage. Used well, they cut your token spend, sharpen your output, and let you ship faster. Used badly, they pile up as half-baked prompt files nobody invokes. AY Automate builds production Claude Code setups for teams that want the leverage without the cleanup work. We design the agents, write the CLAUDE.md, wire the hooks, and hand back a repo your team can actually maintain. See our Claude Code agency service, the related Claude Code skills roundup, or book a consultation to talk through your setup.

FAQ

What is a Claude Code sub-agent?

A sub-agent is a scoped Claude instance with its own context window, system prompt, tool list, and model. The main Claude Code agent delegates work to sub-agents to keep its own context clean and to route specialized tasks to specialized prompts. Sub-agents are defined as Markdown files with YAML frontmatter in .claude/agents/ (project) or ~/.claude/agents/ (user).

How is a sub-agent different from a skill?

A skill is a static knowledge pack the agent loads when relevant: instructions, examples, references. A sub-agent is a runtime entity with its own context and tool scoping. Skills inform Claude; sub-agents act on behalf of Claude. Many production setups use both: skills give context, sub-agents do the work.

How do I verify a sub-agent is doing what I want?

Watch the tool calls. Claude Code logs every sub-agent invocation with its tool list and final return. If a sub-agent is over-scoped (e.g., a "reviewer" with Write access), tighten its tool list in the YAML frontmatter. If it never gets invoked, your trigger description in the frontmatter is too vague.

How much do sub-agents cost in 2026?

The agents themselves are free; they are just Markdown files. The cost is in tokens. Sub-agents running on Haiku (like Explore) are cheap. Sub-agents running on Sonnet or Opus cost what those models cost. Custom contracts apply to enterprise plans only.

How long does it take to build a custom sub-agent?

A first draft takes 10 minutes if you use a prompt-engineer sub-agent or copy from VoltAgent's repo. Tuning takes longer; most teams iterate on a custom agent for a week or two before it earns a permanent slot.

Are community sub-agent collections safe to use?

The popular ones (VoltAgent, navin4078, GetBindu) are Markdown only, with no executable code, so the risk is low. Read the system prompt before you install. Watch for agents with overly broad tool access (Write, Edit, and Bash all together with no scoping).

Should I use sub-agents or write everything in CLAUDE.md?

Both. CLAUDE.md is the always-loaded context every session inherits. Sub-agents are isolation; they keep specific workflows out of the main context. Use CLAUDE.md for project rules, architecture, conventions. Use sub-agents for repeatable workflows you do not want polluting the main agent.

Can sub-agents train my internal team?

Indirectly, yes. A well-written sub-agent system prompt encodes how a senior engineer would approach a task. Junior engineers reading the prompt learn the same heuristics. Several teams we work with treat their .claude/agents/ folder as live onboarding material.

Book a Free Strategy Call

Building this in production?

Walid runs a 30-min call to map your AI engineering team. Free, no slides.

Free weekly brief

Steal our production automations

The exact n8n flows, Claude Code setups, and prompts we ship for clients, broken down step by step. No spam, unsubscribe anytime.

Share this article
About the Author
Robel
Robel
AI Engineer

Robel engineers production-grade automation pipelines at AY Automate, focused on integrations, reliability, and the systems that keep client workflows running.