agent-skill-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgent Skill Builder
Agent技能构建器
Quickly scaffolds new Claude Code skills or translates ChatGPT projects into Claude Code format. This skill focuses on fast creation and correct structure. For iterative testing, benchmarking, and description optimization, use .
/skill-creator快速搭建新的Claude Code技能,或将ChatGPT项目转换为Claude Code格式。本技能专注于快速创建与正确结构搭建。如需迭代测试、基准测试和描述优化,请使用。
/skill-creatorTwo Modes
两种模式
Mode 1: Create New Skill (/agent-skill-builder new [name]
)
/agent-skill-builder new [name]模式1:创建新技能(/agent-skill-builder new [name]
)
/agent-skill-builder new [name]Scaffolds a fresh Claude Code skill with proper structure and best practices.
按照规范结构与最佳实践搭建全新的Claude Code技能。
Mode 2: Translate ChatGPT Project (/agent-skill-builder translate [name]
)
/agent-skill-builder translate [name]模式2:转换ChatGPT项目(/agent-skill-builder translate [name]
)
/agent-skill-builder translate [name]Converts an existing ChatGPT project into a Claude Code skill.
将现有ChatGPT项目转换为Claude Code技能格式。
Create New Skill
创建新技能
Step 1: Gather Intent
步骤1:收集需求
Ask the user (skip what's already clear from context):
- Skill name: What should the be called?
/slash-command - Purpose: What does this skill do?
- Examples: How would this skill be used in practice?
- Triggers: What would a user say that should invoke this skill?
询问用户(上下文已明确的内容可跳过):
- 技能名称:斜杠命令的名称是什么?
/slash-command - 用途:该技能的功能是什么?
- 示例:该技能在实际场景中如何使用?
- 触发条件:用户说出哪些内容时应触发此技能?
Step 2: Plan Resources
步骤2:规划资源
Analyze each example to identify what should be bundled:
- Scripts (): Code rewritten repeatedly or needing deterministic reliability. Execute without loading into context.
scripts/ - References (): Documentation Claude should consult while working. Loaded on demand.
references/ - Assets (): Files used in output (templates, images, fonts). Not loaded into context.
assets/
分析每个示例,确定需要打包的资源类型:
- 脚本():需要重复编写或要求确定性可靠性的代码。无需加载到上下文即可执行。
scripts/ - 参考资料():Claude工作时需要查阅的文档。按需加载。
references/ - 资源文件():输出中使用的文件(模板、图片、字体)。无需加载到上下文。
assets/
Step 3: Create Directory and SKILL.md
步骤3:创建目录与SKILL.md
bash
mkdir -p ~/.claude/skills/[skill-name]Write SKILL.md following this template:
markdown
---
name: skill-name
description: "Describes what the skill does and specific triggers for when to use it. Write in third person. Include keywords users would say. Max 1024 characters. This is the PRIMARY triggering mechanism."
---bash
mkdir -p ~/.claude/skills/[skill-name]按照以下模板编写SKILL.md:
markdown
---
name: skill-name
description: "描述该技能的功能及触发场景,使用第三人称撰写。包含用户可能使用的关键词,最多1024字符。这是主要的触发机制。"
---Skill Name
技能名称
[1-2 sentence description]
[1-2句话描述]
Instructions
操作说明
[Step-by-step guidance — use imperative form]
[分步指导——使用祈使语气]
Output Format
输出格式
[Expected output structure]
[预期的输出结构]
Constraints
约束条件
[Limitations and rules]
undefined[限制规则]
undefinedStep 4: Add Reference Files (if needed)
步骤4:添加参考文件(如有需要)
For skills with multiple domains or variants, keep SKILL.md lean and split into references:
skill-name/
├── SKILL.md (overview + navigation, under 500 lines)
└── references/
├── variant-a.md
└── variant-b.mdReference from SKILL.md with clear guidance on when to read each file. Keep references one level deep.
对于涉及多个领域或变体的技能,保持SKILL.md简洁,将详细内容拆分到参考文件中:
skill-name/
├── SKILL.md(概述与导航,不超过500行)
└── references/
├── variant-a.md
└── variant-b.md在SKILL.md中添加清晰指引,说明何时读取每个参考文件。参考文件仅保留一级目录结构。
Step 5: Test
步骤5:测试
- Invoke directly:
/skill-name - Let Claude auto-invoke by matching description keywords
- Check that the skill triggers when expected and stays silent when not relevant
- 直接调用:
/skill-name - 通过匹配描述关键词让Claude自动触发
- 验证技能在预期场景下触发,在无关场景下保持静默
Translate ChatGPT Project to Claude Skill
将ChatGPT项目转换为Claude技能
Step 1: Extract ChatGPT Components
步骤1:提取ChatGPT组件
Request from user:
- System prompt/instructions
- Knowledge files (PDFs, docs)
- Conversation starters (optional)
- Actions/API configurations (if any)
向用户获取:
- 系统提示词/操作说明
- 知识库文件(PDF、文档)
- 对话起始语(可选)
- 动作/API配置(如有)
Step 2: Map Components
步骤2:组件映射
| ChatGPT Component | Claude Code Equivalent | Location |
|---|---|---|
| Name | | SKILL.md |
| Description | | SKILL.md |
| Instructions | Main markdown body | SKILL.md |
| Knowledge files | | Subdirectory |
| Conversation starters | Document in Examples section or omit | SKILL.md |
| Actions (APIs) | MCP servers | |
| Code Interpreter | Native tools: | Built-in |
| Memory | No direct equivalent. Use context files or skill background sections | Various |
| ChatGPT组件 | Claude Code等效项 | 存放位置 |
|---|---|---|
| 名称 | frontmatter中的 | SKILL.md |
| 描述 | frontmatter中的 | SKILL.md |
| 操作说明 | Markdown主体内容 | SKILL.md |
| 知识库文件 | | 子目录 |
| 对话起始语 | 记录在示例部分或省略 | SKILL.md |
| 动作(API) | MCP服务器 | |
| 代码解释器 | 原生工具: | 内置功能 |
| 记忆功能 | 无直接等效项。使用上下文文件或技能背景章节实现 | 多个位置 |
Step 3: Convert Instructions
步骤3:转换操作说明
| ChatGPT Pattern | Claude Equivalent |
|---|---|
| "You are a [role]..." | Role section or integrate into instructions |
| "Your task is to..." | Instructions section |
| "Always/Never..." | Constraints section |
| "Output format..." | Output Format section |
Input placeholders | Keep as-is or use |
| ChatGPT模式 | Claude等效写法 |
|---|---|
| "你是一个[角色]..." | 角色章节或整合到操作说明中 |
| "你的任务是..." | 操作说明章节 |
| "始终/绝不..." | 约束条件章节 |
| "输出格式..." | 输出格式章节 |
输入占位符 | 保留原样或使用 |
Step 4: Convert Knowledge Files
步骤4:转换知识库文件
- Convert PDFs/docs to Markdown and place in
references/ - For large files (>10k words), include grep search patterns in SKILL.md
- For files >100 lines, add a table of contents at the top
- Templates and assets go in
assets/
- 将PDF/文档转换为Markdown格式并存放在中
references/ - 对于大文件(>10000词),在SKILL.md中添加grep搜索规则
- 对于超过100行的文件,在顶部添加目录
- 模板与资源文件放入
assets/
Step 5: Write Frontmatter
步骤5:编写前置元数据(frontmatter)
The field is the primary triggering mechanism. Write in third person and include both what the skill does and when to use it. Be slightly "pushy" with triggers to combat undertriggering.
descriptiondescriptionFrontmatter Reference
Frontmatter参考
Only and are required. Additional fields are Claude Code-specific extensions:
namedescription| Field | Required | Description |
|---|---|---|
| Yes | Max 64 chars, lowercase letters/numbers/hyphens only |
| Yes | Max 1024 chars. What + When. Third person. Primary trigger mechanism |
| No | Hint shown in autocomplete (e.g., |
| No | |
| No | |
| No | |
| No | Subagent type: |
| No | Restrict available tools: |
| No | Override model for this skill |
仅和为必填项。其他字段为Claude Code专属扩展:
namedescription| 字段 | 是否必填 | 描述 |
|---|---|---|
| 是 | 最多64字符,仅允许小写字母/数字/连字符 |
| 是 | 最多1024字符。包含功能与触发场景,第三人称撰写。主要触发机制 |
| 否 | 自动补全时显示的提示(例如 |
| 否 | |
| 否 | |
| 否 | |
| 否 | 子Agent类型: |
| 否 | 限制可用工具: |
| 否 | 为此技能覆盖默认模型 |
String Substitutions
字符串替换
| Variable | Description |
|---|---|
| Everything after |
| Current session ID |
| Dynamic injection (runs before skill loads) |
| 变量 | 描述 |
|---|---|
| |
| 当前会话ID |
| 动态注入(技能加载前执行) |
Skill Locations
技能存放位置
| Location | Path | Scope |
|---|---|---|
| Personal | | All projects |
| Project | | This project only |
| 位置 | 路径 | 作用范围 |
|---|---|---|
| 个人技能 | | 所有项目 |
| 项目技能 | | 仅当前项目 |
Writing Best Practices
写作最佳实践
These come from Anthropic's official skill authoring guide:
- Concise is key. Claude is already smart. Only add context Claude doesn't already have. Prefer concise examples over verbose explanations.
- Description is everything. Claude reads descriptions to decide which skill to use from potentially 100+ available skills. Be specific, include trigger keywords, write in third person.
- Progressive disclosure. Keep SKILL.md under 500 lines. Move detailed references to separate files. Claude loads them only when needed.
- Match freedom to fragility. High freedom (text instructions) for flexible tasks, low freedom (specific scripts) for fragile operations.
- Explain the why. Explain reasoning behind instructions rather than using heavy-handed MUSTs. Claude responds better to understanding motivation than rigid rules.
- Consistent terminology. Pick one term and use it throughout. Don't mix "API endpoint" / "URL" / "API route" / "path".
- No extraneous files. No README.md, CHANGELOG.md, INSTALLATION_GUIDE.md. Skills contain only what an AI agent needs to do the job.
- Forward slashes only. Use , never
scripts/helper.py.scripts\helper.py
这些来自Anthropic官方技能创作指南:
- 简洁为上:Claude本身已具备智能。仅添加Claude未知的上下文。优先使用简洁示例而非冗长解释。
- 描述决定一切:Claude会从100+可用技能中读取描述来决定使用哪一个。描述要具体,包含触发关键词,使用第三人称。
- 渐进式披露:保持SKILL.md不超过500行。将详细参考内容移至单独文件。Claude仅在需要时加载这些文件。
- 自由度与稳定性匹配:灵活任务使用高自由度(文本指令),易出错操作使用低自由度(特定脚本)。
- 解释原因:解释指令背后的逻辑,而非使用强硬的“必须”要求。Claude对动机的理解优于刚性规则。
- 术语一致:选择一个术语并全程使用。不要混用“API端点”/“URL”/“API路由”/“路径”。
- 无冗余文件:不要包含README.md、CHANGELOG.md、INSTALLATION_GUIDE.md。技能仅包含AI Agent完成工作所需的内容。
- 仅使用正斜杠:使用,切勿使用
scripts/helper.py。scripts\helper.py
After Creation Checklist
创建后检查清单
- SKILL.md created with and
namein frontmatterdescription - Description includes what AND when (triggers), written in third person
- SKILL.md under 500 lines
- Knowledge files converted to Markdown in
references/ - References are one level deep from SKILL.md
- Large reference files (>100 lines) have table of contents
- Skill tested with and auto-invocation
/skill-name - No extraneous documentation files
- 已创建包含frontmatter中和
name字段的SKILL.mddescription - 描述包含功能与触发场景,使用第三人称撰写
- SKILL.md不超过500行
- 知识库文件已转换为Markdown并存放在中
references/ - 参考文件仅为SKILL.md的一级子目录
- 大型参考文件(>100行)已添加目录
- 已通过和自动触发测试技能
/skill-name - 无冗余文档文件