opencode-comments-plugin
v0.3.0
Published
OpenCode plugin that warns on new comments/docstrings using comment-checker
Readme
opencode-comments-plugin
Stop the comment slop.
OpenCode plugin that warns when new comments or docstrings are added.
It wraps the comment-checker CLI from go-claude-code-comment-checker and surfaces warnings in tool output.
Credits
This plugin is derived from the comment-checker hook logic in oh-my-opencode.
Credit to oh-my-opencode for the original hook integration.
Install
NPM/Bun
bun add opencode-comments-plugin
# or
npm install opencode-comments-pluginLocal plugin
bun install
bun run buildThen point your OpenCode config at the built file:
{
"plugin": ["file:///absolute/path/to/opencode-comments-plugin/dist/index.js"]
}Configuration
You can override the CLI warning message using comment_checker.custom_prompt:
{
"comment_checker": {
"custom_prompt": "DETECTED:\n{{comments}}\nFix it."
}
}Behavior
- Runs on
Write,Edit, andMultiEdittool calls. - If the CLI detects comments, it appends the warning message to tool output.
- If the CLI binary is missing, the plugin auto-downloads the correct release.
Development
bun install
bun run build
bun run typecheck