opencode-skill-searchBM25-powered skill search plugin for OpenCode — discover and load agent skills by keyword
0
66
近 7 天 9
23.5
生态多维模型
4 个月前
2026-03-27
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-skill-search@0.1.4"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-skill-search@0.1.4"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-skill-searchopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
opencode-skill-search
BM25-powered skill search plugin for OpenCode — discover and load agent skills by keyword.
Why?
OpenCode's built-in skill tool embeds the full list of available skills in its tool description, consuming tokens on every request. This plugin replaces that with an on-demand skill_search tool that uses BM25 ranking to find relevant skills only when needed.
What it does
skill_searchtool — search installed skills by keyword with BM25 relevance ranking- System prompt injection — reminds the agent to search for skills before tackling non-trivial tasks
- Skill tool trimming — replaces the verbose skill list in the
skilltool description with a pointer toskill_search
Install
Add to your opencode.json:
{
"plugin": ["opencode-skill-search"]
}
OpenCode will auto-install the package on next launch.
Scanned directories
The plugin looks for SKILL.md files in these directories:
| Directory | Source |
|---|---|
<project>/.opencode/skills/ |
Project OpenCode |
~/.config/opencode/skills/ |
Global OpenCode |
<project>/.claude/skills/ |
Project Claude-compatible |
~/.claude/skills/ |
Global Claude-compatible |
<project>/.agents/skills/ |
Project Agent-compatible |
~/.agents/skills/ |
Global Agent-compatible |
~/.cache/opencode/node_modules/superpowers/skills/ |
Installed skill packs |
Usage
Once installed, the agent will automatically use skill_search before tasks. You can also call it directly:
skill_search({query: "testing"})
skill_search({query: "docker deployment", max_results: 3})
License
MIT