skill-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Creator — OpenAkita 技能创建指南

Skill Creator — OpenAkita Skill Creation Guide

技能是什么

What is a Skill

技能是模块化的、自包含的能力包,通过 SKILL.md 定义,扩展 OpenAkita 的能力。每个技能包含:
  • SKILL.md
    (必需):YAML frontmatter(name + description)+ Markdown 指令
  • scripts/
    (可选):可执行脚本(Python/Bash)
  • references/
    (可选):参考文档
  • assets/
    (可选):模板、图片等资源文件
A skill is a modular, self-contained capability package defined via SKILL.md that extends the capabilities of OpenAkita. Each skill includes:
  • SKILL.md
    (required): YAML frontmatter (name + description) + Markdown instructions
  • scripts/
    (optional): Executable scripts (Python/Bash)
  • references/
    (optional): Reference documents
  • assets/
    (optional): Resource files such as templates, images, etc.

何时创建技能

When to Create a Skill

  1. 同类操作第二次出现(持久化规则)
  2. 用户明确要求创建技能
  3. 任务涉及复杂多步流程且可能复用
  4. 现有临时脚本需要升级为可复用能力
  1. The same type of operation occurs for the second time (persistence rule)
  2. Users explicitly request to create a skill
  3. The task involves a complex multi-step process and may be reused
  4. Existing temporary scripts need to be upgraded to reusable capabilities

创建流程

Creation Process

1. 确定技能范围

1. Determine Skill Scope

明确技能要解决什么问题、触发条件是什么、需要哪些资源。
Clarify what problem the skill solves, what the trigger conditions are, and what resources are required.

2. 创建技能目录

2. Create Skill Directory

skills/
下创建目录:
skills/{skill-name}/
├── SKILL.md          # 必需:技能定义
├── scripts/          # 可选:可执行脚本
├── references/       # 可选:参考文档
└── assets/           # 可选:模板等资源
Create a directory under
skills/
:
skills/{skill-name}/
├── SKILL.md          # Required: Skill definition
├── scripts/          # Optional: Executable scripts
├── references/       # Optional: Reference documents
└── assets/           # Optional: Resources such as templates

3. 编写 SKILL.md

3. Write SKILL.md

Frontmatter(必需)
yaml
---
name: skill-name
description: 清晰描述技能功能和触发条件。description 是触发机制,必须说明"做什么"和"何时用"。
---
正文:使用 Markdown 编写使用指令。原则:
  • OpenAkita 已经很聪明,只写它不知道的信息
  • 简洁优先,示例优于冗长解释
  • 正文控制在 500 行以内,超出部分拆到 references/
Frontmatter (required):
yaml
---
name: skill-name
description: Clearly describe the skill function and trigger conditions. description is the trigger mechanism, and must specify "what to do" and "when to use".
---
Body: Write usage instructions in Markdown. Principles:
  • OpenAkita is already very smart, only write information it does not know
  • Prioritize conciseness, examples are better than lengthy explanations
  • The body should be controlled within 500 lines, and the excess part should be split into references/

4. 编写脚本(如需要)

4. Write Scripts (if needed)

将确定性操作封装为
scripts/
下的脚本:
  • 脚本必须实际运行测试,确保无 bug
  • 使用
    run_skill_script
    执行
Encapsulate deterministic operations as scripts under
scripts/
:
  • Scripts must be actually run and tested to ensure no bugs
  • Use
    run_skill_script
    for execution

5. 加载技能

5. Load Skill

创建完成后,使用
load_skill
将技能加载到系统中,使其在技能清单中可见。
After creation, use
load_skill
to load the skill into the system so that it is visible in the skill list.

改进现有技能

Improve Existing Skills

  1. 使用
    get_skill_info
    查看当前技能内容
  2. 修改 SKILL.md 或脚本文件
  3. 使用
    reload_skill
    重新加载
  1. Use
    get_skill_info
    to view the current skill content
  2. Modify SKILL.md or script files
  3. Use
    reload_skill
    to reload

关键原则

Key Principles

  • 上下文窗口是公共资源:技能与系统提示词、对话历史共享上下文,每一行都要值得其 token 开销
  • 渐进式披露:frontmatter 始终可见(~100词),正文仅在技能触发后加载,脚本按需执行
  • 不要创建多余文件:不需要 README.md、CHANGELOG.md 等辅助文件
  • Context window is a public resource: Skills share context with system prompts and conversation history, each line must be worth its token cost
  • Progressive disclosure: frontmatter is always visible (~100 words), the body is only loaded after the skill is triggered, and scripts are executed on demand
  • Do not create redundant files: No need for auxiliary files such as README.md, CHANGELOG.md, etc.