Session-scoped /goal workflow for OpenCode with fail-closed persistence and an independent completion verifier. Maintenance mode: OpenCode 2.2.1+ ships a built-in /goal.
# Add to your Claude Code skills
git clone https://github.com/william-ricchiuti/OpenCode-goal-pluginGuides for using ai agents skills like OpenCode-goal-plugin.
Last scanned: 9/17/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-09-17T09:13:56.417Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how OpenCode-goal-plugin compares with popular alternatives.
OpenCode-goal-plugin is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by william-ricchiuti. Session-scoped /goal workflow for OpenCode with fail-closed persistence and an independent completion verifier. Maintenance mode: OpenCode 2.2.1+ ships a built-in /goal. It has 285 GitHub stars.
Yes. OpenCode-goal-plugin passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/william-ricchiuti/OpenCode-goal-plugin" and add it to your Claude Code skills directory (see the Installation section above).
OpenCode-goal-plugin is primarily written in JavaScript. It is open-source under william-ricchiuti on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh OpenCode-goal-plugin against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
A /goal command for OpenCode: set an objective, walk away, and the plugin keeps the agent working until it proves the goal is done, reports a blocker, or hits a limit you set.
[!IMPORTANT] Maintenance only. OpenCode ships its own
/goalas of v2.2.1 (2026-10-29, #59437). On 2.2.1 and later, use the built-in command unless you need what it does not do: evidence-gated completion with an independent read-only verifier, multiple goals and ordered sequences, configurable turn, time, token and cost limits, agent tools, and Plan-mode holds. Bug and security fixes only; no new features. Running both side by side: see Install.
Why it existed. From May to October 2026 OpenCode had no way to run an objective unattended. This plugin filled that gap for OpenCode 1 and 2, and was used for multi-hour autonomous runs in which no model could declare itself finished without evidence.
read, glob and grep, reviews a structured completion claim and answers [audit:approved]. Verifier failures reject by default; a verifier whose prompt or permissions were changed always rejects. Completion auditornpm run test:mutation applies the 94 named regressions in scripts/mutation-contract.mjs (fail-open audits, lost leases, resurrected goals, …) one at a time and fails the release unless a test catches every one.npm run release:check adds coverage, consumer TypeScript compilation against the packed tarball, installed-package host and tool contracts, a deterministic behavior benchmark and npm audit. ci.ymlsrc/v2-bridge.js adapts OpenCode 2's hook domains onto the V1 hook contract, so the state machine, persistence and tools are shared code, not a fork.npm run smoke:v2-host drives a real opencode serve with a localhost deterministic model provider; the same approach was used for multi-hour goal soaks with injected write failures and mid-goal reloads.Try it: demo/ is a failing test suite and one /goal that fixes it.
This project is independently implemented for OpenCode. Product names used elsewhere identify their respective owners; no feature-parity or endorsement claim is implied.
This plugin relies on experimental OpenCode hooks. Re-test against the exact OpenCode build and provider/backend stack you plan to use for unattended work.
| Surface | Status |
|---|---|
| Node.js | Declared support: >=18; CI covers Node 18, 20, 22, and 24 |
| Operating systems | Filesystem-sensitive lifecycle tests run on Linux, macOS, and Windows |
| Package entrypoint | Installed-tarball contracts verify both export paths, consumer TypeScript resolution, hooks, and all 11 tools (OpenCode 2 exposes 9: it drops the redundant get_goal/set_goal aliases) |
| Provider/backend quirks | Strict-template backends require the goal block to merge into the primary system message; covered by regression tests |
| OpenCode 2 | Verified against 2.0.16, 2.0.26 and 2.2.2: plugin load, /goal, native agents, Plan holds, restricted independent completion auditing, foreign-verifier rejection, and safe reload recovery. On 2.2.1+ the plugin replaces the built-in /goal unless commandName is changed. See the OpenCode 2 section |
See the compatibility policy for the supported public surface and versioning expectations.
Tested against real OpenCode 1.17.15 and 1.18.25 processes with live provider credentials and no mocked plugin hooks. State, ledger entries, and workspace files were checked independently of terminal or model prose:
| OpenCode Version | Provider Tested | /goal status |
Auto-continue | Evidence-gated completion | Historical custom-command presentation (v0.6.6) |
|---|---|---|---|---|---|
| 1.17.15 | opencode (deepseek-v4-flash-free) |
✅ Canonical tool | ✅ Checkpoint + idle continuation | ✅ Structured goal_complete claim |
⚠️ Command text routed to model; mutation guard verified |
| 1.17.15 | opencode-go (qwen3.7-plus) |
✅ | ✅ | ✅ Self-corrected after one rejection (bare [goal:complete] with no evidence), then completed cleanly |
⚠️ Not displayed |
| 1.17.15 | opencode-go (glm-5.2) |
✅ | ✅ | ✅ Clean [goal:evidence] + [goal:complete] on the first attempt |
⚠️ Not displayed |
| 1.17.15 | deepseek (deepseek-chat) |
✅ | ✅ | ✅ Clean [goal:evidence] + [goal:complete] on the first attempt; also verified end-to-end via the demo — autonomously fixed a real bug and reported evidence-backed completion |
⚠️ Not displayed |
| 1.18.25 | opencode (nemotron-3.5-lightning-free) |
✅ | ✅ Held correctly under the Plan agent (stopped: true, zero auto-continues) |
✅ Clean [goal:evidence] + [goal:complete] |
⚠️ Not displayed; command text routed to model |
| 1.18.29 | deterministic localhost OpenAI-compatible fixture (no live provider) | ✅ Control turn routed; all 11 tools in every request | ✅ Idle continuation → completion; blocker paused with its reason | ✅ [goal:evidence] + [goal:complete] archived |
⚠️ Not displayed; command text routed to model |
/goal status and auto-continue are graded on state correctness (verified directly against persisted state: correct limits, turn/stop accounting, completion state, and file effects), not on terminal rendering. The deepseek-v4-flash-free canary suite additionally covers pause/resume across processes, blocker/restart, hard-process recovery, real host compaction, and stale-history clear enforcement. See docs/providers.md for the complete lifecycle matrix and session evidence.
Note: The table records the v0.6.6 live-provider matrix. In that release, OpenCode 1.17.15 retained the original command-parts array, so assigning a new output.parts array did not replace the raw command argument sent to the model. The current implementation mutates that retained array in place, making the plugin-generated command result the prompt for the turn. OpenCode custom commands still run through the model rather than rendering hook output directly, so the visible response may summarize or paraphrase the result (see Limitations). Re-test against the exact OpenCode build and provider/backend stack you rely on for unattended work, and see docs/providers.md for the full historical model matrix.
The 1.18.29 row comes from a deterministic-provider canary against a real opencode serve process, graded on persisted state. That canary also reproduced the two defects fixed in 0.10.0 (a first-command Plan goal not being held; a stale running title after completion) on 1.18.25 and 1.18.29 alike.
Separately, the lifecycle-feedback implementation included in v0.7.0 passed a real OpenCode 1.18.11 host canary covering create, status, pause, resume, edit, and default lifecycle logging with a deterministic localhost provider. That canary validates host integration, not another live-provider compatibility row.
OpenCode installs npm plugins itself from your config, so there is nothing to npm install. Add the plugin with a pinned version to opencode.json (the user config at ~/.config/opencode/opencode.json, or a project-local opencode.json):
OpenCode 2 — the plugin registers its own command, so no command entry is needed:
{
"plugins": ["opencode-goal-plugin@0.11.4"]
}
OpenCode 1 — the same plugin also needs its goal command declared in config:
{
"plugin": ["opencode-goal-plugin@0.11.4"],
"command": {
"goal": {
"description": "Set a session-scoped goal and auto-continue until complete.",
"template": "$ARGUMENTS",
"agent": "build"
}
}
}
A V1 config keeps working on OpenCode 2 (the plugin key is normalized to plugins), but its command.goal entry is registered after plugin commands on V2 and would shadow the plugin handler — remove it. The plugin detects the conflict, re-asserts its own registration, and logs a warning if a foreign definition still owns the name.
Or let the CLI add the plugin entry for you:
opencode plugin opencode-goal-plugin@0.11.4 --global
Restart OpenCode after editing the config. The options form ["opencode-goal-plugin@0.11.4", { ... }] (see Plugin-level defaults) pins the same way.
/goalOpenCode 2.2.1 and later ship a built-in /goal. With default options this plugin takes over /goal and the built-in command does not run. To keep both, se