CtrlK
BlogDocsLog inGet started
Tessl Logo

pantheon-ai/opencode-toolkit

Complete toolkit for configuring and extending OpenCode: agent creation, custom slash commands, configuration management, plugin development, and SDK usage.

98

Quality

98%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

opencode-config.mddesign-agents/references/

OpenCode Agent Configuration Reference

file_locations

Agent definitions are markdown files in:

  • .opencode/agents/<name>.md (project)
  • ~/.config/opencode/agents/<name>.md (global)

frontmatter_schema

---
# Core Configuration
model: "provider/model-id"           # Model override
temperature: 0.7                     # Sampling temperature
top_p: 0.9                           # Nucleus sampling
prompt: "Custom system prompt"       # Or use markdown body
description: "Agent description"     # Shown in listings, triggers agent
mode: "subagent" | "primary" | "all" # Agent availability
color: "#FF5733"                     # UI color
maxSteps: 25                         # Max tool call steps
disable: false                       # Disable agent

# Tool Access Control
tools:
  edit: true
  write: true
  bash: true
  read: true
  glob: true
  grep: true
  webfetch: true
  task: true
  skill: true

# Permissions
permission:
  edit: "ask" | "allow" | "deny"
  bash:
    "*": "allow"
    "git *": "deny"
  skill:
    "*": "allow"
    "my-skill": "deny"
  webfetch: "ask" | "allow" | "deny"
  doom_loop: "ask" | "allow" | "deny"
  external_directory: "ask" | "allow" | "deny"
---

agent_modes

ModeDescription
primaryUser-selectable, can be default, spawns subagents
subagentOnly callable via task tool by other agents
allBoth primary and subagent (default)

permissions

Permission Values

ValueBehavior
"allow"Automatically permit
"ask"Prompt user for approval
"deny"Automatically reject

Permission Categories

edit

Controls edit and write tools.

bash

Controls command execution. Supports wildcard patterns:

bash:
  "*": "ask"              # Ask for everything by default
  "git *": "allow"        # Allow all git commands
  "npm *": "allow"        # Allow npm commands
  "rm *": "deny"          # Block deletion

skill

Controls skill access:

skill:
  "*": "deny"             # Deny all by default
  "my-skill": "allow"     # Allow specific skill

webfetch

Controls web fetching. "ask" prompts for each URL.

doom_loop

Controls doom loop detection (agent stuck in repetitive patterns).

external_directory

Controls access to files outside working directory. Affects:

  • bash commands referencing external paths
  • read/edit/write for external files

Default Permissions

If not specified, agents inherit from global config:

permission:
  edit: "allow"
  bash: { "*": "allow" }
  skill: { "*": "allow" }
  webfetch: "allow"
  doom_loop: "ask"
  external_directory: "ask"

available_tools

File Operations

ToolPurposeKey Parameters
readRead file contentsfilePath, offset, limit
editString replacement in filesfilePath, oldString, newString, replaceAll
writeCreate/overwrite filesfilePath, content

Search & Navigation

ToolPurposeKey Parameters
globFind files by patternpattern, path
grepSearch file contents (regex)pattern, path, include
listList directory contentspath

Command Execution

ToolPurposeKey Parameters
bashExecute shell commandscommand, timeout, workdir, description

Default timeout: 120000ms. Permissions: bash, external_directory.

Web & External

ToolPurposeKey Parameters
webfetchFetch web contenturl, format (text/markdown/html), timeout
websearchWeb search via Exa AIquery, numResults
codesearchCode/SDK documentation searchquery, tokensNum

Task Management

ToolPurposeKey Parameters
taskLaunch subagentsdescription, prompt, subagent_type, session_id
todowriteUpdate todo listtodos array
todoreadRead todo list(none)

Other Tools

ToolPurposeNotes
skillLoad skill instructionsParameter: name
batchParallel tool executionExperimental: config.experimental.batch_tool
lspLanguage Server ProtocolExperimental: OPENCODE_EXPERIMENTAL_LSP_TOOL

tool_access_control

Disable specific tools for an agent:

tools:
  bash: false      # No shell access
  webfetch: false  # No web access
  task: false      # Cannot spawn subagents

All tools inherit from global config.tools by default.

examples

Restricted Code Review Agent (Primary)

---
description: Safe code reviewer.
mode: primary
permission:
  edit: "ask"
  bash: "deny"
  external_directory: "deny"
---
You are a code review specialist...

Research Agent (Subagent)

---
description: |-
  Web research agent. Use when user says "research topic", "find info".
  
  Examples:
  - user: "research" -> search web
mode: subagent
permission:
  skill:
    "*": "deny"
    "web-research": "allow"
---
You are a research specialist...

Deployment Agent (Standard/Undefined)

---
description: Deployment helper.
permission:
  skill:
    "*": "deny"
    "deploy-checklist": "allow"
---
You are a deployment specialist...

design-agents

tile.json