opencode-config

Centralize OpenCode CLI provider, model, and baseURL configuration across project, global, and auth settings.

215|26|Updated Dec 15, 2025
One-click install
npx skills add https://github.com/serejaris/ris-claude-code --skill opencode-config
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-config
Source: https://github.com/serejaris/ris-claude-code/tree/main/skills/opencode-config
Command: npx skills add https://github.com/serejaris/ris-claude-code --skill opencode-config

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenCode CLI configurations are scattered across project, global, and auth locations, making provider setup, model selection, and baseURL changes error-prone and hard to audit.

Core Features & Use Cases

  • Centralized configuration: merges project > global > auth to determine model, provider, and baseURL.
  • Custom provider support: define OpenAI-compatible providers with baseURL and model mappings for different environments.
  • Troubleshooting and guidance: built-in steps to resolve common config issues and ensure correct model selection.

Quick Start

Install or enable the skill by placing it in your Claude/OpenCode skills directory, then edit opencode.json at the relevant location (project/global/auth) to set your default model and provider. Use the /models command to select a provider/model and test changes. If issues arise, consult the documentation and restart Claude to reload the config.

Frequently Asked Questions about opencode-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure OpenCode CLI providers and models across different environments?

To configure OpenCode CLI providers and models, edit opencode.json at the project, global, or auth level to set your default model and provider. The configuration merges these locations using a prioritized project > global > auth hierarchy to determine final settings deterministically.

Why does my OpenCode CLI model selection keep reverting to the wrong provider?

OpenCode CLI model selection reverts because configurations are scattered across project, global, and auth locations with a strict priority hierarchy. You need to audit and enforce the prioritized config model at the correct level to ensure deterministic model selection resolves the conflict.

Can I use a custom OpenAI-compatible provider with OpenCode CLI?

Yes, you can use a custom OpenAI-compatible provider with OpenCode CLI by defining the provider options with a specific baseURL and setting mode-specific model mappings in your configuration file. This allows you to manage multiple OpenCode providers or environments.

What is the best way to troubleshoot OpenCode CLI configuration issues?

The best way to troubleshoot OpenCode CLI configuration issues is to use the built-in troubleshooting workflows to audit your provider, model, and baseURL settings. After editing opencode.json, use the /models command to test changes and restart Claude to reload the config.

Do I need to restart Claude to apply new OpenCode CLI baseURL settings?

Yes, you need to restart Claude to apply new OpenCode CLI baseURL settings so the application can reload the configuration. If issues arise after modifying the provider options in opencode.json, consulting the documentation and restarting ensures the changes take effect.