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

    Better Prompt

    v0.9.0模型接入
    @objctp/opencode-better-prompt

    Automatically corrects, translates and enhances user prompts before submission to an LLM Model via Claude Code or OpenCode.

    GitHub 星标

    0

    月装机量

    51

    近 7 天 6

    综合评分SCORE

    28.0

    生态多维模型

    最近提交

    1 个月前

    2026-06-28

    快速安装与配置

    opencode.json

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

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@objctp/opencode-better-prompt@0.9.0"]
    }

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

    Automatically fixes and improves user prompts before they reach the model.

    Supports two CLIs, with the same settings:

    See your CLI's README for install steps and the details that matter.

    How it works

    Every prompt runs through up to three stages, each of which you can switch on or off:

    original → [correction] → [translation] → [enhancement] → final
    
    • Correction — fixes grammar and spelling whilst preserving intent, style, and punctuation
    • Translation — translates non-English prompts to English; English passes through unchanged
    • Enhancement — rewrites for clarity, specificity, and structure

    Stages are optional — the plugin works with just correction, just enhancement, or any combination.

    Settings

    Settings live in a YAML file. The options are the same on both CLIs — only the path differs, so see your CLI's README.

    Setting Default What it does
    enabled true Master switch
    correction true Fix grammar and spelling
    correction_model haiku Model for correction
    translation false Translate non-English to English
    translation_model haiku Model for translation
    enhancement false Rewrite for clarity
    enhancement_model sonnet Model for enhancement
    audit true Keep a log of prompts and changes
    verbose false Show extra detail

    Modelshaiku, sonnet, and opus work everywhere. OpenCode can also use the providers you've connected (fast, capable, powerful) or an explicit provider/model ID. See the OpenCode README.

    Audit log

    With audit on, each prompt is logged as one line of JSON — the original text, each stage's output, the mistakes caught, and the models used. OpenCode adds token usage. Paths and exact fields are in the CLI READMEs.

    License

    MIT