跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    Glaicer

    Supercode Autoinvoke Skill Gate

    @glaicer/supercode-autoinvoke-skill-gate·v1.0.0·工具与命令

    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

    GitHub 星标

    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"]
    }

    OpenCode 启动时会通过内嵌运行时自动加载 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-skill or "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.md frontmatter:
      ---
      disable-model-invocation: true
      ---
      
    • OpenCode v2 — in SKILL.md frontmatter:
      ---
      metadata:
        opencode/autoinvoke: false
      ---
      
    • Codex — in agents/openai.yaml next to SKILL.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
    
    • --global installs into the global config (~/.config/opencode); default is local (.opencode in the current project).
    • --force replaces 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 v1 plugin) 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 reports Already configured and 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.

    同类生态推荐