create-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create a LaunchDarkly Skill

创建LaunchDarkly Skill

You're using a skill that will guide you through adding a new skill to the LaunchDarkly agent-skills repository. Your job is to explore existing skills to understand the patterns, assess what the new skill needs, create it following conventions, and verify it validates correctly.
你正在使用一个技能,它将引导你完成向LaunchDarkly agent-skills仓库添加新技能的过程。你的任务是探索现有技能以理解其模式,评估新技能的需求,遵循规范创建技能,并验证其是否能通过校验。

Prerequisites

前提条件

  • Access to the LaunchDarkly agent-skills repo (or a fork)
  • Understanding of the workflow you want to encode
  • Python 3.x (for validation scripts)
  • 拥有LaunchDarkly agent-skills仓库(或其分支)的访问权限
  • 了解你要编写的工作流程
  • Python 3.x(用于运行验证脚本)

Core Principles

核心原则

  1. Explore First: Look at existing skills before creating. Match their structure and style.
  2. Job to Be Done: Every skill should clearly state what job it helps accomplish.
  3. References for Details: Keep SKILL.md focused on the workflow. Move deep content to
    references/
    .
  4. Validate Before Commit: Run validation scripts to catch issues.
  1. 先探索:在创建前查看现有技能,匹配它们的结构和风格。
  2. 待完成工作:每个技能都应明确说明它能帮助完成什么工作。
  3. 细节参考:保持SKILL.md聚焦于工作流程,将详细内容移至
    references/
    目录。
  4. 提交前验证:运行验证脚本以发现问题。

Workflow

工作流程

Step 1: Explore Existing Skills

步骤1:探索现有技能

Before creating anything, understand how skills are structured in this repo.
  1. Browse the skills directory.
    • Look at
      skills/feature-flags/
      and other categories
    • Note the directory layout:
      skills/<category>/<skill-name>/
    • Each skill has
      SKILL.md
      and optionally
      references/
      ,
      README.md
      ,
      marketplace.json
  2. Read 1–2 similar skills.
    • If adding a feature-flag skill, read
      launchdarkly-flag-create
      or
      launchdarkly-flag-cleanup
    • If adding an AI-config skill, read those under
      ai-configs/
      if present
    • Observe: job-to-be-done intro, workflow steps, Core Principles, Edge Cases, What NOT to Do, References
  3. Check the template.
    • Read
      template/SKILL.md.template
      for the expected structure
    • The template reflects the workflow-based pattern used across skills
See Skill Structure for the full structure guide.
在创建任何内容之前,先了解本仓库中技能的结构。
  1. 浏览skills目录
    • 查看
      skills/feature-flags/
      和其他分类
    • 注意目录布局:
      skills/<category>/<skill-name>/
    • 每个技能包含
      SKILL.md
      ,可选包含
      references/
      README.md
      marketplace.json
  2. 阅读1-2个类似技能
    • 如果要添加功能标志技能,阅读
      launchdarkly-flag-create
      launchdarkly-flag-cleanup
    • 如果要添加AI配置技能,阅读
      ai-configs/
      下的相关技能(若存在)
    • 观察:待完成工作介绍、工作流程步骤、核心原则、边缘情况、禁止操作、参考资料
  3. 查看模板
    • 阅读
      template/SKILL.md.template
      了解预期结构
    • 该模板反映了所有技能遵循的基于工作流程的模式
查看技能结构获取完整的结构指南。

Step 2: Assess What's Needed

步骤2:评估需求

Based on the user's request and your exploration:
  1. Choose category and name.
    • Category:
      feature-flags
      ,
      ai-configs
      ,
      skill-authoring
      , or new category
    • Name: lowercase, hyphens only, under 64 chars (e.g.,
      my-new-skill
      )
    • Directory:
      skills/<category>/<skill-name>/
  2. Identify the job to be done.
    • What does the user want to accomplish?
    • What should the agent explore, assess, and verify?
    • What references will the skill need?
  3. Plan the workflow.
    • Step 1: Explore (what to look for)
    • Step 2: Assess (decision table or logic)
    • Step 3: Execute (with references)
    • Step 4: Verify (what the agent actually does)
See Frontmatter & Metadata for required fields.
基于用户的请求和你的探索结果:
  1. 选择分类和名称
    • 分类:
      feature-flags
      ai-configs
      skill-authoring
      或新分类
    • 名称:小写字母,仅使用连字符,长度不超过64个字符(例如:
      my-new-skill
    • 目录:
      skills/<category>/<skill-name>/
  2. 确定待完成工作
    • 用户想要完成什么?
    • 代理应该探索、评估和验证什么?
    • 该技能需要哪些参考资料?
  3. 规划工作流程
    • 步骤1:探索(需要查找的内容)
    • 步骤2:评估(决策表或逻辑)
    • 步骤3:执行(附带参考资料)
    • 步骤4:验证(代理实际执行的操作)
查看前置内容与元数据获取必填字段信息。

Step 3: Create the Skill

步骤3:创建技能

  1. Create the directory.
    skills/<category>/<skill-name>/
  2. Create SKILL.md.
    • Copy
      template/SKILL.md.template
      into the new directory
    • Fill in frontmatter:
      name
      (must match folder name),
      description
      ,
      compatibility
      ,
      metadata
    • Write the job-to-be-done intro and workflow steps
    • Link to references for detailed content
    • Keep SKILL.md under 500 lines
  3. Add references.
    • Create
      references/
      directory
    • Add reference files for implementation details, API patterns, decision guides
    • Link from SKILL.md
  4. Add supporting files (optional).
    • README.md
      — short description, link to SKILL.md
    • marketplace.json
      — if publishing to a marketplace (see existing skills for format)
  5. Update repo docs.
    • Add the skill to the table in
      README.md
    • If the skill requires specific tools, document them in the skill
See Skill Structure for file layout and content guidelines.
  1. 创建目录
    skills/<category>/<skill-name>/
  2. 创建SKILL.md
    • template/SKILL.md.template
      复制到新目录
    • 填写前置内容:
      name
      (必须与文件夹名称匹配)、
      description
      compatibility
      metadata
    • 编写待完成工作介绍和工作流程步骤
    • 链接到参考资料获取详细内容
    • 保持SKILL.md长度不超过500行
  3. 添加参考资料
    • 创建
      references/
      目录
    • 添加包含实现细节、API模式、决策指南的参考文件
    • 从SKILL.md链接到这些参考资料
  4. 添加支持文件(可选)
    • README.md
      — 简短描述,链接到SKILL.md
    • marketplace.json
      — 若要发布到市场,参考现有技能的格式
  5. 更新仓库文档
    • README.md
      的表格中添加新技能
    • 如果该技能需要特定工具,在技能文档中说明
查看技能结构获取文件布局和内容指南。

Step 4: Update the Catalog

步骤4:更新目录

Regenerate the skills catalog so the new skill is discoverable:
bash
python3 scripts/generate_catalog.py
This updates
skills.json
. Commit the updated file with your new skill.
重新生成技能目录,使新技能可被发现:
bash
python3 scripts/generate_catalog.py
此命令会更新
skills.json
。提交代码时请包含更新后的文件。

Step 5: Verify

步骤5:验证

Confirm the skill is valid and complete:
  1. Run validation:
    bash
    python3 scripts/validate_skills.py
    Fix any reported errors (frontmatter, naming, length limits).
  2. Run tests (if present):
    bash
    python3 -m unittest discover -s tests
  3. Check structure:
    • SKILL.md exists and has valid frontmatter
    • name
      in frontmatter matches directory name
    • References are linked and exist
    • README.md table includes the new skill
  4. Report results:
    • ✓ Skill created and validates
    • ✓ Catalog updated
    • ⚠️ Flag any validation issues or missing pieces
确认技能有效且完整:
  1. 运行验证
    bash
    python3 scripts/validate_skills.py
    修复所有报告的错误(如前置内容、命名、长度限制问题)。
  2. 运行测试(若存在)
    bash
    python3 -m unittest discover -s tests
  3. 检查结构
    • SKILL.md存在且包含有效的前置内容
    • 前置内容中的
      name
      与目录名称匹配
    • 参考资料已链接且存在
    • README.md的表格中包含新技能
  4. 报告结果
    • ✓ 技能已创建且通过验证
    • ✓ 目录已更新
    • ⚠️ 标记任何验证问题或缺失内容

Edge Cases

边缘情况

SituationAction
name
doesn't match folder name
Fix folder name or frontmatter so they match exactly
SKILL.md over 500 linesMove detailed content into
references/
Category doesn't existCreate
skills/<new-category>/
and add the skill
Marketplace.json neededCopy format from
launchdarkly-flag-create/marketplace.json
Validation failsFix the specific error (often frontmatter or naming)
Catalog not regeneratedRun
python3 scripts/generate_catalog.py
before commit
场景操作
name
与文件夹名称不匹配
修改文件夹名称或前置内容,使两者完全匹配
SKILL.md超过500行将详细内容移至
references/
目录
分类不存在创建
skills/<new-category>/
目录并添加技能
需要marketplace.json参考
launchdarkly-flag-create/marketplace.json
的格式
验证失败修复具体错误(通常是前置内容或命名问题)
目录未重新生成提交前运行
python3 scripts/generate_catalog.py

What NOT to Do

禁止操作

  • Don't create a skill without exploring existing ones first
  • Don't put long implementation details in SKILL.md — use references
  • Don't forget to run
    validate_skills.py
    before committing
  • Don't skip updating README.md and the catalog
  • Don't use internal-only links or tools unless the skill is internal-only
  • 不要在未探索现有技能的情况下创建新技能
  • 不要在SKILL.md中放入冗长的实现细节 — 使用参考资料
  • 提交前不要忘记运行
    validate_skills.py
  • 不要跳过更新README.md和目录的步骤
  • 除非是内部专用技能,否则不要使用仅限内部的链接或工具

References

参考资料

  • Skill Structure — File layout, workflow pattern, content guidelines
  • Frontmatter & Metadata — Required fields, naming rules, versioning
  • 技能结构 — 文件布局、工作流程模式、内容指南
  • 前置内容与元数据 — 必填字段、命名规则、版本控制