YAML examples for Opencode
Run Opencode with all options
yaml
- action: "Run Opencode"
type: "OPENCODE"
trigger_time: "ON_EVERY_EXECUTION"
integration: "my-opencode-integration"
prompts:
- "Review the code and suggest improvements"
- file: ".buddy/opencode-prompt.md"
model: "anthropic/claude-sonnet-4-5"
skills:
- buddy-works/security-audit
mcp_servers:
github:
type: "http"
url: "https://api.githubcopilot.com/mcp/"
headers:
Authorization: "Bearer $GITHUB_TOKEN"
filesystem:
type: "stdio"
command: "npx"
args:
- "-y"
- "@modelcontextprotocol/server-filesystem"
- "/buddy/my-repo"
config: |-
{"permission": {"bash": "ask"}}
Minimal Opencode
yaml
- action: "Opencode Review"
type: "OPENCODE"
trigger_time: "ON_EVERY_EXECUTION"
integration: "my-opencode-integration"
prompts:
- "Review the code"
Opencode with a configuration file from the repository
yaml
- action: "Opencode Review"
type: "OPENCODE"
integration: "my-opencode-integration"
prompts:
- "Review the code"
config_file: "opencode.json"