skills/goal-gate/SKILL.md
Use this skill when the user wants to set, write, or use a goal or /goal that makes a coding agent keep working until a verifiable done condition is met. This skill configures the autonomy and stopping contract for Codex, Claude Code, or portable agent prompts; it does not perform the underlying task. Trigger on requests like 'should I set a goal?', 'set up a durable goal', 'give me a /goal prompt', 'keep refactoring until tests pass', 'I am stepping away, have the agent finish this', or goal prompts for migrations, refactors, ports, spec implementations, eval loops, backlog cleanup, or multi-checkpoint work. Do not use for single quick edits, running tests once, OKR/scrum goal questions, recurring reminders, or token-budget settings.
npx skillsauth add adonis0123/adonis-skills goal-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to decide whether the current task deserves a durable goal and to write the goal prompt or contract. This skill is independent from workflow-gate: consume a Workflow Gate block when one is already present, but do not require one.
high fit through a clear safety gate is set-now (auto-execute); medium is suggest; a tripped safety gate is suggest or defer; low is none.Goal Gate block per selected runtime, then carry out the runtime-specific action when the decision is set-now.Use explicit user intent before ambient tool availability:
| Runtime | Signal | Goal action |
|---|---|---|
| codex-slash | The user is in Codex and wants a slash-command prompt, or explicitly asks for Codex /goal. | Output a /goal ... prompt. |
| claude-code-slash | The user is in Claude Code, asks for Claude Code /goal, or asks for a Claude Code-compatible prompt. | Output a /goal ... prompt tuned for Claude Code evaluation. |
| codex-tooling | The session exposes tools such as get_goal, create_goal, or update_goal, and the user did not explicitly ask for a slash-command prompt. | Call goal tools only when the user explicitly asked to set or manage a goal. |
| unknown | The runtime cannot be inferred. | Output a portable contract, not an executable command. |
If multiple runtimes are requested, emit one Goal Gate block per runtime. Keep each block executable or copyable on its own.
Prefer a goal when all are true:
Avoid a goal for:
brainstorming or discuss-before-plan.Before any automatic action, check for conditions that must keep a human in the loop. If any holds, do not auto-set: emit Decision: suggest or Decision: defer and ask first, even when goal fit is high.
Decision: defer.brainstorming or discuss-before-plan should resolve.The gate exists because an auto-started goal hands the agent a long leash. That leash is only safe when the end state is reversible-or-approved, unambiguous, and checkable. When in doubt, fall back to suggest — the cost of asking once is small next to a goal that runs off in the wrong direction.
When the safety gate is clear and goal fit is high, treat the goal as authorized and start it now — do not stop to ask "should I set a goal?" The high-fit bar (one durable end state, verifiable from surfaced evidence, the agent can make progress without steering) is itself the signal that autonomy will help rather than hurt, so a confirmation round-trip mostly adds latency.
How set-now executes depends on the runtime:
codex-tooling: call get_goal first when available; if no goal is active, call create_goal with the Objective. Do not set a token budget unless the user asked for one.codex-slash / claude-code-slash: there is no goal API to call, so adopt the goal contract yourself — keep working toward the done condition, reporting at the checkpoints, until it is met or a stop-or-ask condition fires. Still emit the /goal prompt so the user can re-run it as a durable goal in a fresh session.unknown: capabilities are uncertain, so do not auto-execute. Emit a portable contract with Next: ask approval and let the user start it.Hold the auto-set for medium fit: stay on suggest, because the medium boundary is fuzzy enough that a quick nod from the user is worth more than the saved round-trip. low fit is none.
| Decision | Use when | Next behavior |
|---|---|---|
| none | Goal fit is low. | Continue without a goal. |
| suggest | Goal fit is medium and the safety gate is clear, or the user wants to review the contract before starting. | Provide the contract/prompt and ask for a nod. |
| set-now | Goal fit is high and the safety gate is clear, or the user explicitly asked and the goal is verifiable. | Auto-execute the runtime-specific action. |
| defer | Scope, decisions, evidence, or an already-active goal block a clean start. | Stop and ask, or route to the smallest prerequisite workflow. |
set-now is reached two ways: the user explicitly asks for a goal, or the task clears the safety gate at high goal fit. Do not silently mutate an active goal in codex-tooling; if get_goal shows one, emit Decision: defer and ask what to do with it.
Emit this block:
Goal Gate
- Decision: <none | suggest | set-now | defer>
- Runtime: <codex-tooling | codex-slash | claude-code-slash | unknown>
- Goal fit: <low | medium | high>
- Objective: <one durable objective or n/a>
- Done condition: <verifiable stopping condition or n/a>
- Verification: <commands/artifacts/evidence the agent must surface or n/a>
- Constraints: <scope/safety/must-not-change limits or n/a>
- Checkpoints: <progress reporting cadence or n/a>
- Stop or ask when: <blocked/risky/ambiguous/destructive/budget condition or n/a>
- Prompt: <runtime-specific goal prompt or none>
- Next: <create goal | adopt goal and continue | provide prompt | ask approval | continue without goal | route elsewhere>
Keep the block concise. Put long examples, if needed, below the block.
A good goal prompt states:
For Claude Code /goal, ensure the verification evidence will appear in the conversation, because the evaluator judges from surfaced transcript evidence rather than independently reading files or running commands.
For Codex slash /goal, include the same durable contract and validation loop. If goals may be disabled, tell the user to enable goals before running the prompt.
For Codex tooling, if Decision: set-now, call get_goal first when available. If no active goal exists, call create_goal with the Objective; do not set a token budget unless the user explicitly requested one. If a goal is active, do not replace it silently; ask the user what to do with the active goal before any goal mutation.
workflow-gate is optional. If a Workflow Gate block is available:
Route: Plan, Route: Full, long-running Light + systematic-debugging, and broad verification-before-completion as stronger goal-fit signals.Route: Direct, small Light, and Review-Handoff as weaker goal-fit signals unless the user explicitly wants a goal.workflow-gate as the workflow router; do not rewrite its route.If the user is actually asking which workflow to use, emit Decision: defer and Next: route elsewhere.
Read references/examples.md when you need worked examples for Codex tooling, Codex slash, Claude Code slash, unknown runtime, or workflow-gate interactions.
testing
Create safe Git feature or hotfix branches with concise names. Use this whenever the user asks to create a branch, start work on a new feature or fix, wants a `feat/...` or `hotfix/...` branch name, asks for a short branch slug from a task description, or wants help before beginning local Git work. Default to recommending the branch name and command first, then create only after user confirmation. Do not push, commit, rebase, or create PRs.
tools
Use when the user's pain is "adding/removing one more X means editing N files" and X is a recurring variant kind: popup, banner, modal, ad slot, payment method, AI model/tool, form field type, connector, sub-site, command, menu item, agent, extension point, or data source. Use when they want to design, refactor, review, name, or explain a pluggable mechanism using registry, interface/trait contract, runtime core, and convention folders; mention pluginize, pluggable, plugin architecture, extension point, registry pattern, or extensibility. Use when explaining the first-principles rationale, DDD/SOLID/OCP mapping, or industry analogies behind that structure. Use for cross-stack mapping to VSCode contributes, Webpack/Vite plugins, Rust/Tauri connectors, Python entry_points, or cargo features. Skip one variant's internals/styles/hooks/copy/bugs, and skip register/registry meaning DI container, user signup, or package registry.
development
Use BEFORE heavier workflow skills when route choice matters. Route creative work without a design doc/spec to Brainstorm; destructive or hard-to-reverse work to Discuss; unresolved decisions, Plan/Full fan-out, ship checks, unclear bugs, and fresh-eyes fix-then-re-review need this gate. Skip single-line read-only lookups, pure typo/formatting edits, trivial safe one-line fixes, and clearly safe named-skill requests. Outputs Route, Runtime skill, Fallback alias, and Execution path.
development
Cross-agent code review handoff and review-fix-re-review loop with persistent packet artifacts. Requires a git repo because packet addressing uses git rev-parse --show-toplevel. Use when the user asks for an independent, read-only second pair of eyes on a diff/branch/PR another agent or teammate implemented; asks to verify reviewer feedback before fixing; says a fix is done and wants scoped re-review; asks to continue the latest review packet; or asks for first-principles, DDD, high-cohesion/low-coupling review. Persists each loop under $repo_root/.review-handoff/active/ so agents can resume without copy-paste. Do NOT use for ordinary implementation, generic staged-change review, review-comment copy editing, non-git folders/zips/tarballs/temp dirs, or when the user names a different review skill.