OpenCode-CLI-Controller
A powerful skill to control Open Code CLI via a local web server API. Allows executing commands, managing sessions, and automating code generation remotely in the local network.
Why use this skill?
Master your OpenCode workflows with the OpenCode-CLI-Controller. Expertly orchestrate sessions, monitor progress, and manage code generation via local API.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/malek262/opencode-api-control-skillWhat This Skill Does
The OpenCode-CLI-Controller is a sophisticated integration layer that transforms your OpenClaw agent into an expert-level Orchestrator for the OpenCode CLI. Instead of manually interacting with file systems or attempting to write code directly, this skill allows the agent to communicate with a running local web server API. It acts as the bridge between the user's intent and the execution power of the OpenCode engine. By adhering to a strict separation of duties—where the agent manages the workflow, session tracking, and reporting while OpenCode handles actual file I/O and implementation—this skill ensures that software development tasks are handled in a structured, observable, and efficient manner.
Installation
To install this skill, use the ClawHub command within your terminal or agent interface:
clawhub install openclaw/skills/skills/malek262/opencode-api-control-skill
Ensure that you have the required prerequisites met before execution. Specifically, verify that a config.json file is present in your root directory containing the base_url for your API and the projects_base_dir. You must also have the ./scripts/ directory populated, as these scripts are the primary mechanisms used to interface with the local server.
Use Cases
- Automated Project Scaffolding: Initiate large-scale project generation by sending high-level architecture requirements to the OpenCode API.
- Continuous Integration Monitoring: Use the skill to track active development sessions, ensuring that code changes are applied and verified without manual intervention.
- Quality Control: Leverage the
get_diff.shscript integration to review changes proposed by OpenCode agents before final approval. - Multi-Session Management: Orchestrate multiple development tasks concurrently, monitoring each session's status via the provided API endpoints.
Example Prompts
- "OpenCode-CLI-Controller, please initialize a new project session for a React-based dashboard and track its progress until completion."
- "Check the current status of the active OpenCode session and provide a summary of the latest file diffs."
- "Start the OpenCode server, wait for initialization, and then initiate an auto-debug sequence for the current repository."
Tips & Limitations
- Initialization Latency: Always respect the 10-15 second buffer period after starting the server. Sending requests too early will result in connection errors.
- Orchestrator Mentality: Do not attempt to fix code manually. If a task fails, use the controller to query the logs and communicate the error back to the OpenCode engine.
- Operational Boundaries: You are prohibited from direct file manipulation. Always route your operations through the provided API scripts to maintain consistency with the OpenCode environment.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-malek262-opencode-api-control-skill": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: network-access, file-write, code-execution
Related Skills
Claude Code CLI for OpenClaw
Install, authenticate, and use Claude Code CLI as a native coding tool for any OpenClaw agent system.
social-vault
社交平台账号凭证管理器。提供登录态获取、AES-256-GCM 加密存储、定时健康监测和自动续期。Use when managing social media account credentials, importing cookies, checking login status, or automating session refresh. Also covers platform adapter creation and browser fingerprint management.
daily-report-generator
Automatically generate daily/weekly work reports from git commits, calendar events, and task lists. Use when you need to quickly create professional work reports without manual effort.
onlyclaw-social-commerce
在只来龙虾平台以龙虾身份自动发帖带货、读取帖子、检索帖子、点赞评论,支持关联商品/店铺/Skill、封面与视频(先上传再发帖),实现 AI Agent 24h 社交电商自动运营
mia-twitter-stealth
Twitter/X automation with advanced stealth and anti-detection