中文 | English
A powerful bash script tool for generating specialized Claude Code sub-agent configurations. This tool helps you quickly create custom AI agents tailored for specific development tasks.
- Quick Setup: Generate sub-agent configurations in seconds
- Rich Templates: 11 pre-built professional agent templates
- Task-Specific: Each agent is optimized for specific development tasks
- Bilingual Support: Available in English and Chinese versions
- Customizable: Easy to modify and extend templates
- Flexible Scope: Support for both local and global agents
- Bash shell (version 4.0+)
- Claude Code installed and configured
- macOS, Linux, or Windows with WSL
- Clone the repository:
git clone https://github.com/Carpe-Wang/claude-subagents.git
cd claude-subagents- Make scripts executable:
chmod +x claude-subagent.sh claude-subagent-cn.sh- (Optional) Add to PATH:
echo 'export PATH="$PATH:'$(pwd)'"' >> ~/.bashrc
source ~/.bashrc# English version
./claude-subagent.sh -i
# Chinese version
./claude-subagent-cn.sh -i# Create a code reviewer agent
./claude-subagent.sh -t code_reviewer -n my-reviewer
# Create a global test generator agent
./claude-subagent.sh -t test_generator -n tester -g
# List all available templates
./claude-subagent.sh -l| Option | Description |
|---|---|
-h, --help |
Show help message |
-l, --list |
List all available agent templates |
-t, --template |
Specify template type |
-n, --name |
Specify agent name |
-g, --global |
Create global agent (default: local) |
-i, --interactive |
Interactive agent creation |
Professional code review specialist analyzing code quality, security, and best practices.
Test case generation expert creating comprehensive test coverage.
Technical documentation writer creating clear project documentation.
Security vulnerability analyst identifying and assessing security risks.
Performance optimization expert analyzing system bottlenecks.
API design specialist for RESTful and GraphQL APIs.
Database design and optimization expert.
DevOps expert optimizing CI/CD processes and infrastructure.
Frontend development expert optimizing UI/UX.
Backend development expert designing server-side architecture.
Markdown document generator creating well-structured documentation.
Custom template for creating your own specialized agents.
Agents are created as Markdown files with YAML frontmatter:
---
name: agent-name
description: Agent description with PROACTIVELY keyword
tools:
- str_replace_editor
- bash
---
# Agent Title
Agent instructions and guidelines...- Local agents:
.claude/agents/(project-specific) - Global agents:
~/.claude/agents/(available across all projects)
- Use the custom template as a starting point:
./claude-subagent.sh -t custom -n my-custom-agent- Edit the generated configuration file
- Customize the agent's:
- Description
- Core responsibilities
- Tools access
- Working principles
- Output formats
Once created, agents can be invoked in Claude Code by:
- Using
@agent-namein conversations - Claude automatically selecting appropriate agents
- Manual invocation through the interface
$ ./claude-subagent.sh -i
>� Claude Code Sub-Agent Scaffold Generator
Available Agent Templates:
1. code_reviewer - Code review specialist
...
Please select template type (1-11): 1
Please enter agent name: my-reviewer
Please select agent scope:
1. Local project (.claude/agents/)
2. Global (~/.claude/agents/)
Please select (1-2): 1
� Agent configuration file created: .claude/agents/my-reviewer.md
� Agent created successfully!# Create a performance optimizer for current project
./claude-subagent.sh -t performance_optimizer -n perf-expert
# Create a global API designer
./claude-subagent.sh -t api_designer -n api-expert -gContributions are welcome! Feel free to:
- Add new agent templates
- Improve existing templates
- Report bugs or issues
- Suggest enhancements
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Generated with markdown_generator subagent from claude-subagent.sh