Teach OpenCode Go your weekly chore once, then run it in minutes
Capture a repeating chore as a reusable OpenCode command backed by the Go plan's models, so a two-hour weekly task becomes a five-minute run.
Run this workflow
CI-verified, 2/2 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Anyone with a genuinely repeating chore (rename/merge files, reshape a spreadsheet, pull the same numbers into the same template). CI validates opencode.json: it parses, sets a model, and defines at least one reusable command with a real template. No key, no model call. The chore the command actually runs is fenced.
Not for
- Chores that change every time, this only pays off when the work truly repeats
- Trusting the first runs, an AI can write a tool that looks right and is quietly wrong; check the first few against what you would have done by hand and keep a backup, run it on a copy until you trust it
- Truly hard one-off problems, the Go plan's open models are strong for everyday automation but not quite the very best on the market
The Stack
Tested Against
opencode.ai/docs (commands, Go plan, 2026-06)node@20Side effects & data flow
- Network
- none, local only
- Writes
- ./opencode.json
- Credentials
- none required
Prerequisites
- OpenCode installed
- An OpenCode Go subscription ($5 first month, then $10/mo) to actually run it
Steps
- 1
Capture the chore as a reusable command and validate the config
Walk OpenCode through the chore once, then save it as a command in opencode.json with a template that says to work on a copy and stop before overwriting anything real. Pick a Go-plan model. CI checks the config parses, names a model, and defines a real command; running the command is fenced.
cat > opencode.json <<'JSON' { "$schema": "https://opencode.ai/config.json", "model": "opencode/glm-5.2", "command": { "weekly-report": { "template": "Rebuild this week's report from the data folder into the standard template. Work on a copy of the files and stop before overwriting anything real.", "description": "The captured weekly chore: run this instead of redoing it by hand." } } } JSON node -e ' const fs = require("fs"); const c = JSON.parse(fs.readFileSync("opencode.json", "utf8")); function bad(m) { console.error("BAD: " + m); process.exit(1); } const cmds = c.command || {}; const names = Object.keys(cmds); if (names.length < 1) bad("no reusable command defined"); const first = cmds[names[0]]; if (!first || !first.template || first.template.length < 10) bad("command has no real template"); const model = c.model || first.model || ""; if (!model) bad("no model set (top-level or on the command)"); console.log("config OK: opencode.json sets model " + model + " and defines " + names.length + " reusable command(s) (" + names[0] + ")"); ' - 2
Run it each week (the model step, not checked by CI)
Subscribe to OpenCode Go, then run the command. The first few times, diff what it produced against what you would have done by hand and keep a backup. Once you trust it, a two-hour chore is a five-minute run. The chore execution is fenced.
Eval, 2 fixtures
Last passed: verified todaychore-okcontainstimeout 30s · max $0Expected:
config OK: opencode.json sets model opencode/glm-5.2 and defines 1 reusable command(s) (weekly-report)clean-exitexit_codetimeout 30s · max $0Expected:
0
Results
The expensive part of a repeating chore is redoing the thinking every time. Capture it once as a command and every run after is near-instant. Building it might take an hour week one (roughly break-even); from week two a ~2-hour chore becomes a ~5-minute run, about 8 hours/month back. At $40/hr that is ~$320 of time recovered for a $10 spend.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Related workflows
- Let a free model triage your reading: one-line summary + reply flag
- Scrape politely: honor robots.txt and a crawl delay (the part most skip)
- Firecrawl: turn a page into the exact JSON you asked for
- OpenCode: add an MCP tool, then lock it to one agent
- OpenCode: run it headless in scripts and CI, with JSON output
- OpenCode: a reviewer subagent gated to exactly the git commands you allow
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).