LaunchKit · 2026
Back to Skills

opencode-api-control-skill

A powerful skill to control Open Code CLI via a local web server API.

2
442 downloads
by @malek262

Setup & Installation

openclaw skills install @malek262/opencode-api-control-skill

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install opencode-api-control-skill

Version History

v1.1.0Feb 17, 2026 - Version note by skill developer:

- Added a new script: scripts/start_server.sh for initializing the OpenCode server in a robust/backgrounded way. - Updated documentation and workflow to recommend starting the server via start_server.sh for improved reliability. - Clarified and streamlined server initialization/health-check instructions. - Added a task initiation protocol, prompting for provider and monitoring choices before starting tasks. - Improved config and metadata structure (updated author, required binaries). - Minor clarifications and best practices for workflow and monitoring.

What This Skill Does

Controls the OpenCode CLI through its local HTTP API using a set of shell scripts. Acts as an orchestrator that sends coding tasks to OpenCode, manages sessions and providers, and monitors progress without reading or modifying generated files directly. State is persisted locally so workflows can resume across runs.

Keeps orchestration separate from execution so the agent never interrupts OpenCode mid-task by poking at files, reducing errors from partial reads or conflicting writes.

When to use it

  • Delegating a new React app build to OpenCode and tracking its progress
  • Switching between AI providers (Anthropic, Gemini) for different coding tasks
  • Running multi-phase dev workflows: plan with one session, implement in another
  • Resuming a paused coding session by loading saved project state
  • Monitoring long-running code generation with real-time event streaming

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Create a React dashboard app using Claude Sonnet

AGENT
  1. 1Run update_providers.sh to refresh the connected providers cache
  2. 2Run select_provider.sh with 'claude' and 'sonnet' to get provider and model IDs
  3. 3Create the project directory and a new session with create_session.sh
  4. 4Send the task via send_message.sh using the selected provider and model
  5. 5Run monitor_session.sh to stream progress, then get_diff.sh to summarize changes
OUTPUT

Diff summary listing added files such as src/App.tsx (+120/-0) and src/components/Dashboard.tsx (+89/-0), reported to the user without reading file contents

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

OpenCode CLI installed and server running on port 4099