new-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

new-skill

new-skill

Creates a new skill at
skills/<name>/
with a valid
SKILL.md
(correct frontmatter, kebab-case name, semver version) so it passes
python3 scripts/audit_skills.py skills
immediately.
创建一个位于
skills/<name>/
的新技能,包含有效的
SKILL.md
文件(正确的前置元数据、kebab-case格式名称、semver版本),使其能立即通过
python3 scripts/audit_skills.py skills
检查。

Usage

使用方法

bash
bash "$CLAUDE_PROJECT_DIR/.claude/skills/new-skill/scripts/scaffold.sh" <skill-name> "<one-line description>"
<skill-name>
must be kebab-case (lowercase letters, digits, hyphens — no underscores, no dots).
bash
bash "$CLAUDE_PROJECT_DIR/.claude/skills/new-skill/scripts/scaffold.sh" <skill-name> "<one-line description>"
<skill-name>
必须为kebab-case格式(小写字母、数字、连字符——不允许下划线、点号)。

What it does

功能说明

  1. Validates the name against the audit script's kebab-case regex.
  2. Refuses to overwrite an existing
    skills/<skill-name>/
    .
  3. Copies
    templates/SKILL.md
    into
    skills/<skill-name>/SKILL.md
    , substituting
    {{name}}
    and
    {{description}}
    .
  4. Runs
    python3 scripts/audit_skills.py skills
    and reports the result.
  1. 根据检查脚本的kebab-case正则表达式验证名称合法性。
  2. 拒绝覆盖已存在的
    skills/<skill-name>/
    目录。
  3. templates/SKILL.md
    复制到
    skills/<skill-name>/SKILL.md
    ,并替换
    {{name}}
    {{description}}
    变量。
  4. 运行
    python3 scripts/audit_skills.py skills
    并报告结果。

After scaffolding

搭建完成后

  • Flesh out the SKILL.md body (Workflow, references, examples).
  • Add
    references/
    ,
    templates/
    ,
    scripts/
    ,
    examples/
    directories only if the skill needs them.
  • Bump the
    version
    in frontmatter when you make changes (see CLAUDE.md → Versioning).
  • The
    package-skill.sh
    PostToolUse hook will rebuild
    dist/<skill-name>.skill
    automatically on the first edit.
  • 完善SKILL.md的主体内容(工作流程、参考资料、示例)。
  • 仅当技能需要时,添加
    references/
    templates/
    scripts/
    examples/
    目录。
  • 当你进行修改时,更新前置元数据中的
    version
    版本号(参见CLAUDE.md → 版本控制)。
  • 首次编辑时,
    package-skill.sh
    PostToolUse钩子会自动重新构建
    dist/<skill-name>.skill
    文件。