Agent 生成器
- 作者仓库星标 2,235
- 作者更新于 实时读取
- 作者仓库 claude-code-plugins-plus-skills
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @jeremylongshore · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agent-creator
description: 'Create production-grade agent .md files aligned with the Anthropic 2026 Creates spec-compliant…
category: AI 智能
runtime: 无特殊运行时
---
# agent-creator 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Overview / Prerequisites / Instructions”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Overview / Prerequisites / Instructions”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Overview / Prerequisites / Instructions”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: agent-creator
description: 'Create production-grade agent .md files aligned with the Anthropic 2026 Creates spec-compliant…
category: AI 智能
source: jeremylongshore/claude-code-plugins-plus-skills
---
# agent-creator
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Overview / Prerequisites / Instructions」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "agent-creator" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Overview / Prerequisites / Instructions
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Agent Creator
Creates spec-compliant agent .md files following the Anthropic 2026 16-field schema. Supports both creation of new agents and validation of existing ones.
Overview
Agent Creator fills the gap between ad-hoc agent files and production-grade agents that pass
marketplace validation. It enforces the Anthropic agent schema (14 valid fields), prevents
common mistakes (using allowed-tools instead of disallowedTools, adding invalid fields like
capabilities or expertise_level), and produces agents with substantive body content that
actually guides Claude's behavior.
Key difference from skill-creator: agents support both tools (allowlist) AND disallowedTools
(denylist), while skills only use allowed-tools (allowlist). Agents also support effort,
maxTurns, skills, memory, isolation, permissionMode, background, color, and
initialPrompt — fields that don't exist for skills. The agent body becomes the system prompt
that drives the subagent — it does NOT receive the full Claude Code system prompt.
Prerequisites
- Claude Code CLI with agent support
- Target directory writable (
agents/within a plugin or~/.claude/agents/for standalone) - Familiarity with what the agent should specialize in
Instructions
Mode Detection
Determine user intent from their prompt:
- Create mode: "create an agent", "build a subagent", "new agent" -> Step 1
- Validate mode: "validate agent", "check agent", "grade agent" -> Validation Workflow
Step 1: Understand Requirements
Ask the user with AskUserQuestion:
Agent Identity:
- Name (kebab-case, 1-64 chars, e.g.,
risk-assessor,clause-analyzer) - Specialty description (20-200 chars — shown in agent selection UI)
Execution Context:
- Plugin agent (
plugins/*/agents/) or standalone (~/.claude/agents/)? - Will it be spawned by an orchestrator skill via
Tasktool? - Does it need to preload specific skills? (
skills: [skill-name])
Behavioral Controls:
- Model override? (
sonnetfor speed,opusfor quality,inheritfor default) - Reasoning effort? (
lowfor simple,mediumdefault,highfor complex analysis) - Max iterations? (
maxTurns— how many tool-use loops before stopping) - Tools to deny? (
disallowedTools— denylist approach, opposite of skills)
Plugin Restrictions (if plugin agent):
hooks— NOT supported in plugin agents (use plugin-level hooks)mcpServers— NOT supported in plugin agentspermissionMode— standalone only, NOT plugin agents
Step 2: Plan the Agent
Before writing, determine:
Agent Role Clarity: The agent body must make three things unambiguous:
- What it IS responsible for — its specific domain/methodology
- What it is NOT responsible for — boundaries with other agents
- How it communicates results — output format and structure
Body Structure Pattern: All production agents should follow this body structure:
| Section | Purpose | Required? |
|---|---|---|
# Title |
Agent name as heading | Yes |
## Role |
2-3 sentence domain description with boundaries | Yes |
## Inputs |
Parameters the agent receives when spawned | Yes (if spawned by orchestrator) |
## Process |
Step-by-step methodology (numbered steps with ### headings) | Yes |
## Output Format |
Structured output spec (JSON, markdown, or table) | Yes |
## Guidelines |
Do/don't behavioral rules | Yes |
## When Activated |
Trigger conditions (when spawned or auto-detected) | Recommended |
## Communication Style |
Tone and formatting preferences | Recommended |
## Success Criteria |
What good vs poor output looks like | Recommended |
## Examples |
Concrete interaction examples | For complex agents |
Output Structure Decision:
- If the agent feeds into an orchestrator: use JSON output (machine-parseable)
- If the agent is user-facing: use markdown output (human-readable)
- If the agent produces both: JSON primary with markdown summary
Step 3: Write the Agent File
Generate the agent .md using the template from
${CLAUDE_SKILL_DIR}/../skill-creator/templates/agent-template.md.
Frontmatter Rules (Anthropic 16-field schema):
See Anthropic Agent Spec for the full official reference.
Required fields:
name: {agent-name} # Lowercase letters and hyphens, unique identifier
description: "{specialty}" # When Claude should delegate to this subagent
Optional fields (include only what's needed):
tools: "Read, Glob, Grep" # Allowlist — inherits all tools if omitted
disallowedTools: "Write" # Denylist — removed from inherited/specified list
model: sonnet # sonnet|haiku|opus|inherit|full model ID
effort: medium # low|medium|high|max (max = Opus 4.6 only)
maxTurns: 15 # Max agentic turns before stopping
skills: [skill-name] # Skills to inject at startup (full content loaded)
memory: project # user|project|local — persistent cross-session
background: false # Always run as background task
isolation: worktree # Run in temporary git worktree
color: blue # Display: red|blue|green|yellow|purple|orange|pink|cyan
initialPrompt: "..." # Auto-submitted first turn (--agent mode only)
permissionMode: default # Standalone only, NOT plugin agents
hooks: {} # Standalone only, NOT plugin agents
mcpServers: {} # Standalone only, NOT plugin agents
Tool access:
tools= allowlist (like skills'allowed-tools)disallowedTools= denylist (remove specific tools)- If both set: disallowed applied first, then tools resolved
- If neither set: inherits all tools from parent conversation
Invalid fields (ERROR — never use these):
capabilities— looks valid but flagged by validatorexpertise_level— invented, not in Anthropic specactivation_priority— invented, not in Anthropic specactivation_triggers,type,category— not in specallowed-tools— that's the skill-only syntax; agents usetoolsordisallowedTools
Body Content Guidelines:
Role section must set boundaries. Don't just say what the agent does — say what it does NOT do. Example: "You analyze contract clauses for risk. You do NOT provide legal advice or make recommendations — that is the recommendations agent's responsibility."
Process steps must be concrete. Each step should tell Claude exactly what to do, not vaguely gesture at an activity. Bad: "Analyze the document." Good: "Read the full contract. For each clause, extract: (a) the exact text, (b) the clause category from the taxonomy below, (c) a plain English summary in one sentence."
Output format must be machine-parseable if feeding an orchestrator. Use JSON with a concrete schema example. Include field descriptions so Claude knows what each field means.
Guidelines should include both DO and DON'T rules. Example:
- DO: "Be specific — quote exact clause text, don't paraphrase"
- DON'T: "Don't make legal recommendations — only identify and score risks"
Keep under 300 lines (agent body limit — prevents context bloat in subagent window). If the agent needs extensive reference material, create a companion skill with
references/directory and preload it via theskillsfield.
Step 4: Validate the Agent
Run validation against the Anthropic 16-field schema:
Manual checklist:
| Check | Rule |
|---|---|
name present |
1-64 chars, kebab-case |
description present |
20-200 chars |
| No invalid fields | None of: capabilities, expertise_level, activation_priority, type, category |
| No skill-only fields | No allowed-tools (use disallowedTools instead) |
| Plugin restrictions | No hooks/mcpServers/permissionMode if plugin agent |
| Body has Role section | Clear domain + boundaries |
| Body has Process section | Numbered steps |
| Body has Output Format | Concrete schema example |
| Body has Guidelines | Do/don't rules |
| Body under 300 lines | Offload to references if longer (prevents context bloat) |
Automated validation:
python3 ${CLAUDE_SKILL_DIR}/../skill-creator/scripts/validate-skill.py --agents-only {plugin-dir}/
Step 5: Test the Agent
Test the agent by spawning it via the Task tool or the Agent tool:
- Write a test prompt that exercises the agent's core capability
- Spawn the agent with that prompt
- Check: Does the output match the declared Output Format?
- Check: Does the agent stay within its declared Role boundaries?
- Check: Does it follow the Process steps?
- Iterate on the body content if the agent strays
Step 6: Report
Provide a summary:
- Agent name and file path
- Frontmatter field count (of 14 possible)
- Body line count
- Sections present
- Validation result (pass/fail with specific issues)
- Test result summary
Validation Workflow
When the user wants to validate an existing agent:
- Locate the agent .md file
- Parse YAML frontmatter
- Check against the 16-field Anthropic schema:
namepresent and valid (1-64 chars, kebab-case)?descriptionpresent and valid (20-200 chars)?- Any invalid fields? (capabilities, expertise_level, activation_priority, etc.)
- Any skill-only fields? (allowed-tools)
- Plugin restrictions respected?
- Check body content:
- Has
## Rolesection? - Has
## Processsection with numbered steps? - Has
## Output Formatwith concrete example? - Has
## Guidelines? - Under 300 lines? (agent body limit)
- Has
- Report findings with severity (ERROR/WARNING/INFO)
- Suggest specific fixes for each issue
Output
- Create mode: A complete agent .md file with valid frontmatter and substantive body, plus a creation report with validation status.
- Validate mode: A compliance report listing errors, warnings, and info items with specific fix recommendations for each.
Examples
Subagent for Orchestrator Skill
Input: "Create a risk assessment agent that scores contract clauses"
Output: agents/risk-assessor.md with frontmatter:
name: risk-assessor
description: "Score contract clauses for legal and financial risk on a 1-10 scale"
model: sonnet
effort: high
maxTurns: 10
Body sections: Role (risk scoring specialist, does NOT make recommendations), Inputs (contract_text, contract_type, output_path), Process (4 steps: read, categorize, score, aggregate), Output Format (JSON with clause scores and risk matrix), Guidelines (be specific, cite clause text, use 4-factor scoring methodology).
Standalone User-Facing Agent
Input: "Create a code review agent"
Output: ~/.claude/agents/code-reviewer.md with frontmatter:
name: code-reviewer
description: "Review code for bugs, performance issues, and security vulnerabilities"
effort: high
Body sections: Role (code quality specialist), Process (read code, check patterns, identify issues, suggest fixes), Output Format (markdown with severity-rated findings), Guidelines (cite line numbers, explain why not just what), Communication Style (direct, educational, actionable).
Error Handling
| Error | Cause | Resolution |
|---|---|---|
allowed-tools in agent |
Used skill-only field | Replace with disallowedTools (denylist) or remove |
capabilities field |
Common mistake — looks valid but isn't in Anthropic spec | Remove field entirely |
expertise_level field |
Invented field from community templates | Remove — express expertise in body content |
| Description > 200 chars | Exceeds Anthropic limit | Shorten to 20-200 char range |
| Description < 20 chars | Below minimum | Expand to describe agent's specific specialty |
permissionMode in plugin agent |
Standalone-only field used in plugin context | Remove — only valid in ~/.claude/agents/ |
hooks in plugin agent |
Plugin agents can't have hooks | Move to plugin-level hooks/hooks.json |
| Body has no Process section | Agent lacks step-by-step methodology | Add numbered steps under ## Process |
| Body over 300 lines | Too long for agent context | Extract reference material to companion skill |
Resources
- Anthropic Agent Spec — Official 16-field schema from code.claude.com/docs/en/sub-agents
- Agent template — Skeleton with placeholders
- Frontmatter spec — Field reference (internal)
- Source of truth — Canonical spec
- Validation rules — Agent validation section
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核