关于 find-skills
find-skills 是用于查询阿里云技能市场并安装所选技能的 Agent 技能,涵盖搜索、展示结果和安装前征求确认的流程。
主要功能
- 01按关键词搜索市场技能
- 02获取技能描述和仓库信息
- 03从 GitHub、GitLab、Git 或本地路径安装
- 04安装前要求确认
适用场景
- 01为指定任务查找技能
- 02探索可用的 Agent 能力
- 03按名称或搜索结果安装技能
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ agentbay-ai/ agentbay-skills --skill find-skills安装后在 Claude Code 中输入/find-skills确认已加载。
附带文件scripts/request.py
详细介绍
查找技能 - 技能市场
此技能可帮助你探索并向 Agent 环境安装新能力。它充当 Agent 技能的“包管理器”。
何时使用此技能
当用户执行以下操作时,请使用此技能:
- 询问:“如何实现 X?”“找一个适用于 X 的技能”或“有哪些技能可用?”
- 想按名称或从搜索结果安装技能(“安装技能 web-search”)
- 想通过专用工具或工作流扩展能力
- 表达了对特定能力的需求,而这些能力可能以技能形式提供
- 对沙箱或安全执行感兴趣(“我想安全地运行 bash 命令”)
- 提到“沙箱”“自动化”“测试”等特定能力
核心工具
- 搜索:Python 脚本
scripts/request.py,使用 POPRequest 类- 向阿里云技能市场发起经过身份验证的 API 调用
- 参数:
UserQuery(搜索词)、TopK(结果数量) - 返回:包含技能详情的 JSON 响应,包括名称、描述和仓库信息
- 安装:
npx skills add <repo> -s <skill_name>- 限制:执行前必须始终征求用户确认。
- 使用
-s, --skill <skills...>指定要从仓库安装的技能 - 支持多种仓库格式:
- GitHub 简写格式:
npx skills add owner/repo -s skill_name - 完整 GitHub URL:
npx skills add https://github.com/owner/repo -s skill_name - 技能的直接路径:
npx skills add https://github.com/owner/repo/tree/main/skills/skill_name - GitLab URL:
npx skills add https://gitlab.com/org/repo -s skill_name - Git URL:
npx skills add [email protected]:owner/repo.git -s skill_name - 本地路径:
npx skills add ./my-local-skills -s skill_name
- GitHub 简写格式:
- 使用
-s '*'安装仓库中的所有技能
工作流
第 1 步:了解需求并搜索
当用户请求帮助时,确定:
- 领域或任务(例如,安全地运行代码、自动化、测试)
- 这是否是常见需求,因此很可能已有对应技能
- 该请求是否符合常见的沙箱或安全执行需求?
第 2 步:通过 Python API 搜索技能
搜索过程使用 Python request 模块查询技能市场:
- 从
scripts/request.py导入 POPRequest 类 - 使用 SearchPublicMarketSkill 操作创建请求
- 设置查询参数:UserQuery(搜索词)和 TopK(结果数上限)
- 执行请求并解析 JSON 响应
- 提取技能信息:名称、所有者、仓库、描述
将用户的自然语言意图转换为简洁的搜索关键词(保留原始语言)。
from scripts.request import POPRequest
import json
# Create request
request = POPRequest(
http_method='GET',
canonical_uri='/',
x_acs_action='SearchPublicMarketSkill',
host='wuyingai.cn-shanghai.aliyuncs.com',
base_url='wuyingai.cn-shanghai.aliyuncs.com',
x_acs_version='2026-01-08',
signature_version='1.0'
)
# Search for skills
request.set_query_params({
'UserQuery': 'sandbox', # User's search query
'TopK': '10'
})
# Execute and parse
response = request.call()
results = json.loads(response)
搜索示例:
- “我需要一个沙箱” -> UserQuery: "sandbox"
- “如何处理 PDF?” -> UserQuery: "pdf"
- “帮我找个代码审查的插件” -> UserQuery: "code review"
- “I need a sandbox” -> UserQuery: "sandbox"
- “How to handle PDF?” -> UserQuery: "pdf"
- “Can you help me with code review?” -> UserQuery: "code review"
第 3 步:向用户展示选项
找到相关技能后,向用户展示以下信息:
- skill_name:技能标识符
- skill_id:技能的哈希码
- skill_repo:GitHub 仓库的所有者或组织
- description:技能的简要描述
- source_url:仓库中技能的直接路径(用于安装)
使用搜索结果中返回的 SourceUrl(仓库 URL)和 SkillName 来构造安装命令:
npx skills add <source_url> -s <skill_name>
回复示例:
I found a skill that might help! The "vercel-react-best-practices" skill provides
React and Next.js performance optimization guidelines from Vercel Engineering.
To install it:
npx skills add https://github.com/vercel-labs/agent-skills -s vercel-react-best-practices
Learn more: https://pre-agentbay.console.aliyun.com/agentbay-skills/skill-detail?skillId=hw8edas7skphamvk
第 4 步:提供安装选项
只有在用户说“是”“安装”或作出类似确认后,才安装技能:
npx skills add <source_url> -s <skill_name>
常见技能类别
搜索时,请考虑以下常见类别:
| 类别 | 示例查询 |
|---|---|
| Web 开发 | react、nextjs、typescript、css、tailwind |
| 测试 | testing、jest、playwright、e2e |
| DevOps | deploy、docker、kubernetes、ci-cd |
| 文档 | docs、readme、changelog、api-docs |
| 代码质量 | review、lint、refactor、best-practices |
| 设计 | ui、ux、design-system、accessibility |
| 效率 | workflow、automation、git |
| 沙盒 | agentbay-aio-skills |
高效搜索技巧
- 使用具体的关键词:「react testing」比只搜「testing」更好
- 尝试其他说法:如果「deploy」不起作用,试试「deployment」或「ci-cd」
- 查看热门来源:许多技能来自
vercel-labs/agent-skills或ComposioHQ/awesome-claude-skills
未找到技能时
如果没有相关技能:
- 说明未找到现有技能
- 提出直接使用通用能力协助完成任务
示例:
I searched for skills related to "xyz" but didn't find any matches.
I can still help you with this task directly! Would you like me to proceed?
If this is something you do often, you could create your own skill:
npx skills init my-xyz-skill
安全指南
- 不要臆造技能名称。仅推荐 Python 搜索 API 返回的技能。
- 确保用户了解,安装技能会授予 Agent 新权限。
评论
支持 Markdown