|
| 1 | +--- |
| 2 | +name: oh-my-openagent-setup |
| 3 | +description: Configure or reconfigure oh-my-openagent for HolyCode. Mirrors the upstream provider questionnaire, writes plugin config, keeps only primary agents visible, and prints doctor/refresh/auth follow-up steps. |
| 4 | +--- |
| 5 | + |
| 6 | +# oh-my-openagent-setup |
| 7 | + |
| 8 | +Use this skill when the user wants to: |
| 9 | + |
| 10 | +- set up oh-my-openagent for the first time |
| 11 | +- reconfigure it after adding or removing providers |
| 12 | +- fix confusing picker visibility |
| 13 | +- refresh the expected model/config path after provider changes |
| 14 | + |
| 15 | +This skill manages HolyCode's supported setup flow. Keep it close to upstream oh-my-openagent behavior, but apply HolyCode defaults for agent visibility and safety. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Step 0 — Confirm the working context |
| 20 | + |
| 21 | +1. Verify you are inside a HolyCode container or a HolyCode-backed OpenCode environment. |
| 22 | +2. Use these paths as the defaults unless the user explicitly says otherwise: |
| 23 | + - Main OpenCode config: `~/.config/opencode/opencode.json` |
| 24 | + - oh-my-openagent config: `~/.config/opencode/oh-my-openagent.jsonc` |
| 25 | + - Skills directory: `~/.config/opencode/skills/` |
| 26 | +3. If `opencode.json` does not exist, explain that HolyCode/OpenCode is not bootstrapped yet and stop. |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## Step 1 — Detect current state |
| 31 | + |
| 32 | +Before asking questions, inspect the current config state and summarize it briefly: |
| 33 | + |
| 34 | +1. Is `oh-my-openagent` already present in the `plugin` array of `opencode.json`? |
| 35 | +2. Does `oh-my-openagent.jsonc` already exist? |
| 36 | +3. If it exists, extract any current values that match the questionnaire fields below. |
| 37 | +4. If a previous backup exists, mention it but do not restore it automatically. |
| 38 | + |
| 39 | +If the plugin-specific config already exists, this run should behave as **reconfiguration mode**. |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | +## Step 2 — Ask the upstream-style questionnaire |
| 44 | + |
| 45 | +Ask the user these questions in order. If reconfiguring, show the current value as the default. |
| 46 | + |
| 47 | +1. Claude subscription: `yes`, `no`, or `max20` |
| 48 | +2. OpenAI subscription: `yes` or `no` |
| 49 | +3. Gemini availability: `yes` or `no` |
| 50 | +4. GitHub Copilot availability: `yes` or `no` |
| 51 | +5. OpenCode Zen availability: `yes` or `no` |
| 52 | +6. Z.ai Coding Plan availability: `yes` or `no` |
| 53 | +7. OpenCode Go availability: `yes` or `no` |
| 54 | + |
| 55 | +Do not invent extra product questions unless the user explicitly asks for advanced customization. |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## Step 3 — Apply HolyCode defaults |
| 60 | + |
| 61 | +When writing `oh-my-openagent.jsonc`, enforce this visibility policy unless the user explicitly asks for something else: |
| 62 | + |
| 63 | +### Visible primary agents |
| 64 | + |
| 65 | +- `sisyphus` |
| 66 | +- `hephaestus` |
| 67 | +- `prometheus` |
| 68 | +- `atlas` |
| 69 | + |
| 70 | +### Hidden subagents |
| 71 | + |
| 72 | +- `oracle` |
| 73 | +- `librarian` |
| 74 | +- `explore` |
| 75 | +- `metis` |
| 76 | +- `momus` |
| 77 | +- `multimodal-looker` |
| 78 | +- `sisyphus-junior` |
| 79 | + |
| 80 | +Set visible agents to `mode: "all"` and subagents to `mode: "subagent"`. |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## Step 4 — Write the configs safely |
| 85 | + |
| 86 | +### A. Ensure plugin registration |
| 87 | + |
| 88 | +Update `opencode.json` so the `plugin` array includes `oh-my-openagent` exactly once. |
| 89 | + |
| 90 | +### B. Back up the existing plugin config |
| 91 | + |
| 92 | +If `oh-my-openagent.jsonc` already exists, create a backup first: |
| 93 | + |
| 94 | +- `oh-my-openagent.jsonc.bak` |
| 95 | + |
| 96 | +If that name already exists, append a timestamp rather than overwriting the existing backup. |
| 97 | + |
| 98 | +### C. Write or update `oh-my-openagent.jsonc` |
| 99 | + |
| 100 | +The file should: |
| 101 | + |
| 102 | +1. include the upstream schema URL if available |
| 103 | +2. store the questionnaire answers in a clean, editable JSONC structure |
| 104 | +3. include HolyCode's default agent visibility policy |
| 105 | +4. preserve unrelated user fields where practical during reconfiguration |
| 106 | + |
| 107 | +If preserving unrelated fields would be unsafe because the file is malformed, stop and explain the problem instead of blindly rewriting. |
| 108 | + |
| 109 | +--- |
| 110 | + |
| 111 | +## Step 5 — Explain stale-model behavior honestly |
| 112 | + |
| 113 | +Do **not** claim that HolyCode fully fixes upstream model-resolution bugs. |
| 114 | + |
| 115 | +Instead, explain this clearly: |
| 116 | + |
| 117 | +- Adding a provider later does not always update the visible default model automatically. |
| 118 | +- HolyCode's supported fix path is to rerun `/oh-my-openagent-setup`, then refresh model capabilities, then verify provider/model state. |
| 119 | +- Provider auth still belongs to OpenCode/provider login, not this skill. |
| 120 | + |
| 121 | +--- |
| 122 | + |
| 123 | +## Step 6 — Print the follow-up commands |
| 124 | + |
| 125 | +Always finish by showing the next actions the user may need. |
| 126 | + |
| 127 | +### Provider auth |
| 128 | + |
| 129 | +```bash |
| 130 | +opencode providers list |
| 131 | +opencode providers login |
| 132 | +``` |
| 133 | + |
| 134 | +### Verify oh-my-openagent setup |
| 135 | + |
| 136 | +```bash |
| 137 | +bunx oh-my-opencode doctor |
| 138 | +``` |
| 139 | + |
| 140 | +### Refresh model capabilities after provider changes |
| 141 | + |
| 142 | +```bash |
| 143 | +bunx oh-my-opencode refresh-model-capabilities |
| 144 | +``` |
| 145 | + |
| 146 | +If the UI still shows a stale visible default after provider changes, tell the user to: |
| 147 | + |
| 148 | +1. rerun `/oh-my-openagent-setup` |
| 149 | +2. refresh model capabilities |
| 150 | +3. reopen or reselect the model in the UI if needed |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +## Rules |
| 155 | + |
| 156 | +- Keep the questionnaire close to upstream. |
| 157 | +- Do not perform provider authentication for the user. |
| 158 | +- Do not expose subagents in the picker by default. |
| 159 | +- Do not overwrite an existing plugin config without making a backup first. |
| 160 | +- Do not silently destroy malformed config files. |
| 161 | +- Keep explanations concise and practical. |
0 commit comments