# Invoke Opencode Acp

> Delegate complex tasks to OpenCode subagent, use when >=2 file modifications or batch operations

- **Type:** Skill
- **Install:** `agentstack add skill-phonowell-invoke-opencode-acp-invoke-opencode-acp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [phonowell](https://agentstack.voostack.com/s/phonowell)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [phonowell](https://github.com/phonowell)
- **Source:** https://github.com/phonowell/invoke-opencode-acp/tree/main/skills/invoke-opencode-acp

## Install

```sh
agentstack add skill-phonowell-invoke-opencode-acp-invoke-opencode-acp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# invoke-opencode-acp

## When to Use
- Triggers: >=2 file modifications / refactor / batch ops / code review / multi-step reasoning / git ops
- Avoid: single-file quick edits / recursive OpenCode calls

## Core Intent
- Save tokens (50-90%) / main model decides / subagent executes details

## Efficiency Priority
- `acp_client.cjs` (this dir) > manual protocol
- `opencode acp` > run/serve (avoid HTTP)

## Constraints
- Default sandbox blocks writes to `~/.config/opencode` and `~/.cache/opencode` and blocks network
- First run plugin install ~30s; `acp_client.cjs` default `SESSION_TIMEOUT=10s`
- Fix: run `acp_client.cjs` outside sandbox to allow `~` writes and network; or install once then retry; or raise `SESSION_TIMEOUT` > 30s
- Evidence: `~/.local/share/opencode/log/*.log` records bun add/install and duration

## Workflow
1. Pick timeout: simple >=180s / medium >=600s / complex >=1800s
2. If first run or PermissionDenied/Timeout(10000ms) -> retry non-sandbox or install then retry
3. Run:
```bash
node ~/.claude/skills/invoke-opencode-acp/acp_client.cjs "$PWD" "task description" -o /tmp/output.txt -t 300
```
4. Listen `session/update` -> drop `` -> `result.stopReason === 'end_turn'`
5. Return: OK / Timeout:{reason} / Error:{reason}

## Protocol Notes
- `initialize` -> `session/new`(cwd,mcpServers:[]) -> `session/prompt`(prompt:[] shape)
- Error codes: -32001 not found / -32002 rejected / -32003 state / -32601 method / -32602 params

## Dependencies
- Node.js
- OpenCode CLI: `npm install -g opencode`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [phonowell](https://github.com/phonowell)
- **Source:** [phonowell/invoke-opencode-acp](https://github.com/phonowell/invoke-opencode-acp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-phonowell-invoke-opencode-acp-invoke-opencode-acp
- Seller: https://agentstack.voostack.com/s/phonowell
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
