.opencode/skill/opencode-config/SKILL.md
Edit opencode.json, AGENTS.md, and config files. Use proactively for provider setup, permission changes, model config, formatter rules, or environment variables. Examples: - user: "Add Anthropic as a provider" → edit opencode.json providers, add API key baseEnv var, verify with opencode run test - user: "Restrict this agent's permissions" → add permission block to agent config, set deny/allow for tools/fileAccess - user: "Set GPT-5 as default model" → edit global or agent-level model preference, verify model name format - user: "Disable gofmt formatter" → edit formatters section, set languages.gofmt.enabled = false
npx skillsauth add igorwarzocha/opencode-workflows opencode-configInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Help users configure OpenCode through guided setup of config files and rules.
<question_tool>
Batching Rule: Use only for 2+ related questions; single questions use plain text.
Syntax Constraints: header max 12 chars, labels 1-5 words, mark defaults with (Recommended).
Purpose: Clarify config scope (models/permissions/rules), validate approach, and handle multiple valid options.
</question_tool>
<reference>| Type | Global | Project |
|------|--------|---------|
| Config | ~/.config/opencode/opencode.json | ./opencode.json |
| Rules | ~/.config/opencode/AGENTS.md | ./AGENTS.md |
Precedence: Project > Global. Configs are merged, not replaced.
</reference> <workflow>Batching: Use the question tool for 2+ related questions. Single questions → plain text.
Syntax: header ≤12 chars, label 1-5 words, add "(Recommended)" to default.
When to ask: Vague request ("configure opencode"), permission/security changes, or multiple valid options exist.
Ask the user what they want to configure:
Then guide them through the relevant section below.
</workflow><config_file>
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-20250514",
"theme": "opencode",
"autoupdate": true
}
| Option | Purpose | Example |
|--------|---------|---------|
| model | Default model | "anthropic/claude-sonnet-4-20250514" |
| small_model | Lightweight tasks | "anthropic/claude-3-5-haiku-20241022" |
| theme | UI theme | "opencode", "catppuccin", "dracula" |
| autoupdate | Auto-update OpenCode | true / false |
| share | Session sharing | "manual" / "auto" / "disabled" |
Control what requires approval using the permission field.
{
"permission": {
"edit": "allow", // "allow" | "ask" | "deny"
"bash": {
"npm *": "allow", // pattern matching
"git *": "allow",
"rm *": "ask",
"*": "ask" // default for this tool
},
"webfetch": "allow",
"skill": {
"*": "allow",
"dangerous-*": "deny"
}
}
}
Agents may occasionally work on legacy projects using outdated configuration fields (e.g., tools, maxSteps). You MUST correct these to the modern permission and steps fields when encountered.
Include additional instruction files:
{
"instructions": [
"CONTRIBUTING.md",
"docs/guidelines.md",
".cursor/rules/*.md"
]
}
Full schema reference: See references/config-schema.md
</config_file>
<rules_file>
Project instructions for all agents. Similar to CLAUDE.md or Cursor rules.
Run /init in OpenCode to auto-generate based on project analysis.
# Project Name
This is a [framework] project using [language].
## Project Structure
- `src/` - Source code
- `tests/` - Test files
## Code Standards
- Use TypeScript strict mode
- Prefer functional patterns
- Write tests for all features
## Commands
- `npm run build` - Build project
- `npm test` - Run tests
</rules_file>
<config_tips>
OpenCode supports JSONC (JSON with comments). SHOULD comment out unused configs instead of deleting:
{
"plugin": [
"opencode-openai-codex-auth@latest",
//"@tarquinen/opencode-dcp@latest", // disabled for now
//"@howaboua/[email protected]", // only for GLM-4.6
"@ramtinj95/opencode-tokenscope@latest"
]
}
Why: You might want to re-enable later. Keeps a record of what you've tried.
After editing opencode.json, you MUST run this validation (not just suggest it):
opencode run "test"
Execute it yourself using the Bash tool before telling the user the change is complete.
If broken, you'll see a clear error with line number:
Error: Config file at ~/.config/opencode/opencode.json is not valid JSON(C):
--- Errors ---
CommaExpected at line 464, column 5
Line 464: "explore": {
^
--- End ---
Common JSONC mistakes:
}</config_tips>
<common_configurations>
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-20250514",
"permission": {
"edit": "ask",
"bash": "ask"
}
}
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-20250514",
"autoupdate": true,
"permission": {
"edit": "allow",
"bash": {
"*": "allow",
"rm -rf *": "deny",
"sudo *": "ask"
}
},
"instructions": ["CONTRIBUTING.md"]
}
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-20250514",
"share": "auto",
"instructions": [
"docs/development.md",
"docs/api-guidelines.md"
]
}
</common_configurations>
<troubleshooting>| Issue | Solution |
|-------|----------|
| Config not loading | Check JSON syntax, ensure valid path |
| Skill not found | Verify SKILL.md (uppercase), check frontmatter |
| Permission denied unexpectedly | Check global vs project config precedence |
references/config-schema.md - Full config optionsdevelopment
Handle structured co-authoring of professional documentation. Use for proposals, technical specs, and RFCs. Use proactively when a collaborative drafting process (Gathering -> Refinement -> Testing) is needed. Examples: - user: "Draft a technical RFC for the new API" -> follow Stage 1 context gathering - user: "Refine the introduction of this proposal" -> use iterative surgical edits - user: "Test if this document is clear for readers" -> run reader testing workflow
development
Handle Word document (.docx) creation, editing, and analysis with high-fidelity visual review. Use for professional reports, legal documents, and tracked changes. Use proactively when quality and precise formatting are critical. Examples: - user: "Create a professional report in Word" -> use python-docx with render loops - user: "Draft a legal contract with redlines" -> use ooxml redlining workflow - user: "Extract text from this DOCX while preserving structure" -> use pandoc markdown conversion
testing
Apply professional visual themes to documents and presentations. Use for styling artifacts with consistent color palettes and font pairings. Use proactively to quickly improve the aesthetic quality of deliverables. Examples: - user: "Apply a modern theme to this deck" -> use Modern Minimalist theme - user: "I want a tech aesthetic for this doc" -> apply Tech Innovation theme - user: "Create a custom theme for my project" -> generate new color/font specification
tools
Guide for creating effective opencode skills. Use for creating or updating skills that extend agent capabilities with specialized knowledge, workflows, or tool integrations. Examples: - user: "Create a skill for git workflows" → define SKILL.md with instructions and examples - user: "Add examples to my skill" → follow the user: "query" → action pattern - user: "Update skill description" → use literal block scalar and trigger contexts - user: "Structure a complex skill" → organize with scripts/ and references/ directories - user: "Validate my skill" → check structure, frontmatter, and discovery triggers