OpenCode Config Checker (Free): Validate opencode.json, Agents and Commands

Find out why OpenCode is ignoring part of your config, before you lose an afternoon to it.

OpenCode Config Checker (Free): Validate opencode.json, Agents and Commands product illustration

What it does

Checks your OpenCode setup before OpenCode silently ignores part of it: opencode.json / opencode.jsonc, .opencode/agents/*.md and .opencode/commands/*.md, validated against OpenCode's published V2 config schema (bundled, works offline) plus the rules the schema can't see. Python 3.9+, standard library only.

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 5 tests OK on Python 3.13 and 3.10.

Real terminal output from OpenCode Config Checker: Validate opencode.json, Agents and Commands: demo and passing tests

Run it

python3 tools/opencode_check.py                      # the current project
python3 tools/opencode_check.py ~/.config/opencode   # your global config, agents and commands
python3 tools/opencode_check.py . --json --strict     # CI: JSON output, exit 1 on warnings too
./tools/demo.sh                                       # try it on the two examples

Exit code 1 on errors, so it fits a pre-commit hook or CI step.

What it catches

  • Schema errors with did-you-mean hints: unknown keys (permisions), bad values (effect: maybe), model strings without provider/, MCP entries without command/url.
  • Rules that never apply: V2 uses the last matching permission rule, so git push * deny followed by * allow never blocks a push.
  • V1 names that V2 never matches: bash, task, write, patch in a V2 permissions array.
  • V1 leftovers (still read, deprecated): permission, tools, agent, mode, command, provider, plugin, snapshot, autoupdate, small_model, flat mcp entries, skills {paths, urls}, old compaction keys; fields V2 ignores (logLevel, server, compaction.prune...).
  • Agent and command files: frontmatter that mixes V1 and V2 fields (OpenCode then ignores the V1 ones), system in frontmatter, subagents without a description, template / subtask / variant in command frontmatter, arguments inside !shell blocks, legacy agent/, mode/, command/, plugin/ folders, CLAUDE.md without AGENTS.md.
  • Secrets and safety: literal API keys and tokens (reported without echoing them), $VAR in MCP env/headers (not expanded; use {env:NAME}), plain-http remote MCP servers, shell allowed for everything with no exceptions, no external_directory rule (V2 reads and edits outside the project without asking by default).

Honest limits

  • Built from OpenCode's V2 docs and schema as of November 14, 2026 (schema/config.json, from https://opencode.ai/config.json). When OpenCode changes, pass a fresh copy with --schema.
  • The validator covers the JSON Schema features this schema uses; the frontmatter reader covers the YAML subset OpenCode files use.
  • Rule-order checks are conservative and only flag clear cases. Passing the checker does not make a setup secure: permissions are a guardrail, not a sandbox.
  • Not affiliated with or endorsed by OpenCode or its maintainers.

./run_tests.sh runs 5 tests (Python 3.13 and 3.10).

Format and license

Zip, 30 KB, v1.0, 19 files. Free to use, modify and share for any purpose, including commercial work, as long as this notice stays in copies. Not affiliated with or endorsed by OpenCode or its maintainers.

FAQ

Is it really free?
Yes. Download the zip, no account or API key needed.
Can I use it in CI?
Yes: --json for machine output and --strict to fail on warnings; it exits 1 on errors.
What's in the paid kit?
The OpenCode Config Kit adds 7 templates, 10 agents, 8 commands, an installer and the V1-to-V2 migrator.
How do I get the files?
Click Download free. The zip downloads straight away: no checkout, no account.
Do I have to sign up for the newsletter?
No. The form is optional and the download works without it.

Get OpenCode Config Checker (Free): Validate opencode.json, Agents and Commands

Free OpenCode checker: validate opencode.json(c), agents and commands against the V2 schema, find dead permission rules, V1 leftovers and secrets.

Pairs well with

Download$119

Agent Builder Bundle

Swarm Operator Kit + x402 Builder Skills + MCP Starter Kit. $119 instead of $157.

View Agent Builder Bundle
Download$89

Swarm Operator Kit

Run a team of AI agents as a business: charter, 5 roles, 6 skills, routines and scripts.

View Swarm Operator Kit

Related

1 email a week: new x402 + MCP tools and free kits.

Short weekly digest of new x402 + MCP tools and free kits, including the MCP OAuth Checker. The download above works without signing up. No spam, unsubscribe any time.