Skip to content
Development
Skill

/opencode-delegation

Delegates to OpenCode (opencode run). Use when delegation-core selects OpenCode or a provider-agnostic harness.

From plugin
claude-night-market
350200 skills60 agents162 commands1 MCP

Claude Code

$ npx -y skills add athola/claude-night-market --skill opencode-delegation --agent claude-code

SKILL.md

opencode-delegation.SKILL.md
name: opencode-delegation
description: Delegates to OpenCode (opencode run). Use when delegation-core selects OpenCode or a provider-agnostic harness.
alwaysApply: false
category: delegation-implementation
tags:
- opencode
- cli
- delegation
- provider-agnostic
dependencies:
- delegation-core
tools:
- opencode
- delegation_executor.py
usage_patterns:
- opencode-cli-integration
- provider-agnostic-routing
complexity: intermediate
estimated_tokens: 550
references:
- delegation-core/shared-shell-execution.md

OpenCode Delegation

Overview

OpenCode is an open-source, provider-agnostic terminal agent published as npm `opencode-ai`. Its scripting entry point is `opencode run`, which takes the prompt as positional arguments.

Being provider-agnostic makes it the most flexible entry in the registry: the model behind it is whatever the local OpenCode config selects, including a local one.

When To Use

  • `delegation-core` selected `opencode` for the task
  • A provider the registry does not model directly is wanted, and

OpenCode already has it configured

  • A local or self-hosted model should serve the request

When NOT To Use

  • No provider credentials are configured. `opencode auth list` shows

what is present

  • A specific model must be pinned from this side. Model choice belongs

to OpenCode's own config, not to the delegation call

Prerequisites

Installation

npm install -g opencode-ai@latest

Homebrew, pnpm, bun, scoop and chocolatey are also documented upstream.

Authentication

Credentials resolve per provider through environment variables such as `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`, through a `.env` file, or through `opencode auth login`. Stored credentials are written to `~/.local/share/opencode/auth.json`, and the config file supports `{env:VARIABLE_NAME}` interpolation.

Verification runs `opencode auth list`, because there is no single variable to check when the provider set is open-ended.

Quick Start

Using the shared delegation executor

uv run python scripts/delegation_executor.py opencode "Find the bug" \
  --files src/

Through the Makefile

make -C plugins/conjure delegate-opencode PROMPT='Find the bug'

Direct CLI usage

opencode run "Explain the use of context in this package"

Smart Delegation

`opencode` declares the `code_execution` strength and ranks last among the network providers in the candidate order, ahead only of the local `glimmer` service. It declares no model ids, since model choice belongs to OpenCode's own configuration.

OpenCode-Specific Details

| Property | Value | |----------|-------| | Binary | `opencode` | | Package | `opencode-ai` | | Headless form | `opencode run <prompt>` | | Prompt delivery | positional | | Version probe | `opencode --version` | | Auth probe | `opencode auth list` |

`opencode run --file <path>` attaches a file upstream, but this service inlines file context into the prompt instead, which keeps one delivery path across every provider that lacks an `@path` syntax.

`opencode serve` starts a headless HTTP server that `opencode run --attach <url>` can target, and it honors `OPENCODE_SERVER_PASSWORD`. That path is not modeled here: the registry spawns a process per delegation rather than holding a server.

An output-format flag is documented for the `session list`, `export` and `db` subcommands, but not confirmed for `run`, so none is declared.

Exit Criteria

  • [ ] `opencode` resolves on PATH and answers `opencode --version`
  • [ ] `opencode auth list` shows at least one configured provider
  • [ ] The built command is `opencode run <prompt>` with the prompt last

and no prompt flag before it

  • [ ] File context was inlined into the prompt rather than passed with

`--file`

  • [ ] Output saved to `delegations/opencode/YYYYMMDD_HHMMSS.md`
  • [ ] This skill ran because `delegation-core` selected `opencode`
Read more
@athola
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

350200 skills60 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
350
Star history of athola/claude-night-market on GitHub, a chart by star-history.com

Other skills on claude-night-market.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about opencode-delegation.

Which coding agents can use opencode-delegation?
opencode-delegation installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.