Skip to content

Agent Configuration for Each Platform

In this post I'm going to discuss project and user agents for each of the platforms as well as native and third party applications that allows remote access to you agents.

OpenCode

Docs Link: https://opencode.ai/docs/config/

Config Location

Global Config: ~/.config/opencode/opencode.json Project Config: opencode.json in project.

Configs are merge with the project config overwriting any

Providers and Models

These are configured through the cli. Credentials are stored a ~/.local/share/opencode/auth.json (https://opencode.ai/docs/providers/#credentials) and the the models are stored in the database ~/.local/share/opencode/auth.json.

Model settings can be globally configured (https://opencode.ai/docs/models/#configure-models)

Agent Config

Global: ~/.config/opencode/agents/ Per-project: .opencode/agents/

---
description: Reviews code for quality and best practices
mode: subagent
model: anthropic/claude-sonnet-4-20250514
---

You are in code review mode. Focus on:

- Code quality and best practices
- Potential bugs and edge cases
- Performance implications
- Security considerations

Provide constructive feedback without making direct changes.

I prefer the markdown files, but they can also be configured in json. You can see the models you've configured with

Primary vs subagent

Opencode uses this distinction. Primary are agents you talk directly with and they can spawn sub-agents. You can create custom sub-agents with with configs as well and the primary agents can orchestrate these agents.

opencode models

MCP Config

MCP goes inside the opencode.json file.

Example

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "playwright": {
      "type": "local",
      "command": [
        "npx",
        "@playwright/mcp@latest"
      ],
      "enabled": true
    }
  }
}

Skills

Locations

Project config: .opencode/skills/<name>/SKILL.md
Global config: ~/.config/opencode/skills/<name>/SKILL.md
Project Claude-compatible: .claude/skills/<name>/SKILL.md
Global Claude-compatible: ~/.claude/skills/<name>/SKILL.md
Project agent-compatible: .agents/skills/<name>/SKILL.md
Global agent-compatible: ~/.agents/skills/<name>/SKILL.md

Instructions

There is no default instructions file. You must define it in opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "instructions": ["CONTRIBUTING.md", "docs/guidelines.md", ".cursor/rules/*.md"]
}

Remote

Excellent remote control using serve. Tie into existing sessions and create new sessions with the ability to select a project directory.

opencode serve [--port <number>] [--hostname <string>] [--cors <origin>]

Create a service that lets you simply run this in the background

Define the service at ~/.config/systmd/user/opencode-server.service

[Unit]
Description=OpenCode Server
After=network.target
Documentation=https://opencode.dev

[Service]
Type=simple
WorkingDirectory=/home/thomas/.openclaw/workspace-senior/
ExecStart=/home/thomas/.opencode/bin/opencode serve --hostname 0.0.0.0 --port 4096 --cors http://localhost:4090 --cors https://opencode.thomaswildetech.com
Environment="OPENCODE_SERVER_PASSWORD=thomaswildetech"
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal

[Install]
WantedBy=default.target

There are also two quite good Android apps, OpenCode Remote and OC Remote that tie into the server. I find OC Remote better for general usage and find it good for receiving notifications when a task is complete. OpenCode Remote allows you to look into subagent tasks though which is nice.

Claude

Docs: https://code.claude.com/docs/en/overview

For external access: https://github.com/chenhg5/cc-connect To use an OpenCode Go subscription: https://github.com/samueltuyizere/oc-go-cc

Models

You can specify Anthropic compatible model replacements for Oppus, Sonnet, and Haiku in the ~/.claude/settings.json, or just use oc-go-cc which will dynamically select OpenCode Go models.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "<api-key>",
    "API_TIMEOUT_MS": "3000000",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "ANTHROPIC_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_SMALL_FAST_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M2.7",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M2.7",
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  },
  "skipDangerousModePermissionPrompt": true
}

Instructions

Project instructions are in a CLAUDE.md file.

Agents

Agent configs in Claude are just subagents by default. Your main agent can orchestrate with these, but if you were to select one of the subagents, it cannot orchestrate other agents, it can only just "act" as other agents.

Global: ~/.claude/agents/${name}.md Project: ./claude/agents/${name}.md

Claude has a unique feature called Agent Teams (https://code.claude.com/docs/en/agent-teams) where subagents will actually communicate with each other rather than an orchestrator working as the mediator.

Skills

Global: ~/.claude/skills/${name}.md Project: ./claude/skills/${name}.md

MCP Servers

MCP servers are configured

Global ~/.claude.json Project .mcp.json

"mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ],
      "env": {}
    }
  },

Note that many MCP servers can easily be add using the cli (https://code.claude.com/docs/en/mcp#popular-mcp-servers).

Qwen

Instructions

Project instructions go in qwen.md. These can be create using /init in the cli.

Models

Models, MCP, and Channels (i.e. Telegram) are configued in ~/.qwen/settings.json

settings.json
settings.json
{
  "env": {
    "OPENAI_API_KEY": "<default-api-key-for-cli-to-work>",
    "OPENAI_BASE_URL": "https://api.minimax.io/v1",
    "OPENAI_MODEL": "MiniMax-M2.7 (default model to use)",
    "OPENROUTER_API_KEY": "<api-key>",
    "MINIMAX_API_KEY": "<api-key>"
  },
  "modelProviders": {
    "openai": [
      {
        "id": "qwen/qwen3.6-plus",
        "name": "Qwen 3.6 Plus",
        "envKey": "OPENROUTER_API_KEY",
        "baseUrl": "https://openrouter.ai/api/v1",
        "generationConfig": {
          "timeout": 120000,
          "maxRetries": 3,
          "samplingParams": {
            "temperature": 0.7
          }
        }
      },
      {
        "id": "qwen/qwen3-coder-next",
        "name": "Qwen 3 Coder Next",
        "envKey": "OPENROUTER_API_KEY",
        "baseUrl": "https://openrouter.ai/api/v1",
        "generationConfig": {
          "timeout": 120000,
          "maxRetries": 3,
          "samplingParams": {
            "temperature": 0.7
          }
        }
      },
      {
        "id": "qwen/qwen3.5-flash-02-23",
        "name": "Qwen 3.5 Flash 02-23",
        "envKey": "OPENROUTER_API_KEY",
        "baseUrl": "https://openrouter.ai/api/v1",
        "generationConfig": {
          "timeout": 120000,
          "maxRetries": 3,
          "samplingParams": {
            "temperature": 0.7
          }
        }
      },
      {
        "id": "MiniMax-M2.7",
        "name": "Minimax M2.7",
        "envKey": "MINIMAX_API_KEY",
        "baseUrl": "https://api.minimax.io/v1",
        "generationConfig": {
          "timeout": 120000,
          "maxRetries": 3,
          "samplingParams": {
            "temperature": 0.7
          }
        }
      },
      {
        "id": "moonshotai/kimi-k2.6",
        "name": "Kimi K2.6",
        "envKey": "OPENROUTER_API_KEY",
        "baseUrl": "https://openrouter.ai/api/v1",
        "generationConfig": {
          "timeout": 120000,
          "maxRetries": 3,
          "samplingParams": {
            "temperature": 0.7
          }
        }
      },
      {
        "id": "google/gemma-4-31b-it:free",
        "name": "Qwen 3.5 Flash 02-23",
        "envKey": "OPENROUTER_API_KEY",
        "baseUrl": "https://openrouter.ai/api/v1",
        "generationConfig": {
          "timeout": 120000,
          "maxRetries": 3,
          "samplingParams": {
            "temperature": 0.7
          }
        }
      }
    ]
  },
  "$version": 3,
  "ide": {
    "enabled": true,
    "hasSeenNudge": true
  },
  "model": {
    "name": "MiniMax-M2.7"
  },
  "security": {
    "auth": {
      "selectedType": "openai"
    }
  },
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  },
  "channels": {
    "my-project-telegram": {
      "type": "telegram",
      "token": "$TELEGRAM_BOT_TOKEN",
      "senderPolicy": "allowlist",
      "allowedUsers": ["your-telegram-id"],
      "sessionScope": "user",
      "cwd": "/home/thomas/projects/project-name",
      "instructions": "Act as the orchestrator agent",
      "groupPolicy": "disabled",
      "groups": {
        "*": { "requireMention": true }
      },
      "dispatchMode": "steer",
      "blockStreaming": "on",
      "blockStreamingChunk": { "minChars": 400, "maxChars": 1000 },
      "blockStreamingCoalesce": { "idleMs": 1500 }
    }
  },
  "permissions": {
    "defaultMode": "yolo",
    "confirmShellCommands": false,
    "confirmFileEdits": false
  }
}

Agents

Similar to Claude, all custom agents are subagents.

Global: ~/.qwen/agents/ Project: .qwen/agents/

Skills

Global: ~/.qwen/skills/${name}.md Project: ./qwen/skills/${name}.md

Github Copilot

Comments