agentleFS
juandelossantosjuandelossantos/another-agent-skills/skills/customize-opencode/SKILL.md

customize-opencode

Skill1 starsChanged 11 days agoMITView on GitHub

Edit or create OpenCode's own configuration. Use ONLY when configuring OpenCode itself. Do NOT use for the user's application code.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always create a backup before editing: cp opencode.json opencode.json.bak

    line 41
  2. Distinctive:

    Read the current config. Identify exactly what needs to change:

    line 47
  3. Distinctive:

    If multiple changes, do them one at a time.

    line 55
  4. Distinctive:

    Before restarting the agent:

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Customize OpenCode

Configure OpenCode itself — not your application.

Editing OpenCode's own config (opencode.json, .opencode/, ~/.config/opencode/) requires care — a mistake can break the agent's ability to function.

When to Use

  • Creating or editing opencode.json / opencode.jsonc
  • Adding, modifying, or removing MCP servers
  • Changing agent permission rules
  • Installing or disabling plugins
  • Editing skill paths or agent definitions

When NOT to Use

  • Your application code (use the appropriate platform skill)
  • Any project that is not configuring OpenCode itself

Output Contract

ArtifactFormatLocationQuality Criteria
Validated configJSONopencode.jsonJSON valid, permission rules safe, MCP URLs reachable

Always create a backup before editing: cp opencode.json opencode.json.bak

Core Process

Phase 1 — Assess

Read the current config. Identify exactly what needs to change:

Current: model: claude-sonnet-4 → Want: model: claude-sonnet-4-20250514
Change: one field in model
Risk: low — model string only

If multiple changes, do them one at a time. Verify after each.

Phase 2 — Edit

Make surgical edits. One change per operation:

WhatHowRisk
Model/providerEdit model or provider.<name>.optionsLow
MCP serverAdd/remove mcp.<name> blockMedium — verify URL/command
Permission ruleEdit permission.<tool>High — can lock out tools
PluginAdd/remove from plugin arrayLow — npm installs silently
Agent definitionEdit agent.<name>Low — only affects that agent

Danger zones (verify twice before committing):

  • API keys in provider.options or mcp.<name>.headers — use {env:VAR} substitution instead of plaintext
  • Permission rules with "deny" — ensure essential tools (read, bash, write) remain accessible
  • MCP server commands/URLs — a typo means the tool silently fails
  • "*": "deny" in permissions — locks everything. Always pair with explicit allows.

Phase 3 — Validate

Before restarting the agent:

☐ JSON is valid: python3 -c "import json; json.load(open('opencode.json'))"
☐ Permission rules don't deny essential tools (read, bash, write)
☐ MCP URLs are reachable (curl -I <url>)
☐ Backup exists: opencode.json.bak
☐ No plaintext API keys (all using {env:VAR} or {file:PATH})

Anti-Patterns

  1. Plaintext secrets — API keys in config instead of {env:VAR}. Exposed in logs and version control.
  2. Blind deny-all — "*": "deny" without explicit allows. Agent can't read files or run commands.
  3. Silent MCP removal — Removing an MCP server that other config sections depend on.
  4. Malformed JSON — Missing comma or trailing comma in opencode.json. Use --check flag.
  5. Wrong scope — Editing project opencode.json when intending to change global ~/.config/opencode/opencode.json.

Verification

  • Backup created before edit
  • JSON valid after edit
  • Permission rules allow essential tools (read, bash, write)
  • No plaintext API keys in committed config
  • MCP URLs/commands verified reachable
  • Only one config file changed (project or global, not both)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.