What problem does it solve?
This Skill allows users to run the local opencode CLI for arbitrary prompts in headless mode, providing JSON event parsing, file-based prompts, and safe fallback to the CLI default model when a model alias is unavailable.
Core Features & Use Cases
- Headless
opencode Execution: Invoke opencode from shell scripts or other automation tools without TUI mode.
- JSON Event Parsing: Parse JSON output from
opencode and provide only assistant text (type=text) to the output.
- File-based System/User Prompts: Support file-based system/user prompts and JSON event parsing into plain text output.
- Safe Fallback Model: Safely fall back to the CLI default model when a model alias is unavailable.
- Use Case: This runner is particularly useful for cross-model work when you need to invoke
opencode from a different host (e.g., Claude, Codex) without entering TUI mode.
Quick Start
Use the opencode-cli-runner skill to run the opencode CLI for a given model with the provided prompts and output the results to a file.