关于 skill-creator
用于创建可复用 Agent 技能的指南,说明结构、命名、内容、引用和注册规范,面向构建通用或项目专用技能的贡献者,尤其适用于 Prowler 仓库。
主要功能
- 01技能创建判断标准
- 02SKILL.md 结构与字段
- 03命名规范
- 04资源与引用的选择指南
- 05内容规范与检查清单
- 06在 AGENTS.md 中注册
适用场景
- 01创建可复用的项目技能
- 02选择 assets 或 references
- 03定义技能触发条件和元数据
- 04为 Agent 注册技能
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ prowler-cloud/ prowler --skill skill-creator安装后在 Claude Code 中输入/skill-creator确认已加载。
附带文件assets/SKILL-TEMPLATE.md
详细介绍
何时创建技能
在以下情况下创建技能:
- 某种模式会被反复使用,且 AI 需要相关指导
- 项目特定约定与通用最佳实践不同
- 复杂工作流需要分步说明
- 决策树有助于 AI 选择正确的方法
不要在以下情况下创建技能:
- 已有文档(请改为创建参考资料)
- 模式很简单或不言自明
- 这是一次性任务
技能结构
skills/{skill-name}/
├── SKILL.md # Required - main skill file
├── assets/ # Optional - templates, schemas, examples
│ ├── template.py
│ └── schema.json
└── references/ # Optional - links to local docs
└── docs.md # Points to docs/developer-guide/*.mdx
SKILL.md 模板
---
name: {skill-name}
description: >
{One-line description of what this skill does}.
Trigger: {When the AI should load this skill}.
license: Apache-2.0
metadata:
author: prowler-cloud
version: "1.0"
---
## When to Use
{Bullet points of when to use this skill}
## Critical Patterns
{The most important rules - what AI MUST know}
## Code Examples
{Minimal, focused examples}
## Commands
```bash
{Common commands}
```
## Resources
- **Templates**: See [assets/](assets/) for {description}
- **Documentation**: See [references/](references/) for local docs
命名约定
| 类型 | 模式 | 示例 |
|---|---|---|
| 通用技能 | {technology} | pytest、playwright、typescript |
| Prowler 专用 | prowler-{component} | prowler-api、prowler-ui、prowler-sdk-check |
| 测试技能 | prowler-test-{component} | prowler-test-sdk、prowler-test-api |
| 工作流技能 | {action}-{target} | skill-creator、jira-task |
决策:assets/ 还是 references/
Need code templates? → assets/
Need JSON schemas? → assets/
Need example configs? → assets/
Link to existing docs? → references/
Link to external guides? → references/ (with local path)
关键规则:references/ 应指向本地文件(docs/developer-guide/*.mdx),而非网页 URL。
决策:Prowler 专用还是通用
Patterns apply to ANY project? → Generic skill (e.g., pytest, typescript)
Patterns are Prowler-specific? → prowler-{name} skill
Generic skill needs Prowler info? → Add references/ pointing to Prowler docs
Frontmatter 字段
| 字段 | 必填 | 说明 |
|---|---|---|
name | 是 | 技能标识符(小写,使用连字符) |
description | 是 | 在同一段中说明内容和触发条件 |
license | 是 | Prowler 始终使用 Apache-2.0 |
metadata.author | 是 | prowler-cloud |
metadata.version | 是 | 字符串格式的语义化版本号 |
内容指南
应该做
- 从最关键的模式开始
- 使用表格呈现决策树
- 保持代码示例简短且聚焦
- 添加 Commands 章节,列出可直接复制粘贴的命令
不应该做
- 添加 Keywords 章节(Agent 会搜索 frontmatter,而非正文)
- 复制现有文档的内容(改为引用)
- 添加冗长说明(链接到文档)
- 添加故障排除章节(保持内容聚焦)
- 在 references 中使用网页 URL(改用本地路径)
注册技能
创建技能后,将其添加到 AGENTS.md:
| `{skill-name}` | {Description} | [SKILL.md](skills/{skill-name}/SKILL.md) |
创建前检查清单
- 技能尚不存在(检查
skills/) - 模式可复用(不是一次性任务)
- 名称遵循约定
- Frontmatter 完整(description 包含触发关键词)
- 关键模式清晰
- 代码示例简短
- 存在 Commands 章节
- 已添加到 AGENTS.md
资源
- 模板:参阅 assets/ 中的 SKILL.md 模板
评论
支持 Markdown