Skip to main content

omega-opencode-cli

Use when the user wants to use OpenCode (opencode CLI) for analysis, codebases, or brainstorming from another agent. Uses headless `opencode run` scripts (no MCP). Triggers on "use OpenCode", "ask OpenCode", "analyze with OpenCode", "brainstorm with OpenCode".

معلومات المصدر

المستودع
oimiragieo/omega-opencode-cli
آخر نشاط في المصدر
١٣ أغسطس ٢٠٢٦ في ٢٣:٤٦
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٠
التفرعات
٠

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

مستكشف الملفات
15 ملفات

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
omega-opencode-cli
description
Use when the user wants to use OpenCode (opencode CLI) for analysis, codebases, or brainstorming from another agent. Uses headless `opencode run` scripts (no MCP). Triggers on "use OpenCode", "ask OpenCode", "analyze with OpenCode", "brainstorm with OpenCode".
allowed-tools
Read, Grep, Bash
# Omega OpenCode CLI (headless) This skill uses the **OpenCode CLI in non-interactive mode** (`opencode run`) so other agents (Claude Code, Cursor, Codex, Copilot, etc.) can run OpenCode from scripts—no MCP server required. ## Overview Run OpenCode via [scripts/ask-opencode.mjs](./scripts/ask-opencode.mjs). It invokes `opencode run "…" [--model provider/model] [--format json] [--auto]` and returns the response. Requires **Node.js** and the **OpenCode CLI**. For one-time setup, run **/omega-opencode-setup**. See [references/installation.md](references/installation.md) and [references/auth.md](references/auth.md). ## First-time setup Run **/omega-opencode-setup** or: ```bash node .claude/skills/omega-opencode-cli/scripts/verify-setup.mjs ``` ## How to run OpenCode (headless) From the project root (where `.claude` lives): ```bash node .claude/skills/omega-opencode-cli/scripts/ask-opencode.mjs "USER_PROMPT" ``` Options: - `--model MODEL` / `-m` — `provider/model` (optional `#variant`), e.g. `anthropic/claude-sonnet-5`, `opencode/gpt-5.5`, `openai/gpt-5.2#high`. List with `opencode models`. - `--json` — maps to `--format json`; script prints extracted assistant text from JSON events. - `--auto` / `--sandbox` — maps to `opencode run --auto` (auto-approve permissions that are not denied). Prefer for CI. - `--agent NAME` — OpenCode agent to use. - `--attach URL` — attach to a running `opencode serve` instance (e.g. `http://localhost:4096`). - `--timeout-ms N` — wrapper timeout; exit `124` on expiry. Examples: ```bash node .claude/skills/omega-opencode-cli/scripts/ask-opencode.mjs "Review @src/main.js for bugs" node .claude/skills/omega-opencode-cli/scripts/ask-opencode.mjs "Summarize this" --model anthropic/claude-sonnet-5 echo "Explain recursion" | node .claude/skills/omega-opencode-cli/scripts/ask-opencode.mjs ``` ## Slash commands - **/analyze** — headless analysis - **/omega-opencode** — flexible analysis/brainstorm entry - **/omega-opencode-setup** — verify Node + OpenCode CLI ## Auth [references/auth.md](auth.md) — `opencode auth login`, `/connect`, API keys, Zen/Go. ## Failure handling Do not fabricate OpenCode output. Return the real error and point at verify-setup / auth docs. ## Copy and run Copy the entire `.claude` folder into the target project. Details: [references/copy-and-run.md](references/copy-and-run.md).
عرض على GitHub