Agent 生成器
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 claude-code
- 领域
- 设计与多媒体
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 85 / 100 · 社区维护
- 作者 / 版本 / 许可
- @agdev · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- Windows
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。;上游仓库已 190 天未更新,可能与最新 agent 行为不一致。
---
name: agent-creator
description: Expert guidance for creating effective Claude Code agents (subagents). Use when users want to cr…
category: 设计与多媒体
runtime: 无特殊运行时
---
# agent-creator 输出预览
## PART A: 任务判断
- 适用问题:视觉内容、演示材料、信息图或设计交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“About Agents / Agents vs Skills / Agent Architecture”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于视觉内容、演示材料、信息图或设计交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“About Agents / Agents vs Skills / Agent Architecture”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“About Agents / Agents vs Skills / Agent Architecture”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: agent-creator
description: Expert guidance for creating effective Claude Code agents (subagents). Use when users want to cr…
category: 设计与多媒体
source: agdev/claude-code
---
# agent-creator
## 什么时候使用
- agent-creator 是设计与多媒体方向的技能,让 Agent 直接产出图、卡、视觉素材 适合处理界面、视觉、封面、信息图或演示材料交付,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆…
- 面向视觉内容、演示材料、信息图或设计交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「About Agents / Agents vs Skills / Agent Architecture」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "agent-creator" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> About Agents / Agents vs Skills / Agent Architecture
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Agent Creator
Expert guidance for creating effective Claude Code agents following best practices.
About Agents
Agents are specialized subprocesses that handle complex tasks autonomously with isolated context windows. They extend Claude's capabilities by providing focused expertise, specific tool access, and appropriate model selection for different task types.
Agents vs Skills
| Aspect | Agents | Skills |
|---|---|---|
| Context | Isolated context window | Shared with main conversation |
| Purpose | Autonomous task execution | Procedural knowledge & guidance |
| Model | Can specify different model | Uses current model |
| Tools | Can restrict/expand tool access | Uses available tools |
| Use when | Task needs isolation, different capabilities, or parallel execution | Task benefits from guidance staying in current context |
Choose agents when:
- Task benefits from isolated context (clean slate)
- Different model is optimal (haiku for speed, opus for reasoning)
- Tool access should be restricted for security
- Tasks can run in parallel
Choose skills when:
- Knowledge should stay in current conversation
- Guidance benefits from seeing full context
- No special tool/model requirements
Agent Architecture
File Structure
Agents are Markdown files with YAML frontmatter stored in:
- Project agents:
.claude/agents/(highest priority) - User agents:
~/.claude/agents/(all projects)
Configuration Format
---
name: agent-identifier # Required: lowercase, hyphens only
description: When and why... # Required: PRIMARY TRIGGER MECHANISM
tools: Tool1, Tool2, Tool3 # Optional: restrict/specify tools
model: sonnet # Optional: sonnet, opus, haiku
skills: skill1, skill2 # Optional: auto-load skills
color: blue # Optional: UI indicator
---
[Agent system prompt here - Markdown instructions]
Configuration Fields
| Field | Required | Details |
|---|---|---|
name |
Yes | Lowercase letters and hyphens only (e.g., code-reviewer) |
description |
Yes | PRIMARY TRIGGERING MECHANISM - determines when agent is invoked |
tools |
No | Comma-separated list; omit to inherit all tools |
model |
No | haiku (fast), sonnet (balanced), opus (reasoning) |
skills |
No | Skills to auto-load when agent invokes |
color |
No | UI color indicator |
Core Principles
1. Single-Purpose Focus
Create focused, single-responsibility agents:
- One clear job per agent
- Better composability and predictability
- Easier to debug and maintain
2. Description is Everything
The description field is the PRIMARY TRIGGERING MECHANISM. Include:
- WHAT the agent does
- WHEN to use it (trigger scenarios)
- Specific examples in angle brackets
Pattern:
description: [Role/capability]. MUST BE USED for [specific scenarios]. [Additional context]. Examples: "[trigger phrase 1]", "[trigger phrase 2]"
3. Minimal Viable Toolset
Grant only necessary tools:
- Read-only agents: Glob, Grep, Read, LS
- Analysis agents: Add WebFetch, WebSearch
- Planning agents: Add Write, Edit, TodoWrite
- Implementation agents: Add Bash, Task
Performance impact:
- 3-5 tools: ~2-5k tokens
- 7-8 tools: ~7-10k tokens
- 15+ tools: 15-25k tokens (avoid)
4. Appropriate Model Selection
- Haiku: Fast, lightweight tasks (exploration, simple analysis)
- Sonnet: Balanced tasks (orchestration, validation, general work)
- Opus: Complex reasoning (planning, architecture, research)
Agent Creation Process
Step 1: Define Purpose
Before creating, answer:
- What specific problem does this agent solve?
- When should Claude automatically invoke this agent?
- What makes this different from existing agents?
- Does this need isolation, or would a skill suffice?
Step 2: Design Description
Write a comprehensive description:
- Start with role/capability statement
- Add "MUST BE USED" or "use PROACTIVELY" for strong triggers
- Include specific scenarios and trigger phrases
- Add examples using XML tags for complex scenarios
Step 3: Select Tools
Determine minimum tools needed:
- List all operations the agent must perform
- Map operations to specific tools
- Remove any tools not strictly necessary
- Consider security implications
Step 4: Choose Model
Select based on task complexity:
- Simple/fast tasks →
haiku - Standard tasks →
sonnetor omit (default) - Complex reasoning →
opus
Step 5: Write System Prompt
Structure the prompt body:
# [Role Title]
[One-sentence mission statement]
## Core Principles
- [Principle 1]: [Brief explanation]
- [Principle 2]: [Brief explanation]
## Responsibilities / Methodology
1. [Step/responsibility 1]
2. [Step/responsibility 2]
## [Workflow/Process] (if multi-step)
### Step 1: [Name]
[Instructions]
## Quality Standards / Output Format
[Checklists, criteria, format requirements]
## Constraints (if critical)
- [What agent MUST NOT do]
- [Boundaries and limitations]
Step 6: Define Boundaries
Add explicit boundaries if agent has limited scope:
## YOUR ROLE ENDS HERE
**CRITICAL BOUNDARY**: You are strictly a [role]. Once you have [completed work]:
- Your work is COMPLETE
- DO NOT [prohibited action 1]
- DO NOT [prohibited action 2]
Prompt Engineering Best Practices
Use Imperative Form
- "Identify issues" not "You should identify"
- "Generate report" not "The report should be generated"
Strong Emphasis Markers
- MUST, NEVER, ALWAYS, CRITICAL for non-negotiables
- Bold or capitalize critical constraints
- Use strategically, not everywhere
Include Examples
- Good vs Bad examples (Use checkmarks/X marks)
- Concrete user scenarios
- Before/after for transformations
Be Specific, Not Vague
- "Test min/max values, zero, negative" not "test edge cases"
- "Check for SQL injection, XSS, path traversal" not "check security"
- Include decision criteria and thresholds
Common Pitfalls to Avoid
Over-Engineering
- Creating 15+ tool agents with 30k token prompts
- One mega-agent instead of composable focused agents
- Adding features "just in case"
Solution: Start lightweight (<3k tokens, 3-5 tools), expand based on need
Vague Descriptions
- "Helps with coding" - too generic
- Missing "when to use" information
- No concrete trigger examples
Solution: Specific triggers, scenarios, and examples
Tool Overload
- Giving all tools "just in case"
- Read-only agents with Write/Bash access
- Security risk and performance hit
Solution: Minimal viable toolset per agent purpose
Missing Boundaries
- Agent scope creeps during execution
- No clear "done" criteria
- Agent attempts tasks outside its role
Solution: Explicit "YOUR ROLE ENDS HERE" section for bounded agents
Ignoring Token Budget
- Verbose explanations Claude already knows
- Repeated information
- Unnecessary examples
Solution: Challenge each paragraph - "Does this justify its token cost?"
Integration with Skills
When an agent needs domain expertise, use skills:
---
name: specialized-agent
skills: domain-skill, helper-skill
---
When to create an accompanying skill:
- Agent needs substantial domain knowledge
- Knowledge is reusable across multiple agents
- Information would bloat agent prompt
Use the skill-creator skill to create accompanying skills:
Invoke skill: skill-creator
Quality Checklist
Before finalizing an agent:
- Name: Lowercase with hyphens, descriptive
- Description: Includes WHAT, WHEN, and examples
- Tools: Minimal viable set for the task
- Model: Appropriate for task complexity
- Prompt: Follows structure (role → principles → methodology → standards)
- Boundaries: Clear scope and "done" criteria (if bounded)
- Token efficiency: <5k words for most agents
- Examples: Concrete scenarios in description or prompt
- No overlap: Doesn't duplicate existing agent functionality
Example: Well-Designed Agent
---
name: code-reviewer
description: Expert code review specialist. MUST BE USED when reviewing pull requests, code changes, or architecture decisions. Focuses on security, performance, maintainability, and best practices. Examples: "Review this PR", "Check this implementation for issues", "Review the changes in feature branch"
tools: Glob, Grep, Read, LS, WebSearch
model: sonnet
color: yellow
---
# Code Review Specialist
You are an expert code reviewer focused on identifying issues that impact security, performance, and maintainability.
## Review Priorities
1. **Security**: Injection vulnerabilities, auth issues, data exposure
2. **Performance**: O(n²) operations, memory leaks, unnecessary computation
3. **Maintainability**: Code clarity, naming, separation of concerns
4. **Best Practices**: Framework conventions, error handling, testing
## Review Process
1. Understand the change context (what problem is being solved)
2. Review for security vulnerabilities first
3. Check performance implications
4. Assess code quality and maintainability
5. Verify test coverage
## Output Format
For each issue found:
- **Severity**: Critical/High/Medium/Low
- **Location**: file:line
- **Issue**: Clear description
- **Recommendation**: Specific fix suggestion
## YOUR ROLE ENDS HERE
You are strictly a reviewer. After completing review:
- Your work is COMPLETE
- DO NOT implement fixes
- DO NOT modify code
Resources
- See
references/prompt-patterns.mdfor advanced prompt engineering patterns - Use
skill-creatorskill when agent needs accompanying skills
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核