Loading...
Loading...
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 skill4agent add igorwarzocha/opencode-workflows opencode-config(Recommended)| Type | Global | Project |
|---|---|---|
| Config | | |
| Rules | | |
questionheaderlabel{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-4-20250514",
"theme": "opencode",
"autoupdate": true
}| Option | Purpose | Example |
|---|---|---|
| Default model | |
| Lightweight tasks | |
| UI theme | |
| Auto-update OpenCode | |
| Session sharing | |
permission{
"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"
}
}
}toolsmaxStepspermissionsteps{
"instructions": [
"CONTRIBUTING.md",
"docs/guidelines.md",
".cursor/rules/*.md"
]
}references/config-schema.md/init# 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{
"plugin": [
"opencode-openai-codex-auth@latest",
//"@tarquinen/opencode-dcp@latest", // disabled for now
//"@howaboua/pickle-thinker@0.4.0", // only for GLM-4.6
"@ramtinj95/opencode-tokenscope@latest"
]
}opencode run "test"Error: Config file at ~/.config/opencode/opencode.json is not valid JSON(C):
--- Errors ---
CommaExpected at line 464, column 5
Line 464: "explore": {
^
--- End ---}{
"$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"
]
}| Issue | Solution |
|---|---|
| Config not loading | Check JSON syntax, ensure valid path |
| Skill not found | Verify |
| Permission denied unexpectedly | Check global vs project config precedence |
references/config-schema.md