Overview
Define a few Claude Code subagents with distinct React roles and limited tools, give each a bounded task, and review their results before anything is merged.
Problem or Objective
- Which agents build a non-trivial feature with you?
- How do teams design the context, tools and memory of their own AI agents?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code · React
- Prerequisites
- Claude Code and a React project under version control. Subagents share your usage limits; check what your plan allows.
How It Works
Work on a new branch of your React project. Create project subagents as Markdown files with YAML frontmatter under .claude/agents/, for example one for components, one for tests and one for accessibility review, each with a short prompt, a tools list and a permission mode. Start the main conversation in Manual mode, because other modes can override what a subagent sets. Give the main session a task list that names the files each subagent may touch and what it must report back. Let them work, answer permission prompts as they appear, then run the build and tests yourself, read the whole diff, and commit or merge only after you approve it.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code.
- Connect the toolsConnect the tools this workflow relies on: Claude Code, React.
- Check the prerequisitesClaude Code and a React project under version control. Subagents share your usage limits; check what your plan allows.
- Gather your detailsCollect what the prompt asks for: Working branch, Change to deliver, Command that verifies the work.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Split a React task across subagents
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
In this React repository, on branch [Working branch], deliver [Change to deliver]. First propose which subagents you will use, the files each may change, the tools each needs and what each must report, and wait for my approval. Then delegate. No subagent may install packages, commit, push or deploy without my approval. When they finish, run [Command that verifies the work], summarise every changed file and list anything unfinished or failing. Do not merge.Approve the delegation plan, answer permission prompts as they appear in Manual mode, and approve any commit or merge only after reading the diff.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The subagents page documents specialized assistants with their own context, prompt, tool access and permission rules, and the overview documents Claude Code editing files and running commands. Neither shows that splitting React work this way is faster or better. Top 200 Repos did not run it.
Limitations and Considerations
The page says subagent requests count toward the same usage limits as your main conversation, so start with two or three and watch consumption. It also says that when the main conversation is in bypassPermissions, acceptEdits or auto mode, a subagent runs in that mode and its own permission setting is ignored. Two subagents editing the same file can undo each other, so keep their file lists apart. Keep credentials out of prompts and test data. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Visit Website (opens in a new tab)code.claude.com
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Create custom subagents - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 2 Dec 2026, 16:07 UTC
What this source supports
- Subagents are specialized AI assistants that handle specific types of tasks.
- Each subagent runs in its own context window with a custom system prompt, specific tool access, and your permission rules.
- Subagents are Markdown files with YAML frontmatter.
- It also sends its own requests, which count toward the same usage limits as your main conversation.
- When the main conversation is in bypassPermissions, acceptEdits, or auto mode, your subagent runs in that same mode and Claude Code ignores the permissionMode you set.
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 2 Dec 2026, 13:21 UTC
What this source supports
- Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.

