skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Creator
Skill Creator
Create new agent skills by guiding the user through a series of choices, then generating a ready-to-edit project structure with best practices baked in.
通过引导用户完成一系列选择来创建新的Agent技能,随后生成内置最佳实践的可编辑项目结构。
How It Works
工作原理
- Collect requirements through dialogue (AskUserQuestion)
- Call with the collected parameters (non-interactive)
scaffold.py - Report what was generated and guide next steps
- 通过对话收集需求(AskUserQuestion)
- 传入收集到的参数调用(非交互式)
scaffold.py - 报告生成内容并指导后续步骤
Dialogue Flow
对话流程
Follow these steps in order. Use AskUserQuestion for steps 1–4.
按以下顺序执行步骤。步骤1–4使用AskUserQuestion。
Step 1: Skill Name
步骤1:技能名称
Ask the user for a skill name. Validate it meets these rules:
- Lowercase letters, digits, and hyphens only
- Must start with a letter, end with a letter or digit
- No consecutive hyphens
- Maximum 64 characters
If invalid, explain the constraint and ask again.
询问用户技能名称,并验证其符合以下规则:
- 仅包含小写字母、数字和连字符
- 必须以字母开头,以字母或数字结尾
- 无连续连字符
- 最大长度64个字符
如果不符合规则,说明限制条件并重新询问。
Step 2: Skill Level
步骤2:技能级别
Ask the user to choose a skill level:
L0 — Pure Prompt: Only a SKILL.md file. All capabilities come from Claude's built-in tools, MCP servers, or general knowledge. Best for workflow guides, domain knowledge, configuration wizards. No scripts needed.
L0+ — Prompt + Helper Scripts: SKILL.md plus lightweight helper scripts for environment detection, status caching, or other auxiliary tasks. Core logic stays in the prompt. Best when Claude needs a preflight check or a small utility but handles business logic itself.
L1 — Prompt + Business Scripts: SKILL.md orchestrates CLI scripts that handle core business logic. Scripts accept parameters, return structured JSON, and follow MCP tool design principles. Best for skills that interact with APIs, process data, or perform operations that benefit from deterministic code.
请用户选择技能级别:
L0 — 纯提示词:仅包含SKILL.md文件。所有能力均来自Claude的内置工具、MCP服务器或通用知识。最适合工作流指南、领域知识、配置向导。无需脚本。
L0+ — 提示词+辅助脚本:包含SKILL.md和用于环境检测、状态缓存或其他辅助任务的轻量辅助脚本。核心逻辑仍在提示词中。当Claude需要预检查或小型工具,但自身处理业务逻辑时,选择此级别。
L1 — 提示词+业务脚本:SKILL.md编排处理核心业务逻辑的CLI脚本。脚本接受参数,返回结构化JSON,并遵循MCP工具设计原则。最适合与API交互、处理数据或执行可从确定性代码中获益的操作的技能。
Step 3: Environment Strategy (L1 only)
步骤3:环境策略(仅L1级别)
If the user chose L1, ask which environment strategy to use:
stdlib — Python standard library only. Zero dependencies, zero environment issues. Choose this when , , , are sufficient. This is the recommended default.
urllibjsonargparsepathlibuv — Dependencies declared inline via PEP 723, executed with . No persistent venv, global cache, version-isolated. Choose this when external packages are needed but a full venv is overkill.
uv runvenv — Traditional per-skill virtual environment with wrapper. Choose this only when dependencies require C extensions, or the skill runs long-lived processes.
run.sh如果用户选择L1级别,询问其要使用的环境策略:
stdlib — 仅使用Python标准库。零依赖,无环境问题。当、、、足够时选择此策略。这是推荐的默认选项。
urllibjsonargparsepathlibuv — 通过PEP 723内联声明依赖,使用执行。无持久化venv,全局缓存,版本隔离。当需要外部包但完整venv过于冗余时选择此策略。
uv runvenv — 传统的单技能虚拟环境,带有包装器。仅当依赖需要C扩展,或技能需要运行长期进程时选择此策略。
run.shStep 4: Output Directory
步骤4:输出目录
Ask where to generate the skill. Default: current working directory. The script creates under this directory.
skills/<name>/询问用户技能生成位置。默认值:当前工作目录。脚本会在此目录下创建文件夹。
skills/<name>/Generate
生成项目
After collecting all parameters, run:
bash
python3 {SKILL_DIR}/scripts/scaffold.py scaffold \
--name <name> \
--level <level> \
[--env <strategy>] \
--output <dir>Where is the directory containing this SKILL.md file. Resolve it at runtime.
{SKILL_DIR}The script outputs JSON to stdout:
json
{
"status": "ok",
"level": "l1",
"env": "uv",
"created": ["skills/my-skill/SKILL.md", "skills/my-skill/scripts/main.py", ...],
"hint": "..."
}If it fails, stderr contains JSON with , , and fields.
errorhintrecoverable收集所有参数后,运行:
bash
python3 {SKILL_DIR}/scripts/scaffold.py scaffold \
--name <name> \
--level <level> \
[--env <strategy>] \
--output <dir>其中是包含本SKILL.md文件的目录。在运行时解析该路径。
{SKILL_DIR}脚本会向标准输出打印JSON:
json
{
"status": "ok",
"level": "l1",
"env": "uv",
"created": ["skills/my-skill/SKILL.md", "skills/my-skill/scripts/main.py", ...],
"hint": "..."
}如果执行失败,标准错误输出会包含带有、和字段的JSON。
errorhintrecoverablePost-Generation Guidance
生成后指导
After successful generation, tell the user:
-
Edit SKILL.md — Replace all placeholder markers. Thefield in frontmatter is critical — it determines when Claude activates the skill. Be specific and include trigger phrases.
description -
Customize scripts/ (L0+/L1) — The generated scripts are functional frameworks with placeholder markers. Add your business logic.
-
Test preflight (L0+/L1) — Run the preflight command to verify the JSON output structure works:
- L0+:
bash scripts/helper.sh preflight - L1 stdlib:
python3 scripts/main.py preflight - L1 uv:
uv run scripts/main.py preflight - L1 venv: (after setup)
bash scripts/run.sh preflight
- L0+:
-
Add references/ — Put detailed reference documents here and reference them from SKILL.md with file read instructions. Keep SKILL.md lean.
-
Ready to publish? — Use theskill (if installed) to wrap this into a complete GitHub repo with README, LICENSE, plugin.json, and marketplace.json.
skill-publish
生成成功后,告知用户:
-
编辑SKILL.md — 替换所有占位符标记。前置元数据中的字段至关重要,它决定了Claude何时激活该技能。请描述具体,并包含触发短语。
description -
自定义scripts/目录(L0+/L1) — 生成的脚本是带有占位符标记的功能框架。请添加您的业务逻辑。
-
预检查测试(L0+/L1) — 运行预检查命令以验证JSON输出结构是否可用:
- L0+:
bash scripts/helper.sh preflight - L1 stdlib:
python3 scripts/main.py preflight - L1 uv:
uv run scripts/main.py preflight - L1 venv:(设置完成后)
bash scripts/run.sh preflight
- L0+:
-
添加references/目录 — 将详细的参考文档放在此处,并在SKILL.md中通过文件读取指令引用它们。保持SKILL.md简洁。
-
准备发布? — 使用技能(若已安装)将其打包为完整的GitHub仓库,包含README、LICENSE、plugin.json和marketplace.json。
skill-publish
References
参考资料
For skill design conventions — output formats, error handling, environment strategies, preflight conventions — read .
references/best_practices.mdFor common quality issues and how to avoid them, read .
references/improvement_patterns.mdFor what automated validation checks will be run (by skill-review), read .
references/validation_rules.md关于技能设计规范——输出格式、错误处理、环境策略、预检查规范——请阅读。
references/best_practices.md关于常见质量问题及避免方法,请阅读。
references/improvement_patterns.md关于(由skill-review执行的)自动化验证检查内容,请阅读。
references/validation_rules.md