skill-creator by starchild-ai-agent/official-skills
npx skills add https://github.com/starchild-ai-agent/official-skills --skill skill-creatorfrontmatter, optional scripts/, references/, and assets/ subdirectories based on your needs
SKILL.md
创建新技能以永久扩展您的能力。
简洁是关键。 上下文窗口是系统提示、技能、对话历史和您的推理之间的共享资源。SKILL.md 中的每一行都在与其他所有内容竞争。只添加您尚不了解的内容——不要记录系统提示中可见的工具参数,不要为您能想明白的事情规定逐步工作流程。专注于领域知识、解读指南、决策框架和注意事项。
渐进式披露。 技能分三个层级加载:
<available_skills> 中。这是您决定激活哪个技能的方式。描述必须是强有力的触发词。read_file 加载完整的 SKILL.md 主体。这是工作流程、指南和决策树所在的位置。这意味着:保持 SKILL.md 主体精简(< 500 行)。将详细的 API 文档放在 references/ 中。将自动化放在 中。主体内容应该是您开始工作所需的内容,而不是百科全书。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
scripts/自由度。 根据任务的脆弱性匹配指令的详细程度:
scripts/ 中的脚本)—— 当操作脆弱、需要精确语法或是重复的样板代码时。将代码放在独立的脚本中执行,而不是加载到上下文中。例如:使用精确颜色代码和 API 调用的图表渲染。默认假设:您已经很聪明。只添加您尚不具备的上下文。
my-skill/
├── SKILL.md # 必需:Frontmatter + 指令
├── scripts/ # 可选:可执行代码(低自由度)
│ └── render.py # 通过 bash 运行,不加载到上下文中
├── references/ # 可选:按需加载的文档(中等自由度)
│ └── api-guide.md # 需要时通过 read_file 加载
└── assets/ # 可选:模板、图像、数据文件
└── template.json # 不加载到上下文中,用于输出
何时使用每个部分:
| 目录 | 加载到上下文中? | 用途 |
|---|---|---|
| SKILL.md 主体 | 激活时 | 核心工作流程、决策树、注意事项 |
scripts/ | 从不(执行) | 脆弱操作、精确语法、样板代码 |
references/ | 按需 | 详细的 API 文档、长篇指南、查找表 |
assets/ | 从不 | 输出中使用的模板、图像、数据文件 |
在搭建框架之前,先理解您要构建什么:
示例:
使用初始化脚本:
python skills/skill-creator/scripts/init_skill.py my-new-skill --path ./workspace/skills
使用资源目录:
python skills/skill-creator/scripts/init_skill.py api-helper --path ./workspace/skills --resources scripts,references
使用示例文件:
python skills/skill-creator/scripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples
在编写之前,决定内容放在哪里:
使用 read_file 和 write_file 来完成生成的 SKILL.md:
主体设计模式:
python skills/skill-creator/scripts/validate_skill.py ./workspace/skills/my-new-skill
调用 skill_refresh 工具使技能可用:
skill_refresh()
Frontmatter 使用 metadata.starchild 来存放 Star Child 特定的字段:
---
name: skill-name
description: "此技能的作用。在 [特定触发场景] 时使用。"
metadata:
starchild:
emoji: "🔧"
skillKey: skill-name
requires:
env: [API_KEY_NAME]
bins: [python]
anyBins: [curl, wget]
install:
- kind: pip
package: pandas
- kind: apt
package: curl
bins: [curl]
user-invocable: true
disable-model-invocation: false
---
字段参考:
| 字段 | 位置 | 必需 | 用途 |
|---|---|---|---|
name | 顶层 | 是 | 技能标识符(小写连字符格式) |
description | 顶层 | 是 | 触发文本 —— 智能体应在何时使用此技能? |
emoji | metadata.starchild | 否 | 显示表情符号 |
skillKey | metadata.starchild | 否 | 去重键 |
requires.env | metadata.starchild | 否 | 必需的环境变量 |
requires.bins | metadata.starchild | 否 | 必需的二进制文件(必须全部存在) |
requires.anyBins | metadata.starchild | 否 | 必需的二进制文件(任意一个即可) |
install | metadata.starchild | 否 | 如何安装依赖项(pip、apt、npm 等) |
user-invocable | 顶层 | 否 | 用户是否可以通过 /command 触发(默认:true) |
disable-model-invocation | 顶层 | 否 | 从 <available_skills> 中隐藏(默认:false) |
如果技能涉及任何链上操作(发送交易、代币授权、交换、跨链桥接、签名、存款、取款、智能合约交互),请在 SKILL.md 顶部附近添加一个“先决条件”部分:
## 先决条件 —— 钱包策略
在执行任何 [操作] 之前,钱包策略必须处于激活状态。
加载 **wallet-policy** 技能并提议标准的通配符策略(拒绝密钥导出 + 允许 `*`)。这涵盖了所有链上的所有 [技能名称] 操作。
这确保智能体在尝试任何交易之前提议钱包策略。没有它,第一笔交易将因策略违规而失败。
描述就是触发词。 这是智能体决定激活您技能的方式。包含“在……时使用”以及具体场景。差:“交易工具。”好:“针对真实历史数据测试交易策略。在策略需要验证或在承诺采用某种交易方法之前使用。”
为智能体编写,而不是为用户。 该技能是给 AI 的指令。使用直接的语言:“您生成图表”而不是“此技能可用于生成图表。”
脚本执行时不加载。 适用于大型自动化。智能体仅在需要定制时才读取脚本,保持上下文清洁。
不要重复系统提示。 智能体已经看到工具名称和描述。专注于它不具备的知识:解读指南、决策树、特定领域的注意事项。
最后请求凭据。 先设计技能,然后再向用户询问 API 密钥。
刷新前始终验证 —— 运行 validate_skill.py 以尽早发现问题。
每周安装量
3.5K
仓库
GitHub Stars
1
首次出现
13 天前
安全审计
安装于
openclaw3.5K
kimi-cli72
amp72
cline72
github-copilot72
codex72
frontmatter, optional scripts/, references/, and assets/ subdirectories based on your needs
SKILL.md
Create new skills to permanently extend your capabilities.
Concise is key. The context window is a shared resource between the system prompt, skills, conversation history, and your reasoning. Every line in a SKILL.md competes with everything else. Only add what you don't already know — don't document tool parameters visible in the system prompt, don't prescribe step-by-step workflows for things you can figure out. Focus on domain knowledge, interpretation guides, decision frameworks, and gotchas.
Progressive disclosure. Skills load in three levels:
<available_skills> in every conversation. This is how you decide which skill to activate. The description must be a strong trigger.read_file when you decide the skill is relevant. This is where workflow, guidelines, and decision trees live.This means: keep the SKILL.md body lean (< 500 lines). Put detailed API docs in references/. Put automation in scripts/. The body should be what you need to start working , not an encyclopedia.
Degrees of freedom. Match instruction specificity to task fragility:
scripts/) — When operations are fragile, require exact syntax, or are repetitive boilerplate. Put the code in standalone scripts that get executed, not loaded into context. Example: Chart rendering with exact color codes and API calls.Default assumption: you are already smart. Only add context you don't already have.
my-skill/
├── SKILL.md # Required: Frontmatter + instructions
├── scripts/ # Optional: Executable code (low freedom)
│ └── render.py # Run via bash, not loaded into context
├── references/ # Optional: Docs loaded on demand (medium freedom)
│ └── api-guide.md # Loaded via read_file when needed
└── assets/ # Optional: Templates, images, data files
└── template.json # NOT loaded into context, used in output
When to use each:
| Directory | Loaded into context? | Use for |
|---|---|---|
| SKILL.md body | On activation | Core workflow, decision trees, gotchas |
scripts/ | Never (executed) | Fragile operations, exact syntax, boilerplate |
references/ | On demand | Detailed API docs, long guides, lookup tables |
assets/ | Never | Templates, images, data files used in output |
Before scaffolding, understand what you're building:
Examples:
Use the init script:
python skills/skill-creator/scripts/init_skill.py my-new-skill --path ./workspace/skills
With resource directories:
python skills/skill-creator/scripts/init_skill.py api-helper --path ./workspace/skills --resources scripts,references
With example files:
python skills/skill-creator/scripts/init_skill.py my-skill --path ./workspace/skills --resources scripts --examples
Before writing, decide what goes where:
Use read_file and write_file to complete the generated SKILL.md:
Design patterns for the body:
python skills/skill-creator/scripts/validate_skill.py ./workspace/skills/my-new-skill
Call the skill_refresh tool to make the skill available:
skill_refresh()
The frontmatter uses metadata.starchild for Star Child-specific fields:
---
name: skill-name
description: "What this skill does. Use when [specific trigger scenarios]."
metadata:
starchild:
emoji: "🔧"
skillKey: skill-name
requires:
env: [API_KEY_NAME]
bins: [python]
anyBins: [curl, wget]
install:
- kind: pip
package: pandas
- kind: apt
package: curl
bins: [curl]
user-invocable: true
disable-model-invocation: false
---
Field reference:
| Field | Location | Required | Purpose |
|---|---|---|---|
name | top-level | Yes | Skill identifier (lowercase hyphen-case) |
description | top-level | Yes | Trigger text — when should the agent use this? |
emoji | metadata.starchild | No | Display emoji |
skillKey |
If the skill involves any on-chain operations (sending transactions, token approvals, swaps, bridging, signing, deposits, withdrawals, smart contract interactions), add a Prerequisites section near the top of the SKILL.md:
## Prerequisites — Wallet Policy
Before executing any [operation], the wallet policy must be active.
Load the **wallet-policy** skill and propose the standard wildcard
policy (deny key export + allow `*`). This covers all [skill-name]
operations across all chains.
This ensures the agent proposes a wallet policy before attempting any transaction. Without it, the first transaction will fail with a policy violation.
Description is the trigger. This is how the agent decides to activate your skill. Include "Use when..." with specific scenarios. Bad: "Trading utilities." Good: "Test trading strategies against real historical data. Use when a strategy needs validation or before committing to a trade approach."
Write for the agent, not the user. The skill is instructions for the AI. Use direct language: "You generate charts" not "This skill can be used to generate charts."
Scripts execute without loading. Good for large automation. The agent reads the script only when it needs to customize, keeping context clean.
Don't duplicate the system prompt. The agent already sees tool names and descriptions. Focus on knowledge it doesn't have: interpretation guides, decision trees, domain-specific gotchas.
Request credentials last. Design the skill first, then ask the user for API keys.
Always validate before refreshing — run validate_skill.py to catch issues early.
Weekly Installs
3.5K
Repository
GitHub Stars
1
First Seen
13 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
openclaw3.5K
kimi-cli72
amp72
cline72
github-copilot72
codex72
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
metadata.starchild| No |
| Dedup key |
requires.env | metadata.starchild | No | Required env vars |
requires.bins | metadata.starchild | No | Required binaries (ALL must exist) |
requires.anyBins | metadata.starchild | No | Required binaries (ANY one) |
install | metadata.starchild | No | How to install deps (pip, apt, npm, etc.) |
user-invocable | top-level | No | Can user trigger via /command (default: true) |
disable-model-invocation | top-level | No | Hide from <available_skills> (default: false) |