Claude Code Plugins

Community-maintained marketplace

Feedback

moai-tool-opencode

@modu-ai/moai-adk
461
0

OpenCode.ai open-source AI coding agent comprehensive reference. Use when working with OpenCode TUI, CLI, IDE integration, configuring agents, tools, MCP servers, creating plugins, or developing with the SDK.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name moai-tool-opencode
description OpenCode.ai open-source AI coding agent comprehensive reference. Use when working with OpenCode TUI, CLI, IDE integration, configuring agents, tools, MCP servers, creating plugins, or developing with the SDK.
version 2.0.0
user-invocable false
status active
updated Thu Jan 08 2026 00:00:00 GMT+0000 (Coordinated Universal Time)
allowed-tools Read, Grep, Glob, WebFetch, Bash

OpenCode.ai Tool Skill

Comprehensive reference for OpenCode.ai - an open-source AI coding agent available as terminal interface, desktop application, and IDE extension.

Quick Reference

Installation:

curl -fsSL https://opencode.ai/install | bash
# or
npm install -g opencode

Start OpenCode:

opencode              # Launch TUI in current directory
opencode /path/to/dir # Launch in specific directory
opencode run "prompt" # Non-interactive mode
opencode serve        # Start headless server

Essential Commands:

  • /connect - Configure API keys
  • /init - Generate AGENTS.md
  • /models - List available models
  • /share - Share session
  • /undo - Undo changes
  • Tab - Switch agents
  • Ctrl+P - Command palette

Configuration Files:

  • ~/.config/opencode/opencode.json - Global config
  • ./opencode.json - Project config
  • AGENTS.md - Project instructions
  • .opencode/agent/ - Custom agents
  • .opencode/skill/ - Agent skills
  • .opencode/tool/ - Custom tools
  • .opencode/command/ - Custom commands

Documentation Index

This skill contains 32 comprehensive documentation modules organized by category.

Core (7 modules)

Usage (7 modules)

  • TUI - Terminal interface reference
  • CLI - Command-line interface
  • IDE - VS Code/Cursor integration
  • Zen - Curated model gateway
  • Share - Session sharing
  • GitHub - GitHub Actions integration
  • GitLab - GitLab CI/CD integration

Configuration (14 modules)

Development (4 modules)

See index.md for complete navigation.


Key Concepts

Agent Architecture

Primary Agents - Main assistants you interact with directly:

  • Build: Full tools enabled (default)
  • Plan: Restricted, analysis-focused

Subagents - Specialized assistants invoked by primary agents:

  • General: Research and multi-step tasks
  • Explore: Fast codebase exploration

Configuration Hierarchy

  1. Command-line flags (highest priority)
  2. Environment variables
  3. Project config (./opencode.json)
  4. Global config (~/.config/opencode/opencode.json)
  5. Built-in defaults

Tool Permission Levels

Level Description
allow Auto-approve execution
ask Request user approval
deny Block execution

Common Patterns

Basic Configuration

{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4",
  "agent": {
    "security": {
      "description": "Security auditor",
      "permission": { "edit": "deny" }
    }
  }
}

Custom Command

---
description: Review current changes
agent: plan
---
Review the following changes:
!`git diff --staged`

MCP Server Setup

{
  "mcp": {
    "github": {
      "type": "local",
      "command": ["npx", "-y", "@modelcontextprotocol/server-github"],
      "environment": { "GITHUB_TOKEN": "{env:GITHUB_TOKEN}" }
    }
  }
}

Custom Tool

import { tool } from "@opencode-ai/plugin"

export default tool({
  description: "Query project database",
  args: {
    query: tool.schema.string().describe("SQL query")
  },
  async execute(args) {
    return `Executed: ${args.query}`
  }
})

Resources

Storage Locations:

  • Config: ~/.config/opencode/
  • Data: ~/.local/share/opencode/
  • Cache: ~/.cache/opencode/
  • Logs: ~/.local/share/opencode/log/

Works Well With

  • moai-lang-typescript - TypeScript development patterns
  • moai-lang-python - Python development patterns
  • moai-domain-backend - Backend API development
  • moai-domain-frontend - Frontend development
  • moai-workflow-testing - Testing workflows