AgentSkillsCN

opencode-config

在不同 AI 模型提供商之间切换 OpenCode AI 模型配置。适用于用户说“切换到 Copilot”、“切换到 Copilot”、“切换到 Anthropic”、“切换到 Anthropic”、“切换到 Zen”、“切换到 Zen”,或提出更换 AI 模型提供商的需求时使用。

SKILL.md
--- frontmatter
name: opencode-config
description: Switch OpenCode AI model configurations between providers. Use when user says "switch to copilot", "cambiar a copilot", "switch to anthropic", "cambiar a anthropic", "switch to zen", "cambiar a zen", or asks to change AI model providers.

OpenCode Model Config Switching

Config location: ~/.config/opencode/oh-my-opencode.json

Templates tracked in .opencode-configs/:

ConfigProvidersCost Profile
anthropic-only.jsonAnthropic only (Opus/Sonnet/Haiku)$$
anthropic-zen.jsonAnthropic (heavy) + Zen free models (light)$ (needs Zen free tier)
anthropic-openai.jsonAnthropic + OpenAI direct$$$$
copilot-antigravity.jsonGitHub Copilot + Antigravity$$$

Commands

Switch to Anthropic Only (recommended when other providers exhausted):

bash
cp .opencode-configs/anthropic-only.json ~/.config/opencode/oh-my-opencode.json && echo "Switched to Anthropic Only. Restart OpenCode."

Switch to Anthropic + Zen Free (budget, needs Zen free tier):

bash
cp .opencode-configs/anthropic-zen.json ~/.config/opencode/oh-my-opencode.json && echo "Switched to Anthropic + Zen Free. Restart OpenCode."

Switch to Copilot + Antigravity:

bash
cp .opencode-configs/copilot-antigravity.json ~/.config/opencode/oh-my-opencode.json && echo "Switched to GitHub Copilot + Antigravity. Restart OpenCode."

Switch to Anthropic + OpenAI:

bash
cp .opencode-configs/anthropic-openai.json ~/.config/opencode/oh-my-opencode.json && echo "Switched to Anthropic + OpenAI. Restart OpenCode."

Remind user to restart OpenCode after switching.