skill-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to Create a Skill

何时创建技能

Create a skill when:
  • A pattern is used repeatedly and AI needs guidance
  • Project-specific conventions differ from generic best practices
  • Complex workflows need step-by-step instructions
  • Decision trees help AI choose the right approach
Don't create a skill when:
  • Documentation already exists (create a reference instead)
  • Pattern is trivial or self-explanatory
  • It's a one-off task

在以下情况时创建技能:
  • 某一模式被重复使用,且AI需要指导
  • 项目特定约定与通用最佳实践不同
  • 复杂工作流需要分步指令
  • 决策树可帮助AI选择正确的方法
请勿创建技能的情况:
  • 已有对应文档(应创建引用链接)
  • 模式琐碎或不言自明
  • 属于一次性任务

Skill Structure

技能结构

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

skills/{skill-name}/
├── SKILL.md              # 必填 - 主技能文件
├── assets/               # 可选 - 模板、模式、示例
│   ├── template.py
│   └── schema.json
└── references/           # 可选 - 本地文档链接
    └── docs.md           # 指向 docs/developer-guide/*.mdx

SKILL.md Template

SKILL.md 模板

markdown
---
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"
---
markdown
---
name: {skill-name}
description: >
  {该技能功能的单行描述}.
  Trigger: {AI应加载此技能的时机}.
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}
{最重要的规则 - AI必须了解的内容}

Code Examples

代码示例

{Minimal, focused examples}
{简洁、聚焦的示例}

Commands

命令

bash
{Common commands}
bash
{常用命令}

Resources

参考资源

  • Templates: See assets/ for {description}
  • Documentation: See references/ for local docs

---
  • 模板: 查看 assets/ 获取 {描述}
  • 文档: 查看 references/ 获取本地文档

---

Naming Conventions

命名规范

TypePatternExamples
Generic skill
{technology}
pytest
,
playwright
,
typescript
Prowler-specific
prowler-{component}
prowler-api
,
prowler-ui
,
prowler-sdk-check
Testing skill
prowler-test-{component}
prowler-test-sdk
,
prowler-test-api
Workflow skill
{action}-{target}
skill-creator
,
jira-task

类型模式示例
通用技能
{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

Decision: assets/ vs references/

决策: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)
Key Rule:
references/
should point to LOCAL files (
docs/developer-guide/*.mdx
), not web URLs.

需要代码模板?        → assets/
需要JSON模式?          → assets/
需要示例配置?       → assets/
链接已有文档?      → references/
链接外部指南?    → references/(使用本地路径)
核心规则:
references/
应指向本地文件(
docs/developer-guide/*.mdx
),而非网页URL。

Decision: Prowler-Specific vs Generic

决策:Prowler专属 vs 通用

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

模式适用于所有项目?     → 通用技能(如 pytest, typescript)
模式为Prowler专属?     → prowler-{name} 技能
通用技能需Prowler相关信息?  → 添加 references/ 指向Prowler文档

Frontmatter Fields

前置元数据字段

FieldRequiredDescription
name
YesSkill identifier (lowercase, hyphens)
description
YesWhat + Trigger in one block
license
YesAlways
Apache-2.0
for Prowler
metadata.author
Yes
prowler-cloud
metadata.version
YesSemantic version as string

字段是否必填描述
name
技能标识符(小写,连字符分隔)
description
功能+触发条件的单行描述
license
Prowler项目统一使用
Apache-2.0
metadata.author
prowler-cloud
metadata.version
语义化版本号(字符串格式)

Content Guidelines

内容指南

DO

建议

  • Start with the most critical patterns
  • Use tables for decision trees
  • Keep code examples minimal and focused
  • Include Commands section with copy-paste commands
  • 从最核心的模式开始编写
  • 使用表格呈现决策树
  • 代码示例保持简洁聚焦
  • 包含命令部分,提供可直接复制粘贴的命令

DON'T

禁忌

  • Add Keywords section (agent searches frontmatter, not body)
  • Duplicate content from existing docs (reference instead)
  • Include lengthy explanations (link to docs)
  • Add troubleshooting sections (keep focused)
  • Use web URLs in references (use local paths)

  • 不要添加关键词部分(Agent会搜索前置元数据,而非正文)
  • 不要重复已有文档的内容(应使用引用链接)
  • 不要包含冗长的解释(链接至文档即可)
  • 不要添加故障排除部分(保持内容聚焦)
  • 不要在引用中使用网页URL(使用本地路径)

Registering the Skill

注册技能

After creating the skill, add it to
AGENTS.md
:
markdown
| `{skill-name}` | {Description} | [SKILL.md](skills/{skill-name}/SKILL.md) |

创建技能后,将其添加至
AGENTS.md
markdown
| `{skill-name}` | {描述} | [SKILL.md](skills/{skill-name}/SKILL.md) |

Checklist Before Creating

创建前检查清单

  • Skill doesn't already exist (check
    skills/
    )
  • Pattern is reusable (not one-off)
  • Name follows conventions
  • Frontmatter is complete (description includes trigger keywords)
  • Critical patterns are clear
  • Code examples are minimal
  • Commands section exists
  • Added to AGENTS.md
  • 技能不存在于
    skills/
    目录中
  • 模式具有可复用性(非一次性任务)
  • 名称符合命名规范
  • 前置元数据完整(描述包含触发关键词)
  • 核心模式清晰明确
  • 代码示例简洁
  • 包含命令部分
  • 已添加至AGENTS.md

Resources

参考资源

  • Templates: See assets/ for SKILL.md template
  • 模板: 查看 assets/ 获取SKILL.md模板