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 258 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 | Not supported and not yet tested; the peer/engine pin is >=1.17.15 <2. 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 and the goal command to opencode.json (the user config at ~/.config/opencode/opencode.json, or a project-local opencode.json):
{
"plugin": ["opencode-goal-plugin@0.10.0"],
"command": {
"goal": {
"description": "Set a session-scoped goal and auto-continue until complete.",
"template": "$ARGUMENTS",
"agent": "build"
}
}
}
Or let the CLI add the plugin entry for you and then add the command block by hand:
opencode plugin opencode-goal-plugin@0.10.0 --global
Restart OpenCode after editing the config. The options form ["opencode-goal-plugin@0.10.0", { ... }] (see Options) pins the same way.
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.10.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 objectives that auto-promote one at a time, use /goal sequence. Multi-word values must be quoted.
Flags accept either --flag value or --flag=value. If a flag is unknown, missing a value, given a non-positive integer, or (for --mode) an unrecognized mode, the plugin rejects the command with a helpful error instead of silently folding the bad flag into the goal text.
To include literal command-line options in an objective, wrap them in a Markdown fenced code span. Double-dash tokens inside the fence are objective text and are not parsed as goal flags:
/goal run ```pytest --maxfail=1 --disable-warnings``` and fix every failure
Multiline fences work as well. The backticks are removed from the stored objective, and a fence is never consumed as a flag's value.
Check status:
/goal status
/goal status keeps its existing Active goal: heading and adds an explicit State: line: active while the goal can continue, blocked when the assistant recorded a concrete blocker, and paused for other retained stops such as user intervention, a safety limit, or an audit rejection. A Completion audit: line distinguishes the always-on evidence gate from an optional built-in