OpenParable
Skip to content
← Back to skills

Setting Up Oh My Opencode

Agent Building
setting-up-oh-my-opencode

Setting Up Oh My Opencode is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when installing or configuring oh-my-opencode plugin for OpenCode, or when Vertex AI models need to be configured for Claude/Gemini access

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/setting-up-oh-my-opencode/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/setting-up-oh-my-opencode, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Setting Up oh-my-opencode

Install and configure oh-my-opencode plugin with platform-appropriate model routing.

Prerequisites

  1. OpenCode installed via home-manager (from llm-agents.nix)
  2. Authentication configured:
    • ChatGPT Plus: opencode auth login → OpenAI → headless
    • Vertex AI (macOS): gcloud auth application-default login

Platform Subscription Summary

PlatformClaudeOpenAIGeminiCopilot
devboxMax 20x (personal)ChatGPT PlusNoNo
macOSVertex AI (work)ChatGPT PlusVertex AI (work)Yes (work)

Verify Vertex AI Access (macOS only)

Before installing, confirm Vertex AI credentials work:

# Check env vars
echo "GOOGLE_CLOUD_PROJECT: $GOOGLE_CLOUD_PROJECT"
echo "VERTEX_LOCATION: $VERTEX_LOCATION"

# Test model access
opencode models | grep google-vertex
opencode run --model google-vertex/gemini-2.5-flash "Say hello"
opencode run --model google-vertex-anthropic/claude-sonnet-4@20250514 "Say hello"

Installation

macOS (Vertex AI + ChatGPT + Copilot)

npx oh-my-opencode install --no-tui \
  --claude=yes \
  --openai=yes \
  --gemini=yes \
  --copilot=yes

Devbox (Max 20x + ChatGPT)

npx oh-my-opencode install --no-tui \
  --claude=max20 \
  --openai=yes

Post-Install: Configure Vertex AI Models (macOS)

The installer configures anthropic/ and google/ model names, but macOS should route through Vertex AI for work billing.

Edit ~/.config/opencode/oh-my-opencode.json:

BeforeAfter
anthropic/claude-opus-4-5google-vertex-anthropic/claude-opus-4-5@20251101
anthropic/claude-sonnet-4-5google-vertex-anthropic/claude-sonnet-4-5@20250929
anthropic/claude-haiku-4-5google-vertex-anthropic/claude-haiku-4-5@20251001
google/gemini-3-flashgoogle-vertex/gemini-3-flash-preview
google/gemini-3-progoogle-vertex/gemini-3-pro-preview

Replace all occurrences in both agents and categories sections.

Verification

# Check agent assignments
cat ~/.config/opencode/oh-my-opencode.json | jq '.agents.sisyphus, .agents.oracle'

# Test a Vertex AI model
opencode run --model google-vertex-anthropic/claude-opus-4-5@20251101 "Say 'Vertex AI working'"

Troubleshooting

IssueFix
opencode: command not foundRun home-manager switch to install opencode
Vertex AI models not listedCheck GOOGLE_CLOUD_PROJECT and gcloud auth application-default login
"Permission denied" on VertexVerify IAM permissions in GCP console