name: code-mate-opencode description: Runs OpenCode non-interactively for repository analysis and coding tasks. Use when the user asks to delegate work to OpenCode or compare OpenCode with another coding agent.
OpenCode
Run
- Set the Bash working directory to the exact project the user named and set a finite timeout, normally 10 minutes.
- Check availability with
command -v opencode. If it is missing, stop and ask the user to install OpenCode in Code Mate. - Run one task and exit:
opencode run "<prompt>" --format json
Pass the prompt as one quoted argument. Parse stdout as a JSON event stream and treat an error event or nonzero exit as failure. Never start the interactive OpenCode UI or an authentication flow.