@objctp/opencode-better-promptAutomatically corrects, translates and enhances user prompts before submission to an LLM Model via Claude Code or OpenCode.
0
51
6 in 7 days
28.0
Multi-signal model
1 month ago
2026-06-28
Install and configure
opencode.jsonWrites 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"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@objctp/opencode-better-prompt@0.9.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @objctp/opencode-better-promptopencode 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 |
Models — haiku, 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