跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    faridyusof727

    Advisor

    v0.1.1其他
    opencode-plugin-advisor

    opencode plugin that lets the agent consult a second, user-chosen advisor model before big or uncertain changes.

    GitHub 星标

    1

    月装机量

    34

    近 7 天 4

    综合评分SCORE

    30.0

    生态多维模型

    最近提交

    1 个月前

    2026-07-10

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-plugin-advisor@0.1.1"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    An opencode plugin that gives the agent a second opinion.

    It registers one tool, advisor, which the agent calls to consult a separate, user-chosen model before acting. The advisor model has read-only tools (read/grep/glob/webfetch) — it can look things up, but it can never edit files, run commands, or spawn subtasks.

    It also registers a /advise [question] slash command (via the plugin's config hook — no separate command file needed) so you can trigger it explicitly at any time.

    When the agent calls it

    • The change is big, risky, hard to reverse, or involves many blocking/destructive operations.
    • Exploration is done and it has a concrete solution but wants feedback before implementing.
    • You explicitly ask it to get advice, a second opinion, or check its approach.

    Install

    Add the plugin to your opencode config (global ~/.config/opencode/opencode.json or a project's opencode.json):

    {
      "plugin": ["opencode-plugin-advisor"]
    }
    

    Or, while developing locally, point at the file directly:

    {
      "plugin": ["file:///absolute/path/to/advisor/index.ts"]
    }
    

    Restart opencode after changing config.

    Configure the advisor model

    Copy advisor.example.json to advisor.json and set the model you want to consult. The plugin looks in, in order:

    1. <project>/advisor.json
    2. ~/.config/opencode/advisor.json
    {
      "model": "anthropic/claude-fable-5"
    }
    

    Optional fields:

    • system — override the default advisor system prompt.
    • tools — override the default tool permissions ({ "write": false, ... }).

    Development

    bun install
    bunx tsc --noEmit