mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
docs: make English the default docs language and fix link paths
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
---
|
||||
title: 创造技能
|
||||
description: 通过对话创建自定义技能
|
||||
title: Create Skills
|
||||
description: Create custom skills through conversation
|
||||
---
|
||||
|
||||
CowAgent 内置了 Skill Creator,可以通过自然语言对话快速创建、安装或更新技能。
|
||||
CowAgent includes a built-in Skill Creator that lets you quickly create, install, or update skills through natural language conversation.
|
||||
|
||||
## 使用方式
|
||||
## Usage
|
||||
|
||||
直接在对话中描述你想要的技能,Agent 会自动完成创建:
|
||||
Simply describe the skill you want in a conversation, and the Agent will handle the creation:
|
||||
|
||||
- 将工作流程固化为技能:"帮我把这个部署流程创建为一个技能"
|
||||
- 对接第三方 API:"根据这个接口文档创建一个技能"
|
||||
- 安装远程技能:"帮我安装 xxx 技能"
|
||||
- Codify workflows as skills: "Create a skill from this deployment process"
|
||||
- Integrate third-party APIs: "Create a skill based on this API documentation"
|
||||
- Install remote skills: "Install xxx skill for me"
|
||||
|
||||
## 创建流程
|
||||
## Creation Flow
|
||||
|
||||
1. 告诉 Agent 你想创建的技能功能
|
||||
2. Agent 自动生成 `SKILL.md` 说明文件和运行脚本
|
||||
3. 技能保存到工作空间的 `~/cow/skills/` 目录
|
||||
4. 后续对话中 Agent 会自动识别并使用该技能
|
||||
1. Tell the Agent what skill you want to create
|
||||
2. Agent automatically generates `SKILL.md` description and execution scripts
|
||||
3. Skill is saved to the workspace `~/cow/skills/` directory
|
||||
4. Agent will automatically recognize and use the skill in future conversations
|
||||
|
||||
<Frame>
|
||||
<img src="https://cdn.link-ai.tech/doc/20260202202247.png" width="800" />
|
||||
</Frame>
|
||||
|
||||
## SKILL.md 格式
|
||||
## SKILL.md Format
|
||||
|
||||
创建的技能遵循标准的 SKILL.md 格式:
|
||||
Created skills follow the standard SKILL.md format:
|
||||
|
||||
```markdown
|
||||
---
|
||||
@@ -45,14 +45,14 @@ metadata:
|
||||
Detailed instructions...
|
||||
```
|
||||
|
||||
| 字段 | 说明 |
|
||||
| Field | Description |
|
||||
| --- | --- |
|
||||
| `name` | 技能名称,需与目录名一致 |
|
||||
| `description` | 技能描述,Agent 据此决定是否调用 |
|
||||
| `metadata.requires.bins` | 依赖的系统命令 |
|
||||
| `metadata.requires.env` | 依赖的环境变量 |
|
||||
| `metadata.always` | 是否始终加载(默认 false) |
|
||||
| `name` | Skill name, must match directory name |
|
||||
| `description` | Skill description, Agent decides whether to invoke based on this |
|
||||
| `metadata.requires.bins` | Required system commands |
|
||||
| `metadata.requires.env` | Required environment variables |
|
||||
| `metadata.always` | Always load (default false) |
|
||||
|
||||
<Tip>
|
||||
详细开发文档可参考 [Skill Creator 说明](https://github.com/zhayujie/CowAgent/blob/master/skills/skill-creator/SKILL.md)。
|
||||
See the [Skill Creator documentation](https://github.com/zhayujie/CowAgent/blob/master/skills/skill-creator/SKILL.md) for details.
|
||||
</Tip>
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
---
|
||||
title: 技能广场
|
||||
description: 浏览、搜索和安装 AI Agent 技能
|
||||
title: Skill Hub
|
||||
description: Browse, search, and install AI Agent skills
|
||||
---
|
||||
|
||||
[Cow Skill Hub](https://skills.cowagent.ai/) 是开源的 AI Agent 技能广场,汇集了官方推荐、社区贡献和第三方平台(GitHub、ClawHub 等)的技能。
|
||||
[Cow Skill Hub](https://skills.cowagent.ai/) is an open-source skill marketplace for AI Agents, aggregating official picks, community contributions, and third-party skills from GitHub, ClawHub, and beyond.
|
||||
|
||||
开源仓库:[github.com/zhayujie/cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)
|
||||
Source code: [github.com/zhayujie/cow-skill-hub](https://github.com/zhayujie/cow-skill-hub)
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401110103.png" width="800" />
|
||||
|
||||
## 功能
|
||||
## Features
|
||||
|
||||
- **浏览技能**:按类别(推荐 / 社区 / 第三方)和标签筛选
|
||||
- **搜索技能**:按名称或描述搜索
|
||||
- **查看详情**:查看技能文档、文件内容、安装命令和依赖的环境变量
|
||||
- **一键安装**:复制安装命令即可在 CowAgent 中使用
|
||||
- **Browse skills** — filter by category (Featured / Community / Third-party) and tags
|
||||
- **Search skills** — find skills by name or description
|
||||
- **View details** — read the skill manifest, file contents, install command, and required environment variables
|
||||
- **One-click install** — copy the install command and run it in CowAgent
|
||||
|
||||
## 安装技能
|
||||
## Installing a skill
|
||||
|
||||
在对话中或终端中执行安装命令:
|
||||
Run the install command in chat or in your terminal:
|
||||
|
||||
<CodeGroup>
|
||||
```text 对话
|
||||
```text Chat
|
||||
/skill install <name>
|
||||
```
|
||||
|
||||
```bash 终端
|
||||
```bash Terminal
|
||||
cow skill install <name>
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
也可以在对话中浏览技能广场:
|
||||
You can also browse the marketplace directly from chat:
|
||||
|
||||
```text
|
||||
/skill list --remote
|
||||
/skill search <关键词>
|
||||
/skill search <keyword>
|
||||
```
|
||||
|
||||
除了在列表中展示的精选技能,还可以通过 **CLI命令 + Skill Hub** 安装各种第三方技能(**GitHub、ClawHub、LinkAI、URL** 等)参考 [安装技能](/skills/install)。
|
||||
Beyond the curated list, you can install third-party skills from **GitHub, ClawHub, LinkAI, or any URL** via the CLI. See [Installing skills](/skills/install) for details.
|
||||
|
||||
## 贡献技能
|
||||
## Contributing a skill
|
||||
|
||||
欢迎向技能广场提交你的技能:
|
||||
To submit your own skill:
|
||||
|
||||
1. 访问 [skills.cowagent.ai/submit](https://skills.cowagent.ai/submit)
|
||||
2. 使用 GitHub 或 Google 账号登录
|
||||
3. 上传包含 `SKILL.md` 的文件夹或 zip 包
|
||||
4. 自动解析技能名称、显示名称和描述,可按需修改
|
||||
5. 提交后将经过安全检查和审核后发布
|
||||
1. Visit [skills.cowagent.ai/submit](https://skills.cowagent.ai/submit)
|
||||
2. Sign in with GitHub or Google
|
||||
3. Upload a folder or zip file containing `SKILL.md`
|
||||
4. Skill name, display name, and description are auto-detected — adjust as needed
|
||||
5. Submit for review; skills go live after security and quality checks
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/20260401111904.png" width="800" />
|
||||
|
||||
技能文件结构:
|
||||
Skill file layout:
|
||||
|
||||
```
|
||||
your-skill/
|
||||
├── SKILL.md # 必须,放在根目录
|
||||
├── scripts/ # 可选,运行脚本
|
||||
└── resources/ # 可选,其他资源
|
||||
├── SKILL.md # required, in the root
|
||||
├── scripts/ # optional, runtime scripts
|
||||
└── resources/ # optional, additional assets
|
||||
```
|
||||
|
||||
<Tip>
|
||||
技能基于 `SKILL.md` 文件构建,你也可以在技能详情页下载 SKILL.md,用于任何支持自定义指令的 Agent(如 OpenClaw、Cursor、Claude Code 等)。
|
||||
Skills are built around the `SKILL.md` manifest. You can also download `SKILL.md` from a skill's detail page and use it with any Agent that supports custom instructions (OpenClaw, Cursor, Claude Code, and more).
|
||||
</Tip>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
---
|
||||
title: image-generation - 图像生成
|
||||
description: 文生图 / 图生图 / 多图融合,支持多家厂商自动路由与回退
|
||||
title: image-generation
|
||||
description: Text-to-image / image-to-image / multi-image fusion with automatic multi-provider routing and fallback
|
||||
---
|
||||
|
||||
通用的图像生成与编辑技能,支持 OpenAI、Gemini、Seedream(火山方舟)、Qwen(百炼)、MiniMax、LinkAI 共六家厂商。配好任意一家的 Key 即可使用,配多家可享受自动回退。
|
||||
A general-purpose image generation and editing skill supporting six providers: OpenAI, Gemini, Seedream (Volcengine Ark), Qwen (DashScope), MiniMax, and LinkAI. Configure any one provider's key to start using it; configure multiple to enable automatic fallback.
|
||||
|
||||
## 支持的模型
|
||||
## Supported Models
|
||||
|
||||
| 厂商 | 模型 / 别名 | 特点 |
|
||||
| Provider | Models / Aliases | Notes |
|
||||
| --- | --- | --- |
|
||||
| OpenAI | `gpt-image-2`、`gpt-image-1` | 通用文生图,高质量,支持 `quality` 控制画质 |
|
||||
| Gemini Nano Banana | `nano-banana-2`、`nano-banana-pro`、`nano-banana` | 对应 `gemini-3.1-flash`、`gemini-3-pro`、`gemini-2.5-flash` 的图像版本 |
|
||||
| Seedream(火山方舟) | `seedream-5.0-lite`、`seedream-4.5` | 原生 2K–4K,最多 14 张图融合 |
|
||||
| Qwen(百炼) | `qwen-image-2.0`、`qwen-image-2.0-pro` | 擅长中文排版和图文融合 |
|
||||
| MiniMax | `image-01` | 简单快速 |
|
||||
| LinkAI | 任意模型 | 统一网关,作为兜底 |
|
||||
| OpenAI | `gpt-image-2`, `gpt-image-1` | General-purpose, high quality, supports `quality` parameter |
|
||||
| Gemini Nano Banana | `nano-banana-2`, `nano-banana-pro`, `nano-banana` | Corresponds to the image variants of `gemini-3.1-flash`, `gemini-3-pro`, `gemini-2.5-flash` |
|
||||
| Seedream (Volcengine Ark) | `seedream-5.0-lite`, `seedream-4.5` | Native 2K–4K, up to 14 reference images for fusion |
|
||||
| Qwen (DashScope) | `qwen-image-2.0`, `qwen-image-2.0-pro` | Strong with Chinese text rendering and text-image layouts |
|
||||
| MiniMax | `image-01` | Fast and simple |
|
||||
| LinkAI | Any model | Universal gateway, used as fallback |
|
||||
|
||||
## 模型选择
|
||||
## Model Selection
|
||||
|
||||
默认走「自动路由 + 失败回退」:
|
||||
By default, "auto routing + automatic fallback" is used:
|
||||
|
||||
1. 按 `OpenAI → Gemini → Seedream → Qwen → MiniMax → LinkAI` 顺序选第一个已配置的厂商
|
||||
2. 遇到 401、模型未开通、网络异常等错误时,自动切到下一家
|
||||
3. 用户在对话里指定模型时(如「用 seedream 画一只猫」),对应厂商会被提到最前优先尝试
|
||||
1. Pick the first configured provider in the order `OpenAI → Gemini → Seedream → Qwen → MiniMax → LinkAI`
|
||||
2. On errors such as 401, model not enabled, or network issues, automatically switch to the next provider
|
||||
3. If the user specifies a model in the conversation (e.g. "use seedream to draw a cat"), the corresponding provider is promoted to the front
|
||||
|
||||
如需固定使用某个模型:
|
||||
To pin a specific model:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -36,63 +36,63 @@ description: 文生图 / 图生图 / 多图融合,支持多家厂商自动路
|
||||
}
|
||||
```
|
||||
|
||||
## 配置 API Key
|
||||
## Configuring API Keys
|
||||
|
||||
<Tip>
|
||||
推荐通过 [Web 控制台](/channels/web) 的「模型管理」页面配置,配好的对话模型 Key 会被图像生成技能自动复用,无需重复配置。也可手动编辑配置文件或在对话中通过 `env_config` 工具临时设置。
|
||||
It is recommended to configure providers from the "Model Management" page in the [Web console](/channels/web). Chat model keys configured there are automatically reused by the image generation skill — no need to set them twice. You can also edit the configuration file manually or temporarily set keys in a conversation using the `env_config` tool.
|
||||
</Tip>
|
||||
|
||||
凭证统一复用主模型厂商的 Key:
|
||||
Credentials are shared with the main model providers:
|
||||
|
||||
| 字段 | 对应厂商 |
|
||||
| Field | Provider |
|
||||
| --- | --- |
|
||||
| `openai_api_key` | OpenAI |
|
||||
| `gemini_api_key` | Gemini |
|
||||
| `ark_api_key` | 火山方舟(Seedream) |
|
||||
| `dashscope_api_key` | 阿里百炼(Qwen) |
|
||||
| `ark_api_key` | Volcengine Ark (Seedream) |
|
||||
| `dashscope_api_key` | Alibaba DashScope (Qwen) |
|
||||
| `minimax_api_key` | MiniMax |
|
||||
| `linkai_api_key` | LinkAI |
|
||||
|
||||
|
||||
## 开启和关闭
|
||||
## Enabling and Disabling
|
||||
|
||||
技能会根据 API Key 自动调整状态:
|
||||
The skill automatically adjusts its status based on API keys:
|
||||
|
||||
- **已配置 Key**:Agent 收到画图请求时直接调用
|
||||
- **未配置 Key**:技能仍会出现在上下文中(标记为「需要配置」),Agent 会引导用户去配 Key
|
||||
- **Key configured**: the Agent calls the skill directly when it receives a drawing request
|
||||
- **Key not configured**: the skill still appears in context (marked as "needs configuration") — the Agent will guide the user to set up a key
|
||||
|
||||
如需手动控制:
|
||||
To control it manually:
|
||||
|
||||
```text
|
||||
/skill disable image-generation # 关闭
|
||||
/skill enable image-generation # 重新开启
|
||||
/skill disable image-generation # Disable
|
||||
/skill enable image-generation # Re-enable
|
||||
```
|
||||
|
||||
终端等价命令:`cow skill disable image-generation` / `cow skill enable image-generation`。
|
||||
Equivalent terminal commands: `cow skill disable image-generation` / `cow skill enable image-generation`.
|
||||
|
||||
## 参数
|
||||
## Parameters
|
||||
|
||||
| 参数 | 类型 | 必填 | 默认 | 说明 |
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `prompt` | string | 是 | — | 图像描述 |
|
||||
| `image_url` | string / list | 否 | null | 编辑用的输入图,本地路径或 URL;传列表为多图融合 |
|
||||
| `quality` | string | 否 | auto | `low` / `medium` / `high`,仅部分厂商支持 |
|
||||
| `size` | string | 否 | auto | `512` / `1K` / `2K` / `3K` / `4K`,或像素值如 `1024x1024` |
|
||||
| `aspect_ratio` | string | 否 | null | `1:1` / `3:2` / `2:3` / `16:9` / `9:16` / `21:9`;Gemini 还支持 `1:4` / `4:1` / `1:8` / `8:1` |
|
||||
| `prompt` | string | Yes | — | Image description |
|
||||
| `image_url` | string / list | No | null | Input image for editing — local path or URL; pass a list for multi-image fusion |
|
||||
| `quality` | string | No | auto | `low` / `medium` / `high`, supported only by some providers |
|
||||
| `size` | string | No | auto | `512` / `1K` / `2K` / `3K` / `4K`, or pixel value like `1024x1024` |
|
||||
| `aspect_ratio` | string | No | null | `1:1` / `3:2` / `2:3` / `16:9` / `9:16` / `21:9`; Gemini also supports `1:4` / `4:1` / `1:8` / `8:1` |
|
||||
|
||||
<Warning>
|
||||
**质量越高、分辨率越大,耗时和成本越高。** 日常对话用默认(`auto`)或 `quality=low` + `size=1K` 即可,约 20 秒出图;做海报或明确要高清时再上 `high` + `2K/4K`,可能需要 1–5 分钟。
|
||||
**Higher quality and larger size cost more and take longer.** For everyday conversations, use the defaults (`auto`) or `quality=low` + `size=1K` — about 20 seconds per image. For posters or when high resolution is explicitly requested, use `quality=high` + `size=2K/4K` — may take 1–5 minutes.
|
||||
</Warning>
|
||||
|
||||
## 常见用法
|
||||
## Common Use Cases
|
||||
|
||||
- **文生图**:根据描述生成插画、海报、图标、头像、分镜图等
|
||||
- **图生图**:在已有图片上改风格、换元素、加装饰、加文字等
|
||||
- **多图融合**:把多张参考图合成一张(换装、角色合影等)
|
||||
- **Text-to-image**: generate illustrations, posters, icons, avatars, storyboards, etc. from a description
|
||||
- **Image-to-image**: change styles, swap elements, add decorations or text on an existing image
|
||||
- **Multi-image fusion**: combine multiple reference images into one (outfit swaps, character group photos, etc.)
|
||||
|
||||
<Note>
|
||||
- bash 超时建议设 600 秒:单厂商 HTTP 超时 300 秒,脚本可能依次尝试多家
|
||||
- 输入图片自动压缩到 4MB 以内、最长边不超过 4096px
|
||||
- Gemini / Seedream / Qwen / MiniMax 不支持 `quality` 参数
|
||||
- Seedream 默认出 2K 图;`seedream-5.0-lite` 支持到 3K,`seedream-4.5` 支持到 4K
|
||||
- Bash timeout should be set to 600 seconds: each provider has a 300-second HTTP timeout, and the script may try multiple providers sequentially
|
||||
- Input images are automatically compressed to ≤ 4 MB with the longest edge ≤ 4096 px
|
||||
- Gemini / Seedream / Qwen / MiniMax do not support the `quality` parameter
|
||||
- Seedream defaults to 2K; `seedream-5.0-lite` supports up to 3K; `seedream-4.5` supports up to 4K
|
||||
</Note>
|
||||
|
||||
@@ -1,33 +1,32 @@
|
||||
---
|
||||
title: 技能概览
|
||||
description: CowAgent 技能系统介绍
|
||||
title: Skills Overview
|
||||
description: CowAgent skills system introduction
|
||||
---
|
||||
|
||||
技能(Skill)为 Agent 提供无限的扩展性。每个 Skill 由说明文件(`SKILL.md`)、运行脚本(可选)、资源(可选)组成,描述如何完成特定类型的任务。
|
||||
Skills provide infinite extensibility for the Agent. Each Skill consists of a description file (`SKILL.md`), execution scripts (optional), and resources (optional), describing how to accomplish specific types of tasks.
|
||||
|
||||
Skill 与 Tool 的区别:Tool 是由代码实现的原子操作(如读写文件、执行命令),Skill 则是基于说明文件的高级工作流,可以组合调用多个 Tool 来完成复杂任务。
|
||||
The difference between Skills and Tools: Tools are atomic operations implemented in code (e.g., file read/write, command execution), while Skills are high-level workflows based on description files that can combine multiple Tools to complete complex tasks.
|
||||
|
||||
## 获取技能
|
||||
## Getting Skills
|
||||
|
||||
CowAgent 提供多种方式获取技能:
|
||||
CowAgent offers multiple ways to acquire skills:
|
||||
|
||||
- [Cow 技能广场](https://skills.cowagent.ai/) — 在线浏览所有可用技能,或通过 `/skill list --remote` 在对话中浏览和安装
|
||||
- **GitHub** — 直接从 GitHub 仓库安装,支持批量安装
|
||||
- **ClawHub** — 通过 `/skill install clawhub:名称` 安装 ClawHub 上的技能 (4w+个)
|
||||
- **LinkA** — 通过 `/skill install linkai:编码` 安装 LinkAI 上的公开资源和创建的知识库/数据库/工作流/插件等资源
|
||||
- **URL** — 从 zip 压缩包或 SKILL.md 链接安装
|
||||
- **对话创建** — 通过自然语言对话让 Agent 自动创建技能
|
||||
- **Cow Skill Hub** — Browse and install community skills via `/skill list --remote`
|
||||
- **GitHub** — Install directly from GitHub repositories, with batch install support
|
||||
- **ClawHub** — Install ClawHub skills via `/skill install clawhub:name`
|
||||
- **URL** — Install from zip archives or SKILL.md links
|
||||
- **Conversational creation** — Let the Agent create skills through natural language conversation
|
||||
|
||||
详细安装方式参考 [安装技能](/skills/install) 和 [技能管理命令](/cli/skill)。也可以通过对话 [创建技能](/skills/create),或向 [Skill Hub](https://skills.cowagent.ai/submit) 贡献你的技能。
|
||||
See [Install Skills](/skills/install) and [Skill Management Commands](/cli/skill) for details. You can also [create skills](/skills/create) through conversation.
|
||||
|
||||
## 技能加载优先级
|
||||
## Skill Loading Priority
|
||||
|
||||
1. **工作空间技能**(最高):`~/cow/skills/`
|
||||
2. **项目内置技能**(最低):`skills/`
|
||||
1. **Workspace skills** (highest): `~/cow/skills/`
|
||||
2. **Project built-in skills** (lowest): `skills/`
|
||||
|
||||
同名技能按优先级覆盖。
|
||||
Skills with the same name are overridden by priority.
|
||||
|
||||
## 技能文件结构
|
||||
## Skill File Structure
|
||||
|
||||
```
|
||||
skills/
|
||||
@@ -37,7 +36,7 @@ skills/
|
||||
│ └── resources/ # Additional resources (optional)
|
||||
```
|
||||
|
||||
### SKILL.md 格式
|
||||
### SKILL.md Format
|
||||
|
||||
```markdown
|
||||
---
|
||||
@@ -56,10 +55,10 @@ metadata:
|
||||
Detailed instructions...
|
||||
```
|
||||
|
||||
| 字段 | 说明 |
|
||||
| Field | Description |
|
||||
| --- | --- |
|
||||
| `name` | 技能名称,需与目录名一致 |
|
||||
| `description` | 技能描述,Agent 据此决定是否调用 |
|
||||
| `metadata.requires.bins` | 依赖的系统命令 |
|
||||
| `metadata.requires.env` | 依赖的环境变量 |
|
||||
| `metadata.always` | 是否始终加载(默认 false) |
|
||||
| `name` | Skill name, must match directory name |
|
||||
| `description` | Skill description, Agent decides whether to invoke based on this |
|
||||
| `metadata.requires.bins` | Required system commands |
|
||||
| `metadata.requires.env` | Required environment variables |
|
||||
| `metadata.always` | Always load (default false) |
|
||||
|
||||
@@ -1,66 +1,65 @@
|
||||
---
|
||||
title: 安装技能
|
||||
description: 通过命令一键安装来自多种来源的技能
|
||||
title: Install Skills
|
||||
description: Install skills from multiple sources with a single command
|
||||
---
|
||||
|
||||
CowAgent 支持通过统一的 `install` 命令安装来自 [Cow 技能广场](https://skills.cowagent.ai/)、GitHub、ClawHub、LinkAI 以及任意 URL 上的技能。在对话中使用 `/skill install`,在终端中使用 `cow skill install`。
|
||||
CowAgent supports installing skills from [Cow Skill Hub](https://skills.cowagent.ai/), GitHub, ClawHub, LinkAI, and any URL via a unified `install` command. Use `/skill install` in chat or `cow skill install` in the terminal.
|
||||
|
||||
## 从Cow技能广场安装
|
||||
## From the Skill Hub
|
||||
|
||||
访问 [skills.cowagent.ai](https://skills.cowagent.ai/) 浏览所有可用技能,找到想要的技能后直接安装,例如:
|
||||
Browse all available skills at [skills.cowagent.ai](https://skills.cowagent.ai/) and install by name:
|
||||
|
||||
```text
|
||||
/skill list --remote
|
||||
/skill install pptx
|
||||
```
|
||||
|
||||
## 从 GitHub 安装
|
||||
## From GitHub
|
||||
|
||||
> Github上的所有技能都可以直接安装,支持仓库级批量安装和指定子目录安装,例如:
|
||||
Any GitHub-hosted skill can be installed directly. Supports both repository-level batch install and subdirectory-level single install:
|
||||
|
||||
```text
|
||||
/skill install larksuite/cli
|
||||
/skill install https://github.com/larksuite/cli/tree/main/skills/lark-im
|
||||
```
|
||||
|
||||
## 从 ClawHub 安装
|
||||
|
||||
[ClawHub](https://clawhub.ai/) 上的所有技能 (4w+个) 都可以一键安装,例如:
|
||||
## From ClawHub
|
||||
|
||||
All [ClawHub](https://clawhub.ai/) skills (40k+) can be installed with a single command:
|
||||
|
||||
```text
|
||||
/skill install clawhub:<name>
|
||||
```
|
||||
|
||||
## 从 LinkAI 安装
|
||||
## From LinkAI
|
||||
|
||||
[LinkAI](https://link-ai.tech/console) 上的所有公开资源 (1w+个应用/工作流/插件) ,以及自己创建的资源 (应用/工作流/知识库/数据库/插件) 都可以通过命令一键安装:
|
||||
All public resources on [LinkAI](https://link-ai.tech/console) (10k+ apps / workflows / plugins), as well as your own resources (apps, workflows, knowledge bases, databases, plugins), can be installed via:
|
||||
|
||||
```text
|
||||
/skill install linkai:<code>
|
||||
```
|
||||
|
||||
> LinkAI平台上创建的所有应用、工作流、知识库、数据库、插件都有唯一的code,可在[控制台](https://link-ai.tech/console)各资源页面中进行获取并填写到命令中
|
||||
> Every resource created on the LinkAI platform has a unique `code`. Find it on each resource's page in the [console](https://link-ai.tech/console).
|
||||
|
||||
## 从 URL 安装
|
||||
## From URL
|
||||
|
||||
支持 zip 压缩包和 SKILL.md 文件链接:
|
||||
Supports zip archives and SKILL.md file links:
|
||||
|
||||
```text
|
||||
/skill install https://cdn.link-ai.tech/skills/pptx.zip
|
||||
/skill install https://example.com/path/to/SKILL.md
|
||||
```
|
||||
|
||||
## 管理技能
|
||||
## Manage Skills
|
||||
|
||||
```text
|
||||
/skill list # 查看已安装技能
|
||||
/skill info pptx # 查看技能详情
|
||||
/skill enable pptx # 启用技能
|
||||
/skill disable pptx # 禁用技能
|
||||
/skill uninstall pptx # 卸载技能
|
||||
/skill list # View installed skills
|
||||
/skill info pptx # View skill details
|
||||
/skill enable pptx # Enable a skill
|
||||
/skill disable pptx # Disable a skill
|
||||
/skill uninstall pptx # Uninstall a skill
|
||||
```
|
||||
|
||||
<Tip>
|
||||
以上所有命令在终端中使用时,将 `/skill` 替换为 `cow skill` 即可。完整命令说明参考 [技能管理命令](/cli/skill)。
|
||||
All commands above work in the terminal by replacing `/skill` with `cow skill`. See [Skill Management Commands](/cli/skill) for full documentation.
|
||||
</Tip>
|
||||
|
||||
@@ -1,112 +1,112 @@
|
||||
---
|
||||
title: knowledge-wiki - 知识库
|
||||
description: 维护本地结构化知识库,自动归档、分类和交叉引用
|
||||
title: knowledge-wiki
|
||||
description: Maintain a local structured knowledge base with automatic archiving, categorisation, and cross-referencing
|
||||
---
|
||||
|
||||
帮你把对话中产生的资料、灵感和零散笔记整理成结构化的本地知识库,自动维护索引和页面之间的交叉引用。
|
||||
Organises notes, insights, and reference materials from your conversations into a structured local knowledge base, automatically maintaining an index and cross-references between pages.
|
||||
|
||||
`knowledge-wiki` 在工作空间下维护一个 `knowledge/` 目录,相当于 Agent 的「外脑」。技能设置了 `always: true`,会**常驻上下文**,不需要任何外部依赖。
|
||||
`knowledge-wiki` maintains a `knowledge/` directory in your workspace — essentially the Agent's "second brain". The skill is marked `always: true`, so it is **always loaded** and requires no external dependencies.
|
||||
|
||||
## 什么时候会触发
|
||||
## When It Triggers
|
||||
|
||||
- 你分享了一篇文章、一份文档或一个 URL,想要沉淀下来
|
||||
- 聊天过程中聊出了值得长期保留的结论
|
||||
- 你想查一下之前积累过的知识
|
||||
- You share an article, document, or URL that you want to keep for future reference
|
||||
- A conversation produces conclusions worth retaining long-term
|
||||
- You want to look up something you accumulated earlier
|
||||
|
||||
## 目录结构
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
knowledge/
|
||||
├── index.md # 全局索引(必须维护)
|
||||
├── log.md # 操作日志(只追加)
|
||||
└── <category>/ # 分类子目录(按内容自由分组)
|
||||
└── <slug>.md # 知识页(文件名用小写加中划线)
|
||||
├── index.md # Global index (must be maintained)
|
||||
├── log.md # Operation log (append-only)
|
||||
└── <category>/ # Category subdirectories (grouped by content)
|
||||
└── <slug>.md # Knowledge page (lowercase-hyphenated filename)
|
||||
```
|
||||
|
||||
## 三个核心操作
|
||||
## Three Core Operations
|
||||
|
||||
### 1. 收录(Ingest)
|
||||
### 1. Ingest
|
||||
|
||||
你分享了一段资料时,Agent 会:
|
||||
When you share some material, the Agent will:
|
||||
|
||||
1. 读懂原文,提取关键信息
|
||||
2. 按内容决定放到哪个分类下——先看 `index.md` 里有没有合适的分类,没有就新建一个
|
||||
3. 生成知识页 `knowledge/<category>/<slug>.md`
|
||||
4. 更新索引 `index.md` 和日志 `log.md`
|
||||
1. Read and understand the original content, extracting key information
|
||||
2. Decide which category it belongs to — check `index.md` first; create a new category if none fits
|
||||
3. Generate a knowledge page at `knowledge/<category>/<slug>.md`
|
||||
4. Update the index `index.md` and the log `log.md`
|
||||
|
||||
### 2. 综合(Synthesize)
|
||||
### 2. Synthesise
|
||||
|
||||
聊天中产生了新的结论或洞见时:
|
||||
When a conversation produces new conclusions or insights:
|
||||
|
||||
1. 在合适的分类下创建新知识页
|
||||
2. 给相关的已有页面加上互相指向的链接
|
||||
3. 更新索引和日志
|
||||
1. Create a new knowledge page under an appropriate category
|
||||
2. Add cross-links to and from related existing pages
|
||||
3. Update the index and log
|
||||
|
||||
### 3. 查询(Query)
|
||||
### 3. Query
|
||||
|
||||
你问到以前积累的知识时:
|
||||
When you ask about previously accumulated knowledge:
|
||||
|
||||
1. 先从 `index.md` 里找可能相关的页面
|
||||
2. 用 `read` 工具打开具体页面
|
||||
3. 需要时再用 `memory_search` 补充检索
|
||||
4. 回答里会带上知识页的链接,方便你点过去看原文
|
||||
1. Search `index.md` for potentially relevant pages
|
||||
2. Open specific pages with the `read` tool
|
||||
3. Supplement with `memory_search` if needed
|
||||
4. Include links to knowledge pages in the answer so you can click through to the source
|
||||
|
||||
## 知识页怎么写
|
||||
## Page Format
|
||||
|
||||
```markdown
|
||||
# 页面标题
|
||||
# Page Title
|
||||
|
||||
> Source: <来源 URL 或简要说明>
|
||||
> Source: <source URL or brief description>
|
||||
|
||||
正文内容。页面之间用相对路径链接:
|
||||
[相关页](../category/related-page.md)
|
||||
Body content. Link between pages using relative paths:
|
||||
[Related Page](../category/related-page.md)
|
||||
|
||||
## 要点
|
||||
## Key Points
|
||||
|
||||
- ...
|
||||
|
||||
## 相关页面
|
||||
## Related Pages
|
||||
|
||||
- [页面 A](../category/page-a.md) — 为什么相关
|
||||
- [Page A](../category/page-a.md) — why it's related
|
||||
```
|
||||
|
||||
<Note>
|
||||
- `> Source:` 用来记录这条知识的来源。有明确来源时一定要写
|
||||
- 交叉引用很重要:创建或更新某页时,记得也去关联页面里补上反向链接
|
||||
- **只链接已经存在的页面**。如果某个概念值得单独成页,先建好再加链接
|
||||
- `> Source:` records where this knowledge came from. Always include it when there is a clear source
|
||||
- Cross-references are important: when creating or updating a page, remember to add back-links in the related pages too
|
||||
- **Only link to pages that already exist.** If a concept deserves its own page, create it first, then add the link
|
||||
</Note>
|
||||
|
||||
## 索引格式
|
||||
## Index Format
|
||||
|
||||
`knowledge/index.md` 采用扁平列表,按分类分组,每个知识页占一行:
|
||||
`knowledge/index.md` uses a flat list grouped by category, one knowledge page per line:
|
||||
|
||||
```markdown
|
||||
# Knowledge Index
|
||||
|
||||
## 分类 A
|
||||
- [页面标题](category-a/page-slug.md) — 一句话摘要
|
||||
## Category A
|
||||
- [Page Title](category-a/page-slug.md) — one-line summary
|
||||
|
||||
## 分类 B
|
||||
- [页面标题](category-b/page-slug.md) — 一句话摘要
|
||||
## Category B
|
||||
- [Page Title](category-b/page-slug.md) — one-line summary
|
||||
```
|
||||
|
||||
不用表格,不加 emoji。分类怎么起名、怎么组织都可以灵活调整。
|
||||
No tables, no emojis. Category names and organisation can be adjusted freely.
|
||||
|
||||
## 日志格式
|
||||
## Log Format
|
||||
|
||||
`knowledge/log.md` 只追加、不修改,最新的写在最下面:
|
||||
`knowledge/log.md` is append-only — newest entries go at the bottom:
|
||||
|
||||
```markdown
|
||||
## [YYYY-MM-DD] ingest | 页面标题
|
||||
## [YYYY-MM-DD] synthesize | 页面标题
|
||||
## [YYYY-MM-DD] ingest | Page Title
|
||||
## [YYYY-MM-DD] synthesize | Page Title
|
||||
```
|
||||
|
||||
## 写作约定
|
||||
## Writing Guidelines
|
||||
|
||||
- **文件名**用小写加中划线,比如 `machine-learning.md`
|
||||
- **一页只讲一件事**,需要关联的内容通过链接串起来
|
||||
- **有了就更新,不要重复建页**
|
||||
- **每次改完都要更新索引** `knowledge/index.md`
|
||||
- **写精华别抄全文**,抓住要点就行
|
||||
- **对话里引用知识页时用完整路径**,比如 `[标题](knowledge/<category>/<slug>.md)`。页面之间互相链接才用相对路径
|
||||
- **基于知识页回答问题时附上链接**,方便深入查阅
|
||||
- **Filenames**: lowercase with hyphens, e.g. `machine-learning.md`
|
||||
- **One topic per page** — link related content across pages
|
||||
- **Update, don't duplicate** — if a page already exists, update it rather than creating a new one
|
||||
- **Always update the index** `knowledge/index.md` after any change
|
||||
- **Distill, don't copy** — capture the key points, not the entire source
|
||||
- **Use full paths when referencing knowledge pages in conversations**, e.g. `[Title](knowledge/<category>/<slug>.md)`. Use relative paths only for inter-page links
|
||||
- **Include links when answering questions based on knowledge pages** so users can dig deeper
|
||||
|
||||
@@ -1,180 +1,180 @@
|
||||
---
|
||||
title: skill-creator - 技能创建
|
||||
description: 创建、安装、更新技能,规范 SKILL.md 写法与目录结构
|
||||
title: skill-creator
|
||||
description: Create, install, and update skills — standardises SKILL.md format and directory structure
|
||||
---
|
||||
|
||||
`skill-creator` 是一个「元技能」,专门用来帮助 Agent 创建、安装和更新其他技能,确保所有技能的 `SKILL.md` 写法和目录结构保持一致。
|
||||
`skill-creator` is a "meta-skill" that helps the Agent create, install, and update other skills, ensuring every skill follows a consistent `SKILL.md` format and directory layout.
|
||||
|
||||
## 什么时候会触发
|
||||
## When It Triggers
|
||||
|
||||
- 用户想从 URL 或远程仓库安装一个技能
|
||||
- 用户想从头创建一个全新的技能
|
||||
- 需要升级或重构已有技能
|
||||
- The user wants to install a skill from a URL or remote repository
|
||||
- The user wants to create a brand-new skill from scratch
|
||||
- An existing skill needs upgrading or restructuring
|
||||
|
||||
## 技能是什么
|
||||
## What Is a Skill?
|
||||
|
||||
简单来说,技能就是一份「可复用的说明书」加上可选的脚本和资源。它给 Agent 注入了某个领域的专业知识,让 Agent 在遇到对应任务时能像专家一样处理。
|
||||
A skill is a reusable instruction set plus optional scripts and assets. It injects domain expertise into the Agent so it can handle specific tasks like a specialist.
|
||||
|
||||
一个技能通常包含以下内容:
|
||||
A skill typically contains:
|
||||
|
||||
1. **专项工作流** — 某类任务的完整步骤
|
||||
2. **工具用法** — 怎么调某种 API 或处理某种文件
|
||||
3. **领域知识** — 团队约定、业务规则、数据结构之类
|
||||
4. **附带资源** — 脚本、参考文档、模板等
|
||||
1. **Specialised workflow** — step-by-step instructions for a category of tasks
|
||||
2. **Tool usage** — how to call a particular API or process a particular file format
|
||||
3. **Domain knowledge** — team conventions, business rules, data schemas, etc.
|
||||
4. **Attached resources** — scripts, reference docs, templates, etc.
|
||||
|
||||
<Note>
|
||||
**核心原则:能省则省**。只写 Agent 自己想不到的内容,每加一行都要问自己:值不值得占这些 token?
|
||||
**Core principle: less is more.** Only write what the Agent wouldn't figure out on its own. For every line you add, ask yourself: is it worth the tokens?
|
||||
</Note>
|
||||
|
||||
## 目录结构
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
skill-name/
|
||||
├── SKILL.md # 必需:技能定义
|
||||
│ ├── YAML frontmatter(必填 name / description)
|
||||
│ └── Markdown 正文(说明 + 示例)
|
||||
└── 可选资源
|
||||
├── scripts/ # 可执行脚本(Python / Bash 等)
|
||||
├── references/ # 内容较多的参考文档,Agent 按需读取
|
||||
└── assets/ # 模板、图标等,会直接用在输出里
|
||||
├── SKILL.md # Required: skill definition
|
||||
│ ├── YAML frontmatter (name / description are mandatory)
|
||||
│ └── Markdown body (instructions + examples)
|
||||
└── Optional resources
|
||||
├── scripts/ # Executable scripts (Python / Bash, etc.)
|
||||
├── references/ # Large reference docs the Agent reads on demand
|
||||
└── assets/ # Templates, icons, etc. used directly in output
|
||||
```
|
||||
|
||||
## SKILL.md 规范定义
|
||||
## SKILL.md Specification
|
||||
|
||||
SKILL.md 文件头部的 `frontmatter` 字段:
|
||||
Frontmatter fields in the SKILL.md header:
|
||||
|
||||
| 字段 | 说明 |
|
||||
| Field | Description |
|
||||
| --- | --- |
|
||||
| `name` | 技能名,小写加中划线,必须和目录名一致 |
|
||||
| `description` | **最关键的字段**。写清楚「这个技能干什么」和「什么情况下该用它」,Agent 看到这段来决定要不要调它。注意:所有触发相关的描述都放在这里,不要写到正文里 |
|
||||
| `metadata.cowagent.requires.bins` | 系统里必须装了哪些命令行工具 |
|
||||
| `metadata.cowagent.requires.env` | 需要哪些环境变量(全部满足才行) |
|
||||
| `metadata.cowagent.requires.anyEnv` | 多个 API Key 满足一个就行 |
|
||||
| `metadata.cowagent.requires.anyBins` | 多个工具满足一个就行 |
|
||||
| `metadata.cowagent.always` | 设为 `true` 会始终加载,不检查依赖 |
|
||||
| `metadata.cowagent.emoji` | 展示用的 emoji(可选) |
|
||||
| `metadata.cowagent.os` | 限定系统,如 `["darwin", "linux"]` |
|
||||
| `name` | Skill name — lowercase with hyphens, must match the directory name |
|
||||
| `description` | **The most important field.** Clearly state what the skill does and when to use it. The Agent reads this to decide whether to invoke it. All trigger-related descriptions go here, not in the body |
|
||||
| `metadata.cowagent.requires.bins` | System CLI tools that must be installed |
|
||||
| `metadata.cowagent.requires.env` | Required environment variables (all must be present) |
|
||||
| `metadata.cowagent.requires.anyEnv` | Multiple API keys — at least one must be set |
|
||||
| `metadata.cowagent.requires.anyBins` | Multiple tools — at least one must be installed |
|
||||
| `metadata.cowagent.always` | Set to `true` to always load, skipping dependency checks |
|
||||
| `metadata.cowagent.emoji` | Display emoji (optional) |
|
||||
| `metadata.cowagent.os` | OS restriction, e.g. `["darwin", "linux"]` |
|
||||
|
||||
<Note>
|
||||
`category` 字段不需要手写,系统会自动设成 `skill`。
|
||||
The `category` field does not need to be set manually — the system automatically sets it to `skill`.
|
||||
</Note>
|
||||
|
||||
声明 API Key 依赖有两种写法:
|
||||
Two ways to declare API key dependencies:
|
||||
|
||||
```yaml
|
||||
metadata:
|
||||
cowagent:
|
||||
requires:
|
||||
env: ["MYAPI_KEY"] # 必须有
|
||||
env: ["MYAPI_KEY"] # Must be present
|
||||
```
|
||||
|
||||
```yaml
|
||||
metadata:
|
||||
cowagent:
|
||||
requires:
|
||||
anyEnv: ["OPENAI_API_KEY", "LINKAI_API_KEY"] # 有一个就行
|
||||
anyEnv: ["OPENAI_API_KEY", "LINKAI_API_KEY"] # At least one
|
||||
```
|
||||
|
||||
**技能会自动按依赖启禁用**:环境变量齐了就自动启用,缺了就自动禁用,不需要手动 `/skill enable`。
|
||||
**Skills are auto-enabled/disabled based on dependencies**: they activate when all required environment variables are present and deactivate when any are missing — no need for manual `/skill enable`.
|
||||
|
||||
## 资源目录怎么用
|
||||
## Resource Directories
|
||||
|
||||
| 目录 | 放什么 | 不要放 |
|
||||
| Directory | What goes here | What does NOT go here |
|
||||
| --- | --- | --- |
|
||||
| `scripts/` | 需要反复执行的代码,或需要确定性结果的脚本 | 纯演示用的代码片段 |
|
||||
| `references/` | **超过 500 行**、SKILL.md 实在塞不下的大文档(比如完整的数据库 Schema) | 普通 API 文档、示例、教程 |
|
||||
| `assets/` | 会出现在最终产物里的文件(模板、图标、样板代码等) | 说明性文档 |
|
||||
| `scripts/` | Code that needs to run repeatedly, or scripts that produce deterministic results | Demo-only code snippets |
|
||||
| `references/` | Documents **over 500 lines** that genuinely won't fit in SKILL.md (e.g. a full DB schema) | General API docs, tutorials, examples |
|
||||
| `assets/` | Files that appear in the final output (templates, icons, boilerplate, etc.) | Explanatory documentation |
|
||||
|
||||
<Warning>
|
||||
**原则上所有内容都写在 `SKILL.md` 里**,只有确实放不下才拆到资源目录。
|
||||
**In principle, everything goes in `SKILL.md`** — only split into resource directories when it truly won't fit.
|
||||
|
||||
不要给技能加 `README.md`、`CHANGELOG.md`、`INSTALLATION_GUIDE.md` 之类的文件——全部放进 `SKILL.md`。资源目录里只放真正要跑的脚本或真正要用的素材。
|
||||
Do not add `README.md`, `CHANGELOG.md`, or `INSTALLATION_GUIDE.md` to a skill — put everything in `SKILL.md`. Resource directories should only contain scripts that actually run or assets that are actually used.
|
||||
</Warning>
|
||||
|
||||
## 安装外部技能
|
||||
## Installing External Skills
|
||||
|
||||
安装后最终落在 `<workspace>/skills/<name>/` 目录。
|
||||
After installation, the skill lands in `<workspace>/skills/<name>/`.
|
||||
|
||||
| 来源 | 怎么装 |
|
||||
| Source | How to install |
|
||||
| --- | --- |
|
||||
| URL(单文件) | curl / web_fetch 直接拉 |
|
||||
| URL(zip 包) | 下载解压 |
|
||||
| 本地 SKILL.md | 直接读 |
|
||||
| 本地 zip 包 | 解压 |
|
||||
| URL (single file) | curl / web_fetch |
|
||||
| URL (zip archive) | Download and extract |
|
||||
| Local SKILL.md | Read directly |
|
||||
| Local zip archive | Extract |
|
||||
|
||||
安装步骤:
|
||||
Installation steps:
|
||||
|
||||
1. 找到 `SKILL.md`(可能在包的根目录或某个子目录里)
|
||||
2. 从 frontmatter 里读出 `name`
|
||||
3. 把**整个技能目录**(包括 `SKILL.md`、`scripts/`、`assets/` 等)复制到 `<workspace>/skills/<name>/`
|
||||
4. 如果包里有 `INSTALL.md` 之类的安装脚本,照着跑一遍,但最终结果仍然要落在 `<workspace>/skills/<name>/` 下
|
||||
1. Locate the `SKILL.md` (may be at the root or in a subdirectory of the archive)
|
||||
2. Read the `name` from the frontmatter
|
||||
3. Copy the **entire skill directory** (including `SKILL.md`, `scripts/`, `assets/`, etc.) to `<workspace>/skills/<name>/`
|
||||
4. If the archive contains an `INSTALL.md` or similar setup script, run it — but the final result must still reside under `<workspace>/skills/<name>/`
|
||||
|
||||
## 从头创建技能
|
||||
## Creating a Skill from Scratch
|
||||
|
||||
推荐按这个顺序来:
|
||||
Recommended order:
|
||||
|
||||
1. **搞清楚需求** — 让用户举几个具体的使用场景,一次别问太多
|
||||
2. **想好结构** — 这个技能需要脚本吗?需要参考文档吗?需要模板素材吗?
|
||||
3. **生成骨架** — 用初始化脚本:
|
||||
1. **Clarify requirements** — ask the user for a few concrete use cases (don't ask too many at once)
|
||||
2. **Plan the structure** — does this skill need scripts? Reference docs? Template assets?
|
||||
3. **Scaffold** — use the init script:
|
||||
|
||||
```bash
|
||||
scripts/init_skill.py <skill-name> --path <workspace>/skills [--resources scripts,references,assets] [--examples]
|
||||
```
|
||||
|
||||
4. **填充内容** — 写好 SKILL.md、补上脚本和资源。脚本写完一定要实际跑一遍
|
||||
5. **格式校验**(可选):
|
||||
4. **Fill in content** — write SKILL.md, add scripts and resources. Always test scripts after writing them
|
||||
5. **Validate** (optional):
|
||||
|
||||
```bash
|
||||
scripts/quick_validate.py <workspace>/skills/<skill-name>
|
||||
```
|
||||
|
||||
6. **迭代完善** — 实际用起来之后根据反馈持续改进
|
||||
6. **Iterate** — keep improving based on real-world usage feedback
|
||||
|
||||
## 命名规则
|
||||
## Naming Conventions
|
||||
|
||||
- 只用小写字母、数字和中划线。用户给的名字需要做标准化处理,比如 `Plan Mode` → `plan-mode`
|
||||
- 长度别超过 64 个字符
|
||||
- 尽量短、用动词开头、一看就知道干什么
|
||||
- 必要时用工具名做前缀,比如 `gh-address-comments`、`linear-address-issue`
|
||||
- 目录名和 `name` 字段必须完全一致
|
||||
- Use only lowercase letters, digits, and hyphens. Normalise user-given names, e.g. `Plan Mode` → `plan-mode`
|
||||
- Maximum 64 characters
|
||||
- Keep it short, start with a verb, make it self-explanatory
|
||||
- Use tool names as prefixes when appropriate, e.g. `gh-address-comments`, `linear-address-issue`
|
||||
- The directory name and the `name` field must match exactly
|
||||
|
||||
## 三级加载机制
|
||||
## Three-Level Loading
|
||||
|
||||
技能不会一次性全部塞进上下文,而是分三级按需加载:
|
||||
Skills are not loaded into context all at once — they use a three-level progressive loading mechanism:
|
||||
|
||||
1. **元信息**(`name` + `description`)— 常驻上下文,约 100 词。Agent 靠它判断「要不要用这个技能」
|
||||
2. **SKILL.md 正文** — 确定要用了才加载,建议控制在 500 行以内
|
||||
3. **资源文件** — Agent 需要的时候再读
|
||||
1. **Metadata** (`name` + `description`) — always in context (~100 words). The Agent uses this to decide whether to invoke the skill
|
||||
2. **SKILL.md body** — loaded only when the skill is activated; keep it under 500 lines
|
||||
3. **Resource files** — read on demand by the Agent
|
||||
|
||||
如果一个技能涉及多个变体(比如多云厂商部署),建议这样组织:
|
||||
For skills with multiple variants (e.g. multi-cloud deployment), organise like this:
|
||||
|
||||
```
|
||||
cloud-deploy/
|
||||
├── SKILL.md # 主流程和厂商选择逻辑
|
||||
├── SKILL.md # Main workflow and provider selection logic
|
||||
└── references/
|
||||
├── aws.md
|
||||
├── gcp.md
|
||||
└── azure.md
|
||||
```
|
||||
|
||||
用户选了 AWS,Agent 只需要读 `aws.md`,不用把三家的文档全加载进来。
|
||||
When the user picks AWS, the Agent only reads `aws.md` — no need to load all three providers.
|
||||
|
||||
## 常见设计模式
|
||||
## Common Design Patterns
|
||||
|
||||
**步骤式**:按编号列出操作步骤和对应脚本。
|
||||
**Step-by-step**: numbered steps with corresponding scripts.
|
||||
|
||||
```markdown
|
||||
1. 分析表单结构(运行 analyze_form.py)
|
||||
2. 生成字段映射(编辑 fields.json)
|
||||
3. 自动填充表单(运行 fill_form.py)
|
||||
1. Analyse form structure (run analyze_form.py)
|
||||
2. Generate field mappings (edit fields.json)
|
||||
3. Auto-fill the form (run fill_form.py)
|
||||
```
|
||||
|
||||
**分支式**:根据用户意图走不同流程。
|
||||
**Branching**: different flows based on user intent.
|
||||
|
||||
```markdown
|
||||
1. 判断操作类型:
|
||||
**新建内容?** → 走「创建流程」
|
||||
**编辑已有内容?** → 走「编辑流程」
|
||||
1. Determine operation type:
|
||||
**Creating new content?** → follow the "Create" workflow
|
||||
**Editing existing content?** → follow the "Edit" workflow
|
||||
```
|
||||
|
||||
**模板式**:输出格式有严格要求时,在 SKILL.md 里直接给一个样板,让 Agent 照着写。
|
||||
**Template-based**: when output format has strict requirements, include a template in SKILL.md for the Agent to follow.
|
||||
|
||||
Reference in New Issue
Block a user