Files
chatgpt-on-wechat/docs/zh/skills.mdx
2026-02-27 12:10:16 +08:00

104 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 技能
description: CowAgent 的技能系统 - 为 Agent 提供无限扩展性
---
# 技能系统
技能系统为 Agent 提供无限的扩展性。每个 Skill 由说明文件、运行脚本(可选)、资源(可选)组成,描述如何完成特定类型的任务。通过 Skill 可以让 Agent 遵循说明完成复杂流程,调用各类工具或对接第三方系统。
## 技能类型
### 内置技能
位于项目的 `skills/` 目录下根据依赖条件API Key、系统命令等自动判断是否启用。内置技能包括
| 技能 | 说明 |
| --- | --- |
| `skill-creator` | 技能创造器,通过对话创建自定义技能 |
| `bocha-search` | 博查搜索,联网搜索能力 |
| `openai-image-vision` | 图像识别,使用 OpenAI 视觉模型 |
| `linkai-agent` | LinkAI 智能体,对接第三方知识库和插件 |
| `web-scraper` | 网页抓取,获取网页内容 |
### 自定义技能
由用户通过对话创建,存放在工作空间中(`~/cow/skills/`),基于自定义技能可以实现任何复杂的业务流程和第三方系统对接。
## 创建技能
通过内置的 `skill-creator` 技能,可以使用自然语言对话快速创建技能。你可以:
- 将工作流程固化为技能
- 将接口文档和示例发送给 Agent让它直接完成对接
- 创建定制化的自动化流程
<Frame>
<img src="https://cdn.link-ai.tech/doc/20260202202247.png" width="800" />
</Frame>
## 搜索技能
系统内置了 `bocha-search`(博查搜索)技能,配置步骤:
1. 在 [博查开放平台](https://open.bochaai.com/) 创建 API Key
2. 通过 `env_config` 工具配置 `BOCHA_SEARCH_API_KEY`,或直接发送给 Agent
## 图像识别
内置 `openai-image-vision` 技能,支持使用 `gpt-4.1-mini`、`gpt-4.1` 等图像识别模型。
配置 `OPENAI_API_KEY` 后即可使用,可通过 `config.json` 或 `env_config` 工具进行维护。
<Frame>
<img src="https://cdn.link-ai.tech/doc/20260202213219.png" width="800" />
</Frame>
## LinkAI 智能体
`linkai-agent` 技能可以将 [LinkAI](https://link-ai.tech/) 上的所有智能体作为 Skill 交给 Agent 使用,实现多智能体决策。
### 配置方式
1. 配置 `LINKAI_API_KEY`(通过 `env_config` 工具或 `config.json` 中的 `linkai_api_key`
2. 在 `skills/linkai-agent/config.json` 中添加智能体说明:
```json
{
"apps": [
{
"app_code": "G7z6vKwp",
"app_name": "LinkAI客服助手",
"app_description": "当用户需要了解LinkAI平台相关问题时才选择该助手"
},
{
"app_code": "SFY5x7JR",
"app_name": "内容创作助手",
"app_description": "当用户需要创作图片或视频时才使用该助手"
}
]
}
```
Agent 会根据智能体的名称和描述进行决策,通过 `app_code` 调用对应的应用或工作流。
<Frame>
<img src="https://cdn.link-ai.tech/doc/20260202234350.png" width="750" />
</Frame>
## 技能文件结构
每个技能目录的结构如下:
```
skills/
├── my-skill/
│ ├── SKILL.md # Skill description and instructions
│ ├── run.py # Execution script (optional)
│ └── resources/ # Additional resources (optional)
```
<Tip>
自定义技能的开发文档可参考 [Skill创造器说明](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/skills/skill-creator/SKILL.md)。
</Tip>