home / skills / hhhh124hhhh / godot-mcp / godot-skills

godot-skills skill

/.claude/skills/godot-skills

This skill provides a complete guide for designing modular, reusable skills to enhance Claude with domain knowledge, workflows, and tools.

npx playbooks add skill hhhh124hhhh/godot-mcp --skill godot-skills

Review the files below or copy the command above to add this skill to your agents.

Files (24)
SKILL.md
8.5 KB
---
name: skill-creator
description: 创建高效技能的指南。当用户希望打造新的技能(或改进现有技能),以专项知识、工作流或工具集成来扩展 Claude 能力时,请使用本技能。
license: 完整条款见 LICENSE.txt
---

# 技能创建器

本技能提供打造高效技能的完整指南。

## 关于技能

技能是模块化、可复用的封装,能为 Claude 提供专业知识、流程与工具。可将其视作特定领域或任务的“入职手册”——它们让 Claude 从通用型智能体转变为具备特定程序化知识的专家型智能体,这些知识无法完全依赖模型记忆。

### 技能可以提供什么

1. 专业工作流——针对具体领域的多步骤流程
2. 工具集成——关于特定文件格式或 API 的操作指引
3. 领域知识——公司特定知识、数据结构、业务逻辑
4. 随附资源——脚本、参考资料、素材等,用于复杂或重复任务

### 技能结构

每个技能都由必需的 SKILL.md 文件与可选的捆绑资源组成:

```
skill-name/
├── SKILL.md (必需)
│   ├── YAML 前言区元数据(必需)
│   │   ├── name:(必需)
│   │   └── description:(必需)
│   └── Markdown 指令内容(必需)
└── Bundled Resources(可选)
    ├── scripts/          - 可执行代码(Python/Bash 等)
    ├── references/       - 需按需加载到上下文的文档
    └── assets/           - 输出过程中使用的文件(模板、图标、字体等)
```

#### SKILL.md(必需)

**元数据质量:** `name` 与 `description` 决定 Claude 何时触发该技能。务必精准描述技能功能及适用场景。使用第三人称描述(例如 “This skill should be used when…”),不要使用第二人称。

#### 捆绑资源(可选)

##### scripts(`scripts/`)

用于需要确定性或频繁复用的可执行代码(如 Python、Bash 等)。

- **适用场景**:同一段代码反复编写,或对确定性要求较高
- **示例**:`scripts/rotate_pdf.py`(旋转 PDF)
- **优势**:节省 token,执行稳定,可无需加载到上下文
- **注意**:仍可能需要 Claude 阅读脚本以适应环境或进行修改

##### references(`references/`)

用于按需加载的文档或参考资料,指导 Claude 的思考与流程。

- **适用场景**:需要 Claude 在执行时参考的文档
- **示例**:`references/finance.md`(金融数据结构)、`references/mnda.md`(公司保密协议模板)、`references/policies.md`(公司政策)、`references/api_docs.md`(API 规格)
- **用途**:数据库结构、API 文档、领域知识、公司政策、详细流程指南
- **优势**:保持 SKILL.md 精简,Claude 仅在需要时加载
- **最佳实践**:若文件较大(>10k 字),在 SKILL.md 中提供 grep 搜索提示
- **避免重复**:信息应在 SKILL.md 或 references 中二选一。除非真正核心,详细资料应放在 references,SKILL.md 只保留关键流程指引。

##### assets(`assets/`)

用于输出中直接引用的文件,不必加载到上下文。

- **适用场景**:技能产出需要使用的文件
- **示例**:`assets/logo.png`(品牌素材)、`assets/slides.pptx`(PPT 模板)、`assets/frontend-template/`(HTML/React 脚手架)、`assets/font.ttf`(字体)
- **用途**:模板、图片、图标、样板代码、示例文档
- **优势**:将输出素材与文档分离,Claude 可直接使用这些文件

### 渐进式披露原则

技能通过三层加载策略高效利用上下文:

1. **元数据(name + description)** —— 永远加载(约 100 字)
2. **SKILL.md 正文** —— 技能触发时加载(<5k 字)
3. **捆绑资源** —— Claude 视需求加载(理论无限*)

*脚本可直接执行,无需进入上下文窗口,因此视作无限。

## 技能创建流程

创建技能时,请按照以下流程执行,除非有明确理由,否则不应跳过步骤。

### 第 1 步:通过具体示例理解技能

仅当对技能的使用模式已十分清晰时才可跳过此步。即使是已有技能,重新梳理仍然有价值。

要创建高效技能,需明确技能的具体使用情境。这些情境可以来自真实的用户示例,也可以由你提出并获得用户确认。

例如,在构建设想中的图像编辑技能时,可以提问:

- “图像编辑技能需要支持哪些功能?是否只包括编辑与旋转?”
- “能否提供几个使用该技能的例子?”
- “我想到的需求包括‘去除红眼’或‘旋转图片’,你还希望覆盖哪些场景?”
- “用户说些什么时应该触发这个技能?”

为避免信息过载,不要一次提出过多问题。先问最关键的,再根据需要追问。

当你对技能需要支持的功能已有清晰认知,就可以进入下一步。

### 第 2 步:规划可复用的技能内容

为了把具体示例转化为高效技能,需要逐个分析这些示例:

1. 思考如何从零执行该示例
2. 判断哪些脚本、参考资料或素材能在重复执行时派上用场

示例:要构建处理“帮我旋转这份 PDF”请求的 `pdf-editor` 技能:

1. 旋转 PDF 的代码每次都要重写
2. 因此在技能中包含 `scripts/rotate_pdf.py` 会非常有用

示例:打造 `frontend-webapp-builder` 技能,需支持“构建待办应用”“构建步数仪表盘”等请求:

1. 构建前端应用需要重复的 HTML/React 脚手架
2. 因此可以在 `assets/hello-world/` 中提供完整的模板项目

示例:设计 `big-query` 技能,需回答“今天有多少用户登录?”这类问题:

1. 查询 BigQuery 需要频繁查阅数据表结构与关系
2. 因此可以在 `references/schema.md` 中记录表结构说明

为了确定技能内容,请对每个示例进行分析,列出需要包含的可复用资产:脚本、参考资料、素材。

### 第 3 步:初始化技能

此时可以着手实际创建技能。

若技能尚不存在,也不是要在既有技能上迭代或重新打包,则不要跳过此步。

从零开始创建技能时,务必运行 `init_skill.py` 脚本。该脚本会生成一个带完整目录结构的技能模板,大幅提升效率与可靠性。

用法:

```bash
scripts/init_skill.py <skill-name> --path <output-directory>
```

脚本将:
- 在指定路径创建技能目录
- 生成带有正确前言区与 TODO 提示的 SKILL.md
- 创建示例资源目录:`scripts/`、`references/`、`assets/`
- 在每个目录中放入可定制或删除的示例文件

初始化后,请根据需求调整或删除这些示例文件。

### 第 4 步:编辑技能

无论是新技能还是已有技能,都应牢记:技能是供另一实例的 Claude 使用的。重点在于提供对 Claude 有价值且不显而易见的信息。思考有哪些流程知识、领域细节或可复用资产能让 Claude 更高效。

#### 从可复用内容着手

实现时先处理第二步中确定的 `scripts/`、`references/`、`assets/`。此过程可能需要用户提供素材。例如实现 `brand-guidelines` 技能时,用户可能需要提供品牌资产或模板存入 `assets/`,以及需放入 `references/` 的品牌文档。

此外,请删除不需要的示例文件与目录。初始化脚本仅为演示结构提供示例,大多数技能并不需要全部示例文件。

#### 更新 SKILL.md

**写作风格:** 全文使用**祈使句 / 动词原形**指令(动词开头),不要使用第二人称。采用客观、指导式的语气,例如 “To accomplish X, do Y”,避免 “You should do X” 或 “If you need to do X”。这样的写法更契合 AI 消化。

补写 SKILL.md 时,请回答以下问题:

1. 该技能的目标是什么?(数句概述)
2. 何时应使用该技能?
3. 实际操作中,Claude 应如何使用该技能?请引用所有可复用资源,确保 Claude 知道如何调用它们。

### 第 5 步:打包技能

当技能准备就绪,需要将其打包为可分发的 zip 文件,供用户下载。打包流程会自动先验证技能是否符合要求:

```bash
scripts/package_skill.py <path/to/skill-folder>
```

可选地指定输出目录:

```bash
scripts/package_skill.py <path/to/skill-folder> ./dist
```

打包脚本会:

1. **自动验证** 技能内容,检查:
   - YAML 前言区格式与必填字段
   - 技能命名规范与目录结构
   - 描述是否完整且符合要求
   - 文件组织与资源引用是否正确

2. **通过验证后打包**:生成以技能命名的 zip 文件(如 `my-skill.zip`),包含全部文件并保持正确目录结构,便于分发。

如验证失败,脚本会输出错误并直接退出,不会生成包。请修复问题后再次运行打包命令。

### 第 6 步:迭代

在技能投入使用后,用户可能会提出改进需求——通常发生在刚使用完技能、上下文记忆尤为鲜明的时候。

**迭代流程:**
1. 在真实任务中使用技能
2. 观察瓶颈或低效之处
3. 确定需要更新 SKILL.md 或捆绑资源的位置
4. 实施修改并再次测试

Overview

This skill is a practical guide for creating modular, reusable skills that extend Claude with domain workflows, tool integrations, and repeatable assets. It walks through understanding real examples, planning reusable content, initializing a structured skill folder, adding deterministic scripts and references, packaging, and iterating after real-world use. Focus on making Claude an expert by encoding process, assets, and precise metadata.

How this skill works

Analyze concrete user scenarios to derive the workflows, scripts, references, and assets that must be reusable. Generate a consistent directory structure and starter files, include deterministic scripts for repeatable tasks, add reference documents for on-demand context, and provide assets for direct output. Validate metadata and structure, produce a distributable package, and recommend iterative updates based on usage feedback.

When to use it

  • Start a new skill from scratch to capture repeatable workflows or domain knowledge
  • Refactor an existing ad-hoc process into reusable scripts and templates
  • Integrate a file format or API so Claude can perform deterministic tasks
  • Provide company-specific policies, data schemas, or developer assets for on-demand loading
  • Package a skill for distribution to other teams or environments

Best practices

  • Derive the skill from concrete examples before designing reusable parts
  • Encapsulate deterministic operations as executable scripts to save tokens and improve reliability
  • Keep large domain details in separate reference documents and load only when needed
  • Include assets (templates, icons, code scaffolds) for direct use without loading into context
  • Write clear metadata and concise descriptions so Claude knows when to trigger the skill
  • Iterate after real usage: observe bottlenecks, update docs and scripts, and repackage

Example use cases

  • Create a PDF tool that rotates and cleans documents using a bundled script and a small usage guide
  • Build a frontend scaffolding skill with an assets folder containing starter project templates
  • Produce a data-query skill that includes a schema reference for on-demand queries against BigQuery
  • Package brand-guidelines with fonts and templates so Claude can generate compliant visuals
  • Bundle an API helper skill with examples and a script to call common endpoints

FAQ

How do I decide what belongs in a reference vs. the main guide?

Place core workflows and trigger criteria in the main guide; put large schemas, API docs, or long legal text in references and provide grep/search hints for large files.

When should I include executable scripts?

Include scripts when a task is repeated, requires determinism, or would waste tokens if re-written each time. Scripts improve reliability and can be executed outside the context.

What validation is recommended before packaging?

Validate metadata fields, naming conventions, directory layout, and that referenced resources exist and are linked. Run the packaging validator and fix reported issues before distribution.