opencode-acp-control
Control OpenCode directly via the Agent Client Protocol (ACP). Start sessions, send prompts, resume conversations, and manage OpenCode updates.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/berriosb/opencode-acp-control-3What This Skill Does
The opencode-acp-control skill provides an interface for OpenClaw agents to interact directly with OpenCode via the Agent Client Protocol (ACP). This skill essentially bridges the gap between the agent's intent and the development environment. By utilizing this skill, an agent can initiate a persistent connection with OpenCode, manage active workspaces, send complex prompts to the editor's internal intelligence, and receive real-time updates. It automates the lifecycle of a coding session, from initializing the process in the background to handling JSON-RPC message exchange. This allows for seamless programmatic control over coding tasks, debugging, and project analysis without requiring manual user intervention in the editor's interface.
Installation
To integrate this capability into your agent workflow, use the standard clawhub command:
clawhub install openclaw/skills/skills/berriosb/opencode-acp-control-3
Once installed, ensure your agent has appropriate filesystem permissions to access the directories where you intend to launch OpenCode instances.
Use Cases
- Automated Refactoring: Direct OpenCode to analyze large codebases and apply architectural changes across multiple files automatically.
- Continuous Integration Assistance: Trigger OpenCode sessions to inspect code in response to failing build logs or testing errors.
- Proactive Documentation: Use the agent to keep README files or API documentation in sync with current code structure by having the agent periodically prompt OpenCode to analyze the latest implementation.
- Remote Pair Programming: Enable an agent to act as a secondary pair programmer that can manage session persistence, allowing for long-running analysis tasks that continue even if the user interface is minimized.
Example Prompts
- "Launch an OpenCode session in the current directory and ask it to review the latest commit for potential security vulnerabilities."
- "List my active OpenCode sessions and resume the session named 'backend-refactor' to continue working on the authentication module."
- "Start a new session for this repository and refactor the main entry point to use async/await patterns."
Tips & Limitations
- Polling Overhead: Because this skill relies on
process.poll, ensure your agent does not poll too aggressively; a 2-second interval is the recommended standard to maintain responsiveness without saturating system resources. - Message IDs: Always maintain a monotonic counter for your JSON-RPC IDs to ensure responses can be matched to requests correctly.
- Session Management: Always explicitly kill the session using
process.killwhen finished to prevent orphaned background processes from consuming memory. - Connectivity: This skill requires direct access to the local machine's terminal; it is not designed for environments where process management is restricted.
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-berriosb-opencode-acp-control-3": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution