AI助手的技能系统
Skill可独立存在、测试和部署
多个Skill组合成复杂工作流
易于添加新的Skill
跨多个AI助手复用
| 组成部分 | 说明 |
|---|---|
| 元信息 | 名称、描述、版本、作者 |
| 输入参数 | 参数定义、类型、验证规则 |
| 输出格式 | 返回值结构、错误格式 |
| 核心逻辑 | 实现具体功能的代码 |
| 依赖声明 | 需要的工具和服务 |
| 测试用例 | 验证正确性的测试 |
数据分析、统计、清洗
图表生成、报表
翻译、摘要、纠错
代码生成、审查、测试
信息检索、知识查询
读写、转换、压缩
| 原则 | 说明 |
|---|---|
| 单一职责 | 一个Skill只做一件事 |
| 清晰命名 | 名称要能表达功能 |
| 完善文档 | 清晰的使用说明和示例 |
| 错误处理 | 合理的错误提示 |
| 充分测试 | 覆盖各种边界情况 |
{
"name": "data_analysis",
"version": "1.0.0",
"description": "分析CSV数据并生成统计报告",
"input": {
"file_path": { "type": "string", "required": true },
"analysis_type": { "type": "string", "enum": ["summary", "trend", "correlation"] }
},
"output": {
"type": "object",
"properties": ["summary", "charts", "insights"]
},
"dependencies": ["pandas", "matplotlib"],
"examples": [
{
"input": { "file_path": "sales.csv", "analysis_type": "summary" },
"output": { "rows": 1000, "columns": 5, "avg_sales": 15000 }
}
]
}
{
"name": "web_search",
"version": "1.0.0",
"description": "搜索互联网并返回摘要结果",
"input": {
"query": { "type": "string", "required": true },
"max_results": { "type": "integer", "default": 5 },
"language": { "type": "string", "default": "zh-CN" }
},
"output": {
"type": "array",
"items": { "title": "string", "url": "string", "summary": "string" }
},
"dependencies": ["search_api"],
"examples": [
{
"input": { "query": "最新AI技术", "max_results": 3 },
"output": [
{ "title": "2026 AI趋势", "url": "...", "summary": "..." }
]
}
]
}
{
"name": "code_generator",
"version": "1.0.0",
"description": "根据自然语言描述生成代码",
"input": {
"description": { "type": "string", "required": true },
"language": { "type": "string", "enum": ["python", "javascript", "go", "rust"] },
"style": { "type": "string", "default": "clean" }
},
"output": {
"type": "object",
"properties": ["code", "explanation", "dependencies"]
},
"dependencies": ["llm_api"],
"examples": [
{
"input": { "description": "读取JSON文件并解析", "language": "python" },
"output": {
"code": "import json\nwith open('data.json') as f:\n data = json.load(f)",
"explanation": "使用json模块读取并解析文件"
}
}
]
}
| 技能名称 | 用途 | 热度 |
|---|---|---|
| Web Search | 联网搜索实时信息 | 🔥🔥🔥🔥🔥 |
| Code Interpreter | 执行代码、数据分析 | 🔥🔥🔥🔥🔥 |
| File Operations | 文件读写、格式转换 | 🔥🔥🔥🔥 |
| Image Generation | AI绘画、图像编辑 | 🔥🔥🔥🔥 |
| SQL Query | 数据库查询分析 | 🔥🔥🔥🔥 |
| API Connector | 连接外部API服务 | 🔥🔥🔥 |
| Document Parser | PDF/Word文档解析 | 🔥🔥🔥 |
| Chart Generator | 数据可视化图表 | 🔥🔥🔥 |
| Text to Speech | 文本转语音 | 🔥🔥🔥 |
| Translation | 多语言翻译 | 🔥🔥🔥 |
| Git Operations | 版本控制操作 | 🔥🔥🔥 |
| Terminal/Shell | 执行命令行操作 | 🔥🔥🔥 |
| Browser Automation | 浏览器自动化 | 🔥🔥 |
| Email Handler | 邮件发送管理 | 🔥🔥 |
| Calendar/Schedule | 日程管理 | 🔥🔥 |
Web Search + Document Parser + Translation
自动搜索文献、解析PDF、翻译摘要
File Ops + SQL Query + Chart Generator
读取数据、查询分析、生成报表
Git Ops + Terminal + Code Interpreter
代码编写、测试运行、版本管理
Web Search + Image Gen + Translation
素材搜集、配图生成、多语言发布