Durable, guarded goal workflows for OpenCode with persistence, safety limits, agent tools, and evidence-gated completion.
# 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. Durable, guarded goal workflows for OpenCode with persistence, safety limits, agent tools, and evidence-gated completion. It has 272 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!
⚠️ 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.
A session-scoped /goal workflow for OpenCode.
Set a goal and the plugin keeps it in context, auto-continues the session whenever the assistant goes idle, and stops when the goal is marked complete, a blocker is reported, or a safety limit is reached.
Compatibility: 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.
active, paused, and blocked status plus transition-only lifecycle notices.This project is independently implemented for OpenCode. Product names used elsewhere identify their respective owners; no feature-parity or endorsement claim is implied.
| 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 |
| 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: plugin load, /goal, native agents, Plan holds, restricted independent completion auditing, foreign-verifier rejection, and safe reload recovery. 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.0"]
}
OpenCode 1 — the same plugin also needs its goal command declared in config:
{
"plugin": ["opencode-goal-plugin@0.11.0"],
"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.0 --global
Restart OpenCode after editing the config. The options form ["opencode-goal-plugin@0.11.0", { ... }] (see Options) pins the same way.
For 0.11.0, use the config for your OpenCode version above and restart OpenCode. When moving from OpenCode 1 to 2, remove the legacy command.goal entry so the plugin owns /goal. Upgrade every process sharing the same goal state before resuming work; recovered active goals load paused and require /goal resume.
The release adds OpenCode 2 support and fixes Plan activation, stale completion approvals after objective edits, invalid completion evidence, and persistence on filesystems with capped timestamps or unsupported hard links. See the changelog for the full changes.
Pin the version. OpenCode resolves an unpinned "opencode-goal-plugin" entry to @latest exactly once, installs it under its package cache (~/.cache/opencode/packages/opencode-goal-plugin@latest/ by default; opencode debug paths prints the cache root), and never re-resolves latest while that directory exists. An unpinned entry therefore stays on whichever version was first installed, indefinitely, and new releases on npm are never picked up — a bug fixed months ago can still be running locally.
To upgrade, bump the pin (for example to opencode-goal-plugin@0.11.0) and restart OpenCode; every pinned version gets its own cache directory. If you kept an unpinned entry, delete the opencode-goal-plugin* directories under the cache packages/ folder and restart. npx opencode-goal-plugin runs the bundled verification script, which warns when the cached copy lags the package.
Set a goal:
/goal fix the failing tests and verify the suite passes
Override limits for a single goal:
/goal fix the failing tests --max-turns 20 --max-minutes 30 --max-tokens 400000 --max-cost 5
Add success criteria, constraints / non-goals, and a mode:
/goal ship the release --success "tests pass and changelog updated" --constraints "do not touch the public API" --mode ordered
--success (alias --success-criteria) and --constraints (alias --non-goals) take quoted text and are injected alongside the objective so the assistant keeps them in view. --mode is normal (default) or ordered; ordered tells the assistant to preserve step order inside one objective. To queue distinct objec