opencode-config

Manage OpenCode configuration files with JSONC schema validation.

Updated Feb 9, 2025
One-click install
npx skills add https://github.com/xeon826/dotfiles --skill opencode-config-xeon826
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-config
Source: https://github.com/xeon826/dotfiles/tree/main/opencode/skill/opencode-config
Command: npx skills add https://github.com/xeon826/dotfiles --skill opencode-config-xeon826

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the management of OpenCode's configuration files, allowing users to easily set up models, permissions, themes, and project-specific rules.

Core Features & Use Cases

  • Centralized Configuration: Edit opencode.json for global settings like default models, themes, and auto-update preferences.
  • Agent Rules Management: Define project-specific instructions and conventions in AGENTS.md to guide agent behavior.
  • Use Case: A user wants to set up a new project with specific coding standards and ensure that only approved bash commands can be executed. This Skill guides them through updating AGENTS.md and configuring the permission.bash section in opencode.json.

Quick Start

Use the opencode-config skill to set Anthropic's Claude Sonnet as the default model and allow all bash commands.

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 settings for a new project?

To configure OpenCode settings, you edit the `opencode.json` file to define provider setups, default models, formatter rules, and environment variables using JSONC syntax.

What is the best way to set coding conventions for an AI agent?

To set coding conventions for an agent, you create and edit an `AGENTS.md` file containing project-specific instructions that guide agent behavior and enforce standards.

Can I restrict bash command permissions in OpenCode?

Yes, you can restrict bash command permissions by updating the `permission.bash` section within your `opencode.json` configuration file to specify approved commands.

Does OpenCode configuration support JSONC with comments?

Yes, OpenCode configuration supports JSONC syntax, allowing you to include comments and trailing commas in your `opencode.json` file alongside schema validation.

How do I set up a default model like Claude Sonnet in OpenCode?

You set up a default model by editing the global settings in `opencode.json` to specify your preferred provider and model, such as configuring Anthropic's Claude Sonnet.

Are there example configurations available for team projects?

Yes, OpenCode configuration provides examples for minimal, power-user, and team project setups to help you quickly establish environment variables and model settings.