Skip to content
    ↑↓ select↵ openesc close
    English中文
    objctp

    Better Prompt

    v0.9.0Model Providers
    @objctp/opencode-better-prompt

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

    GitHub stars

    0

    Monthly installs

    51

    6 in 7 days

    Composite scoreSCORE

    28.0

    Multi-signal model

    Last commit

    1 month ago

    2026-06-28

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

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

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    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