Skip to content

Instantly share code, notes, and snippets.

@minpeter
Last active February 23, 2026 16:36
Show Gist options
  • Select an option

  • Save minpeter/553d5f8d4f6c04ee8b5f98a5e6923bcc to your computer and use it in GitHub Desktop.

Select an option

Save minpeter/553d5f8d4f6c04ee8b5f98a5e6923bcc to your computer and use it in GitHub Desktop.
You are an opencode task agent. Do not ask questions; execute the following exactly and idempotently.
Goal:
- Reproduce my current opencode-notifier setup as closely as possible (StarCraft SCV profile), including detailed notifier options and per-event volume levels.
Reference Information:
- Plugin repo: https://github.com/mohak34/opencode-notifier
- Plugin package: @mohak34/opencode-notifier@latest
- Sound URLs:
1) https://www.myinstants.com/media/sounds/scv-good-to-go.mp3
2) https://www.myinstants.com/media/sounds/orders-captain-scv.mp3
3) https://www.myinstants.com/media/sounds/scv-orders-received.mp3
4) https://www.myinstants.com/media/sounds/scv-reporting-for-duty.mp3
5) https://www.myinstants.com/media/sounds/tadupd04.mp3 (nuclear launch detected)
Runtime Paths:
- HOME_DIR = expanded absolute value of $HOME at runtime
- OPENCODE_CONFIG = HOME_DIR + "/.config/opencode/opencode.json"
- NOTIFIER_CONFIG = HOME_DIR + "/.config/opencode/opencode-notifier.json"
- SOUND_DIR = HOME_DIR + "/.config/opencode/starcraft-scv"
- ABS_SOUND_DIR = expanded absolute path of SOUND_DIR
ABS_SOUND_DIR Strict Rules (CRITICAL):
- Determine ABS_SOUND_DIR from runtime HOME_DIR; never hardcode a username.
- ABS_SOUND_DIR must be an absolute path and must end with `/.config/opencode/starcraft-scv`.
- Final JSON must not contain placeholders (`<ABS_SOUND_DIR>`), `~`, `$HOME`, or relative paths.
- Every entry in `sounds` must start with `ABS_SOUND_DIR + "/"`.
- If any sound path violates these rules, treat as failure and fix it.
Tasks:
1) Create SOUND_DIR if it does not exist.
2) Download and save the 5 sound files with these exact names:
- scv-good-to-go.mp3
- scv-orders-captain.mp3
- scv-orders-received.mp3
- scv-reporting-for-duty.mp3
- nuclear-launch-detected.mp3
3) Ensure @mohak34/opencode-notifier@latest exists in the plugin array of OPENCODE_CONFIG:
- Add it if missing.
- Do not duplicate it.
- Preserve all other existing plugin entries.
4) Configure/update NOTIFIER_CONFIG to match these values:
{
"sound": true,
"notification": true,
"timeout": 5,
"showProjectName": true,
"showIcon": true,
"notificationSystem": "osascript",
"command": {
"enabled": false,
"path": "/path/to/command",
"args": [
"--event",
"{event}",
"--message",
"{message}"
],
"minDuration": 0
},
"events": {
"permission": { "sound": true, "notification": true },
"complete": { "sound": true, "notification": true },
"subagent_complete": { "sound": true, "notification": false },
"error": { "sound": true, "notification": true },
"question": { "sound": true, "notification": true }
},
"messages": {
"permission": "Session needs permission",
"complete": "Session has finished",
"subagent_complete": "Subagent task completed",
"error": "Session encountered an error",
"question": "Session has a question"
},
"sounds": {
"permission": "<ABS_SOUND_DIR>/scv-orders-captain.mp3",
"complete": "<ABS_SOUND_DIR>/scv-good-to-go.mp3",
"subagent_complete": "<ABS_SOUND_DIR>/scv-orders-received.mp3",
"error": "<ABS_SOUND_DIR>/nuclear-launch-detected.mp3",
"question": "<ABS_SOUND_DIR>/scv-reporting-for-duty.mp3"
},
"volumes": {
"permission": 0.1,
"complete": 0.5,
"subagent_complete": 0.1,
"error": 0.2,
"question": 0.1
}
}
Implementation notes for step 4:
- `<ABS_SOUND_DIR>` above is a template token only.
- Before writing NOTIFIER_CONFIG, resolve it to the runtime absolute ABS_SOUND_DIR.
- Keep all non-path values exactly as specified.
5) Verification:
- Validate both JSON files (OPENCODE_CONFIG and NOTIFIER_CONFIG).
- Confirm all 5 sound files exist and are non-empty.
- Confirm all configured volume values are within 0..1.
- Verify all `sounds.*` paths use the resolved ABS_SOUND_DIR prefix.
- Run a sequential playback test in this order:
permission -> complete -> subagent_complete -> error -> question
6) Final output:
- Provide a table with columns:
Event | File | Absolute Path | Exists | Volume | Test Played
- Include one line summarizing key notifier options:
timeout, showProjectName, showIcon, notificationSystem
- Final line must be exactly:
opencode restart required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment