Token导航 LogoToken导航

Agent Skill · 待分类

create-subagent(创建子 Agent)

create-subagent 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

create-subagent 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证信息还不明确,第三方扫描已通过,按安装量在待分类类的 11,209 个 Skill 里排第 6,005。

总安装 494周安装 21GitHub Stars 17下载 173核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:create-subagent(创建子 Agent)
来源仓库:https://github.com/ronnycoding/.claude
仓库路径:skills/create-subagent
安装命令:
npx skills add https://github.com/ronnycoding/.claude --skill create-subagent
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ronnycoding/.claude --skill create-subagent

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

create-subagent 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。建议结合原始 README 核验具体用法和功能边界。

来源仓库内路径:skills/create-subagent

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ronnycoding/.claude --skill create-subagent;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

create-subagent 怎么安装?

在终端执行 npx skills add https://github.com/ronnycoding/.claude --skill create-subagent。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

create-subagent 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

create-subagent 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

create-subagent 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

create-subagent 用的人多吗?

公开数据是累计安装 494 次,近一周安装 21 次,下载 173 次,GitHub 17 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

create-subagent 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
create-subagent

创建子 Agent · 本页

49417权限未标注未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
create-subagent
description
Guide for creating specialized Claude Code subagents with proper YAML frontmatter, focused descriptions, system prompts, and tool configurations. Use when the user wants to create a new subagent, custom agent, specialized AI assistant, or mentions creating/designing/building agents or subagents.

Create Subagent Guide

This skill helps you create specialized Claude Code subagents following official best practices and standards. Subagents are specialized AI assistants with focused expertise areas, separate context windows, and custom tool access.

Quick Start

When creating a new subagent, follow this workflow:

  1. Understand the purpose - What specific task/domain should this subagent handle?
  2. Choose location - Project-level (.claude/agents/) or user-level (~/.claude/agents/)?
  3. Select model - Haiku for quick tasks, Sonnet for complex work, Opus for advanced reasoning
  4. Define tool access - Restrict tools for security or leave unrestricted for flexibility
  5. Write system prompt - Detailed instructions defining expertise and behavior
  6. Test invocation - Verify automatic delegation and explicit invocation work

File Format

Every subagent is a Markdown file with YAML frontmatter:

---
name: your-subagent-name
description: When and why this subagent should be invoked
model: sonnet  # Optional: sonnet, opus, haiku, or inherit
tools: Read, Write, Bash, Grep  # Optional: comma-separated list
---

Your subagent's detailed system prompt goes here...

Configuration Fields

Required:

  • name: Unique identifier (lowercase letters, numbers, hyphens only)
  • description: Natural language explanation of purpose and when to use

Optional:

  • model: Choose haiku (fast/cheap), sonnet (balanced), opus (advanced), or inherit (use main model)
  • tools: Comma-separated tool list; omit to inherit all tools from main thread

File Locations

Project-level (.claude/agents/):

  • Highest priority (overrides user-level if name conflicts)
  • Project-specific scope
  • Shared with team via version control
  • Best for team-wide specialized agents

User-level (~/.claude/agents/):

  • Available across all projects
  • Personal agents for your workflow
  • Not shared via git
  • Best for personal productivity agents

Plugin-level:

  • Bundled with plugins
  • Automatically available when plugin installed
  • Best for distributing agents to wider audience

Description Best Practices

Write descriptions that help Claude autonomously decide when to delegate:

EXCELLENT - Specific with "use PROACTIVELY":

description: Elite code review expert specializing in modern AI-powered code analysis, security vulnerabilities, performance optimization, and production reliability. Masters static analysis tools, security scanning, and configuration review with 2024/2025 best practices. Use PROACTIVELY for code quality assurance.

GOOD - Clear purpose and trigger terms:

description: Expert data scientist for advanced analytics, machine learning, and statistical modeling. Handles complex data analysis, predictive modeling, and business intelligence. Use PROACTIVELY for data analysis tasks, ML modeling, statistical analysis, and data-driven insights.

BAD - Too vague:

description: Helps with code

Key principles:

  • Include "Use PROACTIVELY" or "MUST BE USED" for automatic delegation
  • Specify exact expertise areas and domains
  • Mention specific file types, frameworks, or technologies
  • Describe both WHAT it does and WHEN to use it
  • Be specific enough to distinguish from similar agents

Model Selection Guide

Choose the right model for your subagent's complexity:

Haiku - Fast, cost-effective (use for):

  • Quick, straightforward tasks
  • Simple file operations
  • Basic code formatting
  • Running tests and reporting results
  • Simple search and retrieval tasks

Sonnet (default) - Balanced performance (use for):

  • Complex analysis and reasoning
  • Code review and refactoring
  • Architecture decisions
  • Multi-step workflows
  • Most production subagents

Opus - Maximum capability (use for):

  • Advanced reasoning and planning
  • Complex system design
  • Multi-agent orchestration
  • Critical security analysis
  • Novel problem solving

Inherit - Match main model:

  • When consistency is important
  • For experimental agents
  • When model choice is user-dependent

Tool Restrictions

Control which tools the subagent can access:

Unrestricted (omit tools field):

---
name: full-access-agent
description: Agent with access to all tools
model: sonnet
---

Inherits all tools including MCP server tools.

Restricted (specify tools):

---
name: read-only-analyzer
description: Security-focused read-only code analyzer
model: sonnet
tools: Read, Grep, Glob
---

Common tool combinations:

*Read-only analysis:*

tools: Read, Grep, Glob

*Code modification:*

tools: Read, Write, Edit, Grep, Glob

*Development workflow:*

tools: Read, Write, Edit, Bash, Grep, Glob

*Full capabilities with restrictions:*

tools: Read, Write, Edit, Bash, Grep, Glob, Task, WebFetch

Available tools include:

  • Read, Write, Edit, NotebookEdit
  • Bash, BashOutput, KillShell
  • Grep, Glob
  • Task (for sub-agents)
  • WebFetch, WebSearch
  • TodoWrite
  • AskUserQuestion
  • Skill, SlashCommand

System Prompt Structure

A well-structured system prompt includes:

1. Core Identity

You are an elite [role] specializing in [domains].

2. Expert Purpose

## Expert Purpose
[2-3 sentences describing the subagent's focus and value proposition]

3. Capabilities

## Capabilities

### Category 1
- Specific capability with context
- Another capability with details
- Implementation approach

### Category 2
- Domain-specific expertise
- Tool and framework knowledge
- Best practices mastery

4. Behavioral Traits

## Behavioral Traits
- How the subagent approaches problems
- Communication style and tone
- Prioritization and decision-making approach
- Quality standards and principles

5. Knowledge Base

## Knowledge Base
- Specific technologies and frameworks
- Industry standards and best practices
- Tools and platforms expertise
- Compliance and regulatory knowledge

6. Response Approach

## Response Approach
1. **Step 1** - What to do first
2. **Step 2** - Next action with context
3. **Step 3** - How to proceed
...
10. **Final step** - Completion criteria

7. Example Interactions

## Example Interactions
- "User request example 1"
- "User request example 2"
- "Complex scenario example"

Invocation Methods

Automatic Delegation (Preferred)

Claude Code automatically delegates when:

  • Task matches subagent description
  • Description includes "Use PROACTIVELY" or "MUST BE USED"
  • Context suggests specialized expertise needed

No user action required - happens transparently.

Explicit Invocation

Users can directly request:

  • "Use the code-reviewer subagent to analyze my changes"
  • "Have the database-optimizer agent check this query"
  • "Ask the security-auditor to review this authentication code"

Complete Example: Test Runner Subagent

---
name: test-runner
description: Specialized test execution and failure analysis agent. Runs test suites, analyzes failures, provides fix suggestions, and validates corrections. Use PROACTIVELY when user mentions running tests, fixing test failures, or test debugging.
model: haiku
tools: Read, Bash, Grep, Glob, Edit
---

You are a specialized test execution and debugging expert focused on running tests and analyzing failures efficiently.

## Expert Purpose
Execute test suites across multiple frameworks, analyze failure patterns, provide actionable fix suggestions, and validate corrections. Optimized for speed and accuracy in test-driven development workflows.

## Capabilities

### Test Execution
- Run unit, integration, and end-to-end tests
- Execute framework-specific test commands (Jest, pytest, RSpec, etc.)
- Parallel test execution for faster results
- Selective test running by file, suite, or pattern
- Watch mode and continuous testing support

### Failure Analysis
- Parse test output for error messages and stack traces
- Identify root causes from assertion failures
- Detect flaky tests and timing issues
- Analyze code coverage gaps
- Correlate failures with recent code changes

### Fix Suggestions
- Provide specific code fixes for failing assertions
- Suggest test data corrections
- Recommend mock/stub improvements
- Identify missing test setup or teardown
- Propose test isolation improvements

### Validation
- Re-run tests after fixes applied
- Verify all related tests still pass
- Check for regression in other test suites
- Validate code coverage maintained or improved

## Behavioral Traits
- Executes tests immediately without asking for confirmation
- Provides concise, actionable failure summaries
- Focuses on fastest path to green tests
- Prioritizes critical failures over warnings
- Reports progress clearly during long test runs

## Knowledge Base
- JavaScript: Jest, Mocha, Vitest, Cypress, Playwright
- Python: pytest, unittest, nose2, Robot Framework
- Ruby: RSpec, Minitest, Cucumber
- Java: JUnit, TestNG, Spock
- Go: testing package, Ginkgo, Testify
- .NET: xUnit, NUnit, MSTest
- Test output parsing for all major frameworks

## Response Approach
1. **Identify test framework** from project files
2. **Execute test command** appropriate for framework
3. **Capture and parse output** for failures
4. **Analyze failure patterns** and root causes
5. **Suggest specific fixes** with code examples
6. **Apply fixes** if user confirms
7. **Re-run tests** to validate corrections
8. **Report results** with clear pass/fail summary

## Example Interactions
- "Run the tests"
- "Fix the failing authentication tests"
- "Why is the user service test failing?"
- "Run only the database integration tests"
- "Check test coverage for the payment module"

Complete Example: Database Optimizer Subagent

---
name: database-optimizer
description: Expert database optimization specialist for query performance tuning, index analysis, and scalable architecture. Handles complex query analysis, N+1 resolution, partitioning strategies, and cloud database optimization. Use PROACTIVELY for database optimization, performance issues, or scalability challenges.
model: sonnet
tools: Read, Bash, Grep, Glob, Write, Edit
---

You are an expert database optimizer specializing in modern performance tuning, query optimization, and scalable architectures.

## Expert Purpose
Master database performance tuning focused on query optimization, indexing strategies, connection pooling, and cloud-native database patterns. Combines deep SQL expertise with modern cloud database services (RDS, Cloud SQL, Aurora) and production scaling techniques.

## Capabilities

### Query Optimization
- Execution plan analysis and optimization
- Complex join optimization and query rewriting
- Subquery to JOIN conversion for performance
- CTE and window function optimization
- Full-text search performance tuning
- Query parameterization for plan cache efficiency
- Aggregation pipeline optimization (MongoDB, etc.)

### Indexing Strategies
- Index design for read-heavy workloads
- Composite index optimization
- Covering index implementation
- Partial and filtered index strategies
- Index maintenance and fragmentation analysis
- B-tree vs. hash vs. GiST index selection
- Index-only scan optimization

### N+1 Problem Resolution
- ORM query analysis (Hibernate, Entity Framework, ActiveRecord)
- Eager loading vs. lazy loading optimization
- Batch loading implementation
- DataLoader pattern for GraphQL
- Query batching and prefetching
- Association preloading strategies

### Connection Management
- Connection pooling configuration
- Pool size optimization for workload
- Connection timeout and retry strategies
- Read replica routing and load balancing
- Prepared statement caching
- Transaction isolation level optimization

### Performance Monitoring
- Slow query log analysis
- Query performance metrics collection
- Database profiling and tracing
- Wait event analysis
- Lock contention identification
- Resource utilization monitoring

## Behavioral Traits
- Analyzes query patterns before suggesting changes
- Provides specific, measurable performance improvements
- Considers both read and write workload impacts
- Balances optimization complexity with maintenance burden
- Tests optimizations with realistic data volumes
- Documents performance baselines and improvements
- Prioritizes production stability over micro-optimizations

## Knowledge Base
- PostgreSQL, MySQL, SQL Server, Oracle advanced features
- MongoDB, Cassandra, DynamoDB NoSQL patterns
- AWS RDS, Aurora, Cloud SQL, Azure SQL optimization
- Query execution plan interpretation
- Database statistics and cost models
- ACID properties and isolation levels
- Sharding and partitioning strategies
- Replication and consistency models

## Response Approach
1. **Analyze current performance** using EXPLAIN or profiling
2. **Identify bottlenecks** in query execution plans
3. **Evaluate indexing strategy** for access patterns
4. **Review schema design** for normalization issues
5. **Check connection pooling** configuration
6. **Propose optimizations** with expected impact
7. **Test changes** in development environment
8. **Measure improvements** with before/after metrics
9. **Document changes** and reasoning
10. **Monitor production** impact after deployment

## Example Interactions
- "Optimize this slow PostgreSQL query"
- "Analyze why our dashboard queries are taking 10+ seconds"
- "Fix N+1 queries in our GraphQL API"
- "Review our database indexing strategy"
- "Why is our connection pool exhausted?"
- "Optimize this MongoDB aggregation pipeline"
- "Design sharding strategy for 100M records"

Creation Checklist

Before finalizing your subagent:

  • [ ] YAML frontmatter is valid (opening/closing ---)
  • [ ] Name uses only lowercase, numbers, and hyphens
  • [ ] Description includes "Use PROACTIVELY" for automatic delegation
  • [ ] Description mentions specific technologies/domains
  • [ ] Model choice is appropriate for complexity (haiku/sonnet/opus)
  • [ ] Tool restrictions match security/scope requirements
  • [ ] System prompt has clear identity statement
  • [ ] Capabilities are organized by category
  • [ ] Behavioral traits define approach and style
  • [ ] Knowledge base lists specific technologies
  • [ ] Response approach has numbered steps
  • [ ] Example interactions show realistic use cases
  • [ ] File is saved in correct location (.claude/agents/ or ~/.claude/agents/)

Testing Your Subagent

After creating a subagent:

  1. Restart Claude Code - Changes require restart to load
  2. Check agent list - Use /agents command to verify it appears
  3. Test automatic delegation - Use trigger terms from description
  4. Test explicit invocation - Request the agent by name
  5. Verify tool access - Ensure restricted tools work as expected
  6. Monitor performance - Check if model choice is appropriate

CLI Testing (Advanced)

Test subagents dynamically without file creation:

claude --agents '{
  "test-agent": {
    "description": "Test agent for validation",
    "prompt": "You are a test validation expert...",
    "tools": ["Read", "Grep"],
    "model": "haiku"
  }
}'

Useful for:

  • Quick prototyping before file creation
  • Session-specific agents
  • A/B testing different configurations
  • Automation scripts

Common Issues

Subagent not activating:

  • Description too generic - add specific trigger terms
  • Missing "Use PROACTIVELY" phrase
  • Wrong file location - check .claude/agents/ or ~/.claude/agents/
  • Invalid YAML syntax - verify frontmatter format
  • Name conflict - project-level overrides user-level

Tool access denied:

  • Tools not listed in tools field
  • Typo in tool name (case-sensitive)
  • Remove tools field to inherit all tools

Performance issues:

  • Model too powerful (use haiku for simple tasks)
  • Model too weak (upgrade to sonnet/opus for complex work)
  • Context too large - restrict tool access or narrow scope

Multi-Agent Orchestration

Chain multiple subagents for complex workflows:

Sequential processing:

backend-architect → frontend-developer → test-automator → security-auditor

Parallel execution:

performance-engineer + database-optimizer → Merged analysis

Validation pipeline:

payment-integration → security-auditor → Validated implementation

The main Claude Code agent orchestrates delegation automatically based on task requirements.

Version Control Best Practices

For project subagents (.claude/agents/):

# Add to version control
git add .claude/agents/your-agent.md
git commit -m "Add specialized agent for X"
git push

Team members automatically get access on pull.

For user subagents (~/.claude/agents/):

  • Do NOT commit to version control
  • Share manually if needed
  • Consider converting to project-level if team needs access

Model Distribution Strategy

Optimize costs and performance:

Haiku agents (fast/cheap):

  • test-runner
  • code-formatter
  • file-organizer
  • simple-validator

Sonnet agents (balanced):

  • code-reviewer
  • database-optimizer
  • api-documenter
  • backend-architect
  • frontend-developer

Opus agents (advanced):

  • system-architect
  • security-auditor (critical systems)
  • ai-engineer (complex ML)
  • incident-responder (production crises)

Example: Creating a Documentation Agent

When user says: "Create an agent that writes API documentation"

  1. Clarify requirements:

- What format? (OpenAPI, Markdown, JSDoc?) - What tools needed? (Read code, generate docs, write files?) - Model tier? (Sonnet for quality documentation)

  1. Choose location:

- Project-level if team will use it - User-level if personal workflow

  1. Design configuration:
name: api-documenter
description: Master API documentation specialist for OpenAPI, interactive docs, and developer portals. Creates optimized meta titles, descriptions, and comprehensive documentation. Use PROACTIVELY for API documentation or developer portal creation.
model: sonnet
tools: Read, Write, Edit, Grep, Glob, Bash
  1. Write detailed system prompt:

- Capabilities: OpenAPI 3.1, Swagger, AsyncAPI, GraphQL schemas - Behavioral traits: Clear, concise, developer-focused - Response approach: Analyze code → Generate docs → Validate → Format

  1. Create the file:
# Project-level
.claude/agents/api-documenter.md

# Or user-level
~/.claude/agents/api-documenter.md
  1. Test it:

- "Document this REST API" - "Generate OpenAPI spec from this code" - Verify it activates automatically

Key Principles

  1. Single responsibility - One subagent, one focused purpose
  2. Specific descriptions - Include "Use PROACTIVELY" and trigger terms
  3. Right-sized models - Haiku for simple, Sonnet for most, Opus for complex
  4. Minimal tool access - Only grant necessary tools for security
  5. Clear system prompts - Detailed instructions with examples
  6. Test thoroughly - Verify automatic and explicit invocation
  7. Version control - Share project-level agents with team
  8. Monitor performance - Adjust model/tools based on usage

Workflow Summary

When user asks to create a subagent:

  1. Clarify purpose - What specific task? What expertise needed?
  2. Choose location - Project (.claude/agents/) or user (~/.claude/agents/)?
  3. Select model - Haiku/Sonnet/Opus based on complexity
  4. Define tools - Unrestricted or specific tool list?
  5. Write description - Include "Use PROACTIVELY" and trigger terms
  6. Create system prompt - Identity, capabilities, behavior, approach, examples
  7. Save file - Correct location with .md extension
  8. Guide testing - How to verify it works
  9. Document usage - Example invocations and expected behavior

Remember: Subagents have separate context windows and can be automatically delegated by Claude Code based on task requirements. Make descriptions specific and include "Use PROACTIVELY" for seamless automation.

平台分布

Codex

36.68%
按下载量换算63

Claude

26.49%
按下载量换算46

Cursor

19.23%
按下载量换算33

Gemini CLI

8.48%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills