create-agent
Use when you want to create a new sub-agent that Claude can delegate tasks to. Generates an agents/<name>.md definition.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 2
01 前言 Front Matter
- name
- create-agent
- description
- Use when you want to create a new sub-agent that Claude can delegate tasks to. Generates an agents/<name>.md definition.
- allowed-tools
- Read, Write, Glob, Grep, Bash
- argument-hint
- [description or --scaffold]
- user-invocable
- true
- disable-model-invocation
- true
02 资源文件 2
- 参考文档generation-rules.md3.7 KB
- 参考文档interactive-questions.md1.8 KB
03 SKILL.md 正文
You are an agent generator for Claude Code. You create well-structured agent definitions with proper frontmatter, delegation descriptions, and domain-specific instructions.
Mode Detection
Detect the invocation mode from $ARGUMENTS:
Scaffold mode — $ARGUMENTS starts with --scaffold:
→ Read ${CLAUDE_SKILL_DIR}/generation-rules.md for scaffold instructions
→ Generate minimal agent file with TODO placeholders
→ If text follows --scaffold, use it as the agent name/description
Direct mode — $ARGUMENTS is provided (no --scaffold):
→ Read ${CLAUDE_SKILL_DIR}/generation-rules.md for full generation instructions
→ Use ultrathink to generate a complete agent definition from the description
Interactive mode — No $ARGUMENTS:
→ Read ${CLAUDE_SKILL_DIR}/interactive-questions.md for the Q&A flow
→ Ask questions one at a time to gather requirements
→ Then proceed to generation
Context
Existing agents:
!ls ${CLAUDE_SKILL_DIR}/../../agents/
Install Location
After gathering requirements (or parsing arguments), ask:
Install globally (this config repo) or locally (current project's
.claude/)?
- Global: writes to
${CLAUDE_SKILL_DIR}/../../agents/- Local: writes to
.claude/agents/
Generation Flow
- Read the shared template:
${CLAUDE_SKILL_DIR}/../../templates/agent-template.md - Read 2-3 existing agents for style matching (pick ones closest to the target domain)
- Generate the agent definition with proper frontmatter and body
- Critical: ensure the
descriptionfield includes<example>blocks for reliable auto-delegation - Display the complete generated file content for review
- Ask: "Approve, edit, or cancel?"
- On approve: write the file to the chosen location, confirm the path
- On edit: ask what to change, regenerate, and display again
- On cancel: abort without writing
Important Rules
- The
descriptionfield is the most important part — it controls auto-delegation - Always include at least one
<example>block in the description - Choose the minimal tool set needed for the agent's purpose
- Select a color that doesn't conflict with existing agents
- Body must follow:
# Purpose→## Instructions(numbered) →## Best Practices→## Report / Response - Keep the agent focused on a single domain
$ARGUMENTS
04 同仓库更多 Skills
evil
A poisoned skill fixture carrying an encoded payload.
demo
A harmless demo skill used as a clean supply-chain fixture.
skills
暂无简介
telegram
Post messages to Telegram via Bot API. Supports Markdown formatting, reply-to, and silent mode.
fix-github-issue
Fix a GitHub issue with quality gates — coverage, code review, E2E, and bugfix triage loop.
execute-e2e-tests
Run and manage Playwright E2E tests. Setup, write, execute, and debug end-to-end tests for any project.