The Claude Code Subagent Collection is an open source project that provides a series of AI subagents designed specifically for Claude Code, designed to enhance the development workflow by bringing in experts with specific domain knowledge. This collection contains multiple subagents, each with expertise in a specific domain, which can be invoked automatically based on context or explicitly specified by the user when needed. These sub-agents cover multiple aspects of software development, including back-end architecture design, front-end development, database optimization, code review, security auditing, and specialized support for multiple programming languages. By delegating tasks to the most appropriate expert agents, developers can solve complex problems more efficiently and improve code quality and development speed. The program not only provides pre-defined sub-agents, but also allows users to create and contribute new sub-agents based on their needs, resulting in an ever-expanding and improved ecosystem of development tools.
Function List
- automatic calling: Claude Code is able to automatically select and invoke the most appropriate subagent based on task requirements, keywords, file types or error messages.
- explicit call: Users can explicitly request the use of a specific subagent for a task through natural language instructions, such as "use the
code-reviewer
Check my recent changes." - domain expert: Provide sub-agents covering multiple technology areas, including but not limited to:
- Development & ArchitectureAs
backend-architect
(Backend Architect),frontend-developer
(Front-end developer),mobile-developer
(mobile developers), etc. - programming language specialistAs
python-pro
(Python expert),golang-pro
(Go Expert),rust-pro
(Rust experts), etc. - Infrastructure and operations and maintenanceAs
devops-troubleshooter
(O&M Problem Troubleshooting Specialist),deployment-engineer
(Deployment Engineer),cloud-architect
(Cloud Architect), etc. - Quality and SafetyAs
code-reviewer
(Code Examiner),security-auditor
(Security Auditor),test-automator
(Test Automation Engineer), etc. - Data and AIAs
data-scientist
(Data Scientist),ai-engineer
(AI Engineer),ml-engineer
(Machine Learning Engineer), etc. - field-specificAs
api-documenter
(API Documentation Writer),payment-integration
(Payment Integration Specialist),blockchain-developer
(blockchain developers), etc. - cryptocurrency trading: Provided
crypto-trader
(Cryptocurrency trader),defi-strategist
(DeFi Strategist) and a host of other experts.
- Development & ArchitectureAs
- scalability: Users can create their own subagents in a specified format to meet specific project requirements and can contribute new subagents to that project.
- Simple installation and configuration: Simply clone the repository locally, and subagent the
.md
The installation is completed by copying the files to the specified directory in Claude Code.
Using Help
The core of this project is to extend the capabilities of Claude Code, transforming it from a general-purpose AI assistant to a synergistic team of multiple experts. Each sub-agent is a separate profile (in Markdown format) which defines the role, expertise and behavior of that agent. When a user interacts with Claude Code, the system intelligently determines which expert is best suited to handle the task at hand, and then delegates the task to it.
Installation process
- pre-conditions::
- You need to have Claude Code installed and configured locally.
- You need to be able to access the directory that holds the Claude Code agent configuration file, usually the
~/.claude/agents/
The
- clone warehouse::
Open a terminal or command line tool and use thegit
command to clone the project's code repository:git clone https://github.com/davepoon/claude-code-subagents-collection.git
- Go to the project directory::
cd claude-code-subagents-collection
- Copying sub-proxy files::
Set all subagent profiles (.md
files) copied to Claude Code's agent directory. Depending on your operating system, use the appropriate command below:- macOS/Linux:
cp *.md ~/.claude/agents/
- Windows (computer):
copy *.md %USERPROFILE%\.claude\agents\
- macOS/Linux:
- Verify Installation::
You can verify that the files have been successfully copied by listing the files in the proxy directory:ls ~/.claude/agents/
Or on Windows use the
dir %USERPROFILE%\.claude\agents\
. You should be able to see all the copied past.md
Documentation. - Restart Claude Code::
In order for Claude Code to load these new subagents, you need to restart it.
Operating Methods
Once installed, you can utilize these subagents in your daily development. There are two main ways to use them:
1. Automatic calls
This is the most common and convenient way to use it. You just need to present your requirements to Claude Code as usual, and it will automatically choose the most suitable subagent to perform the task based on your description.
- Sample Scenarios::
- When you're done writing a new user authentication feature, you simply tell Claude: "I just implemented the user authentication feature".Claude will detect that this is new code and may automatically call the
code-reviewer
to review the code for quality and maintainability while calling thesecurity-auditor
to check for security vulnerabilities. - If you encounter an error when running your code, such as "My React component is throwing a
TypeError
", Claude will automatically call thedebugger
to help you analyze and pinpoint the problem. - When you notice that a particular database query is slow, you can say, "This query is running slowly." claude will call the
database-optimizer
to analyze the query statement and give optimization suggestions.
- When you're done writing a new user authentication feature, you simply tell Claude: "I just implemented the user authentication feature".Claude will detect that this is new code and may automatically call the
2. Explicit calls
In some cases, you may want to directly assign an expert to a specific task. In this case, you can specify the subagent to be used when you ask the question.
- Sample Scenarios::
- Code review: "Let
code-reviewer
Check my most recent submission." - security audit: "Please
security-auditor
Review this authentication code." - performance optimization: "Let
performance-engineer
to optimize this function."
- Code review: "Let
Create your own subagent
If you feel that an existing subagent doesn't meet your needs, you can absolutely create your own.
- Creating Documents::
In your project directory or~/.claude/agents/
directory, create a new Markdown file, the name of which should beyour-agent-name.md
For examplemy-database-expert.md
The - Writing configuration files::
The contents of the file need to follow a specific format, containing afrontmatter
header and a system prompt.--- name: your-subagent-name description: A clear description of when this subagent should be invoked. tools: tool1, tool2 # 可选,限制该代理能使用的工具 --- This is the system prompt. You are a helpful assistant specializing in...
name
: A unique identifier for the subagent, using lowercase letters and hyphens.description
: Clearly describing the purpose of this subagent is a key basis for Claude to make automated calls.tools
(Optional): Specifies the tools this agent can use, such as reading and writing files.- System Prompt: Define in detail the role, capabilities, acting style and expertise of this agent. You should provide specific instructions and examples of how it should act here.
application scenario
- New Feature Development
When a team starts developing a new feature, multiple subagents can be used sequentially or in parallel. First, it is possible to invoke thebackend-architect
to design the API interface and data model. Then, let thefrontend-developer
Realize the front-end interface based on the design draft. During the development process, feel free to askcode-reviewer
The code is reviewed and finally thetest-automator
Create automated test cases to ensure stable functionality. - System Performance Optimization
When there is a performance bottleneck in the online application, you can use theperformance-engineer
to locate performance issues in the code. If the problem is in the database, you can further use thedatabase-optimizer
to analyze slow queries and optimize indexes. In case of misallocation of cloud resources, thecloud-architect
Cost and performance optimization recommendations can be provided. - Emergency troubleshooting
In the event of an emergency problem in the production environmentdevops-troubleshooter
It can help analyze logs, monitor data, and quickly locate the root cause of the problem. If it is found to be a bug in the code, thedebugger
Can assist developers to dive into the code for debugging and fixing. - Modernization of legacy systems
For older programs.legacy-modernizer
Can provide refactoring solutions to help developers gradually migrate outdated codebases to modern technology stacks. It can analyze the existing code structure, suggest improvements and generate partially refactored code.
QA
- Q: How are these subagents called by Claude Code?
A: There are two types of invocation. The first is automatic invocation, Claude Code will intelligently determine which sub-proxy should be used based on your request content, context, file type and other information. For example, when you mention "database query", it may automatically invoke thedatabase-optimizer
. The second is an explicit call, which you can specify directly in the request, e.g., "Let thesecurity-auditor
Check this code." - Q: If I install multiple sub-agents with similar functionality, how will Claude choose?
A: The selection of Claude relies heavily on the subagent configuration file in thedescription
Fields. The clearer and more specific the description, the more accurately Claude will be able to select the most appropriate agent. If the description is too vague or overlapping, it may result in an inaccurate selection. Therefore, it is important to write clear descriptions for customized subagents. - Q: Can I combine the use of multiple subagents to accomplish a complex task?
A: Yes, this is the power of Claude Code.Claude can automatically program multiple sub-agents to work together. For example, a complete development process might be:backend-architect
Design Architecture ->python-pro
Write code ->code-reviewer
Review code ->security-auditor
Conducting security inspections ->deployment-engineer
Responsible for deployment. The whole process can be automatically coordinated by Claude in the background.