opencode-cli

Delegate multi-step repository work to OpenCode CLI with explicit context handoff.

5|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/amirkiarafiei/subagent-cli-skills --skill opencode-cli-amirkiarafiei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-cli
Source: https://github.com/amirkiarafiei/subagent-cli-skills/tree/main/skills/opencode-cli
Command: npx skills add https://github.com/amirkiarafiei/subagent-cli-skills --skill opencode-cli-amirkiarafiei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

OpenCode CLI helps you complete large, multi-step repository changes without overloading your primary agent’s context window, reducing cost and preventing context-split failures.

Core Features & Use Cases

  • Deep architectural change delegation: Use OpenCode for complex code generation, refactors, and broad transformations across many files.
  • CI and automation tasks: Run multi-step work via non-interactive execution suitable for GitHub Actions-style workflows.
  • Context handoff discipline: Ensure the subagent receives a comprehensive shared state (goal, decisions, scope, constraints, and verification commands) so isolated execution stays aligned with the main thread.

Quick Start

Ask your agent to use OpenCode CLI non-interactively to implement the refactor with explicit decisions, scoped file paths, required tests to run, and a minimal-diff output target.

Frequently Asked Questions about opencode-cli

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

FAQPage Schema
How do I delegate large refactoring tasks to a subagent without overloading my primary context window?

To delegate large refactors without context overload, you can hand off multi-step repository work to OpenCode CLI using a non-interactive run. This reduces main agent context usage and cost by isolating execution while keeping the primary thread aligned.

What is context handoff discipline for complex code generation across multiple files?

Context handoff discipline ensures a subagent receives comprehensive shared state for complex code generation, including the goal, prior decisions, scope, constraints, and verification commands. This keeps isolated execution aligned with the main thread.

How do I run non-interactive code generation and refactoring in CI automation workflows?

You can run non-interactive code generation and refactoring in CI automation by executing OpenCode CLI with model selection and JSON formatting. This allows multi-step work to run in GitHub Actions-style workflows without manual intervention.

Does OpenCode CLI require specific parameters for broad architectural changes spanning multiple phases?

Yes, broad architectural changes require an explicit context handoff for non-interactive runs. You must provide model selection, JSON formatting, goal, prior decisions, scope, constraints, verification, and expected output to ensure proper execution.

When should I avoid delegating repository changes to an isolated subagent?

You should avoid delegating repository changes to an isolated subagent when the work cannot be clearly defined by an explicit context handoff. Without providing specific goals, scope, constraints, and verification commands, isolated execution may fail to stay aligned.

What's the best way to reduce agent context cost during deep architectural refactoring?

The best way to reduce context cost during deep architectural refactoring is delegating the multi-file work to OpenCode CLI. This offloads the processing from your primary agent, minimizing context window usage and associated expenses.