opencode-batch

Orchestrates parallel multi-module refactoring via git worktrees and opencode CLI subagents.

1|Updated Sep 11, 2026
One-click install
npx skills add https://github.com/lldwb/lldwb-claude-skills --skill opencode-batch-lldwb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-batch
Source: https://github.com/lldwb/lldwb-claude-skills/tree/main/skills/opencode-batch
Command: npx skills add https://github.com/lldwb/lldwb-claude-skills --skill opencode-batch-lldwb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Running the same opencode CLI transformation across many modules serially is slow and error-prone, and interruptions (EOF exits, hangs, build failures) are hard to diagnose. This Skill orchestrates isolated, parallel execution with pre-flight checks and structured failure handling. ## Core Features & Use Cases - Worktree-isolated parallel execution: Creates one git worktree, one branch, and one background subagent per module, each invoking opencode run --auto --command inside its own worktree. - Pre-flight gate: Verifies opencode CLI availability, .opencode tracked in git, test credentials, external dependency connectivity, module paths, and command definition completeness before dispatching. - Interruption handling: Identifies EOF exits, hangs, and build failures, terminates processes precisely by worktree path, and notifies the main session for unified retry or failure-set decisions. - Use Case: You need to apply the same opencode command (e.g., a test-generation or refactoring command) to 8 Maven modules. Provide the main branch, the command, and the module list; the Skill runs all modules in parallel worktrees, merges results back, and commits per module type. ## Quick Start Ask the agent to run a given opencode command across a list of modules in parallel, with each module in its own git worktree, then merge and commit the results.

Frequently Asked Questions about opencode-batch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run opencode CLI commands across multiple modules in parallel?

Provide three inputs: the main branch, the opencode command, and the module list. The Skill creates one git worktree and one background subagent per module, each running opencode run --auto --command inside its own worktree, then merges all branches back.

What is the difference between opencode-batch and module-batch?

Both share the one-module-one-worktree-one-subagent discipline, but opencode-batch subagents invoke the opencode CLI to execute predefined commands, while module-batch subagents modify code directly. Use opencode-batch when transformations are packaged as .opencode/commands definitions.

Why does opencode exit unexpectedly during batch runs?

The common root cause is a non-interactive EOF exit: opencode stops to ask a question but stdin is closed. This happens when the command definition lacks test commands, failure classification, and gate criteria, so the Skill requires completing these before dispatch.

What prerequisites must be checked before starting a batch run?

The Skill verifies opencode CLI availability, that .opencode is tracked by git, test credentials are decryptable, external dependencies are reachable, the main branch is clean, module paths exist, and command definitions include test commands and gate criteria.

How are failures handled when one module fails in the batch?

A single module failure does not affect others. The subagent reports the interruption to the main session, which retries up to two times; persistent failures are recorded as needing manual intervention, and the failure set is compared before and after to confirm no behavior regression.