Skill 是 Agent 接到任务时翻看的作业指南。如果说 Tool 是「Agent 调用的代码」,Skill 就是「Agent 加载进上下文的散文」—— 长篇说明、示例、格式规范、边界条件。Agent 根据 Skill 的Documentation Index
Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt
Use this file to discover all available pages before exploring further.
description 自己决定什么时候用哪份。
Mirobody 直接支持 Claude Agent Skills 格式:skills/ 下任何包含 SKILL.md 的目录都会在启动时被自动发现,并暴露给所有启用了 skill 加载器的 Agent。
文件布局
SKILL.md;同目录其它文件通过相对路径在 playbook 里引用。
SKILL.md
| 字段 | 是否必需 | 用途 |
|---|---|---|
name | 是 | 稳定标识,kebab-case。日志和工具调用里会用到。 |
description | 是 | 这个 Skill 做什么、什么时候用。模型决定要不要加载该 skill 时逐字看到这段。一定要把触发条件说清楚。 |
license | 建议 | 自由文本,标注许可证。 |
metadata.json
metadata.json 是 Mirobody 专有的,比 SKILL.md 正文轻量许多,是 Skill 加载器优先扫描的内容。
| 字段 | 用途 |
|---|---|
name | 必须和 frontmatter name 一致 |
summary | 一两句话的卖点描述。Skill 列表里展示用。 |
when_to_use | 意图触发关键词数组。Orchestrator 把用户请求和这些匹配。 |
when_not_to_use | 反向触发 —— 防止过度激活。 |
tags | 自由标签,过滤用。 |
when_to_use / when_not_to_use 留空,加载器退回去匹配 SKILL.md 里的 description。
一个完整例子:xlsx skill
上游仓库在 skills/ 下自带 4 个参考 skill:xlsx、pdf、pptx、docx。xlsx 最有代表性:
- Agent(例如 DeepAgent)在用户消息里看到
.xlsx附件。 - Skill 加载器扫描
metadata.json,xlsx的summary命中。 - 整份
SKILL.md正文被注入本轮的 system context。 - Agent 此时已经掌握所有格式标准、配色规范、
recalc.py用法 —— 不需要额外的工具调用。
添加你自己的 Skill
写 `SKILL.md`
先写 frontmatter(
name、description、license)。正文用纯 Markdown 写 playbook —— 像”给新同事 onboarding”那种调调:明确、配走通的示例。写 `metadata.json`
至少包含
name、summary,加上填好的 when_to_use 或者 SKILL.md 里写到位的 description。需要在自定义 Agent 里过滤就再加 tags。Skill 与 Tool 的速查对比
| Tool | Skill | |
|---|---|---|
| 形式 | Python 函数 | Markdown playbook + 元数据 |
| Agent 怎么用 | 当函数调,读返回值 | 满足条件时把整份正文加载进上下文 |
| 最适合 | 有副作用的动作、结构化数据获取 | 领域规则、格式、示例、风格指南 |
| 发现机制 | 从 tools/ 自动加载 | 从 skills/ 自动加载 |
| 版本管理 | 用 pinned import | 用文件夹本身 + git |
health-coach skill 规定给用户建议时的语气和结构,配上 fetch_health_data、search_health_indicators、chart_* 这些 tool 提供底层数据。
下一步
添加 Tool
另一半:写 Agent 能调用的 Python 函数。
Tool 与 Agent 概览
了解 Skill、Tool、三种 Agent 如何配合。