Back to list
zellycloud

moai-tool-opencode

by zellycloud

OpenSpec Kanban Dashboard - Visual task management for OpenSpec projects

0🍴 0📅 Jan 25, 2026

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: 2026-01-08 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

LevelDescription
allowAuto-approve execution
askRequest user approval
denyBlock 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

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon