Supercode Autoinvoke Skill Gate
OpenCode plugin (v1 + v2) that hides Explicit-only skills (Claude Code, Codex, OpenCode portable markers) from the model-facing skill catalog while keeping explicit invocation working
0
197
近 7 天 153
34.1
生态多维模型
6 天前
2026-09-29
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@glaicer/supercode-autoinvoke-skill-gate@1.0.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@glaicer/supercode-autoinvoke-skill-gate@1.0.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @glaicer/supercode-autoinvoke-skill-gateOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
You install a lot of skills globally. Most of them are meant for you to invoke — not for the model to grab on its own.
Claude Code, Codex, and OpenCode 2 beta already have a way to say "don't auto-invoke me". OpenCode v1 just ignores it, so the model sees every installed skill and may pick the wrong one by itself.
This plugin stops the model from auto-using your manual-only skills. It removes those manual-only skills from <available_skills> in the system prompt, so the model never considers them.
- Smaller prompt, fewer tokens, less deliberating over which skill to pick.
- Fewer surprise side effects from a skill firing when you didn't ask for it.
- Nothing is blocked:
/my-skillor "use my-skill" still works — it just never happens automatically.
How to mark a skill as manual-only
Any one of these is enough:
- Claude Code — in
SKILL.mdfrontmatter:--- disable-model-invocation: true --- - OpenCode v2 — in
SKILL.mdfrontmatter:--- metadata: opencode/autoinvoke: false --- - Codex — in
agents/openai.yamlnext toSKILL.md:policy: allow_implicit_invocation: false
Only real booleans count (true / false, no quotes).
Install
Install with the OpenCode CLI:
opencode plugin add @glaicer/supercode-autoinvoke-skill-gate
--globalinstalls into the global config (~/.config/opencode); default is local (.opencodein the current project).--forcereplaces an already-installed version.- Restart OpenCode after installing.
Manual install also works: add the package to the plugins array in opencode.json
(OpenCode v1 uses the plugin array instead):
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@glaicer/supercode-autoinvoke-skill-gate"]
}
Restart OpenCode after saving.
Put it last in your
plugins(or v1plugin) list so no later plugin re-adds the filtered skills.
On OpenCode v2 the plugin sets the native autoinvoke: false flag on
Explicit-only skills instead of patching the system prompt; on v1 it filters
<available_skills> via the experimental.chat.system.transform hook.
Install on OpenCode v1
On OpenCode v1 install plugin version 0.1.2. Pin the version in the spec below; a bare package name resolves to latest:
opencode plugin @glaicer/supercode-autoinvoke-skill-gate@0.1.2 --global
--global(-g) writes into the global config (~/.config/opencode/opencode.json); default is project-local (.opencode/opencode.json).- If the plugin is already configured without a version, rerun with
--force(-f) to replace that entry with the pinned spec — otherwise the command reportsAlready configuredand keeps the unpinned entry.
Manual install also works: put the pinned spec in the plugin array (v1's key, not plugins) of opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@glaicer/supercode-autoinvoke-skill-gate@0.1.2"]
}
v1 resolves the npm spec (including the version) and installs it automatically at startup — no npm install needed. Restart OpenCode after saving.
同类生态推荐
Skills Tui
opencode-skills-tui
OpenCode TUI plugin that shows skills and loaded state in the sidebar
Skill Registry
opencode-skill-registry
OpenCode plugin that generates a lightweight per-project index of skills and convention files.
Skills Collection
opencode-skills-collection
OpenCode CLI plugin that automatically downloads and keeps skills up to date.