goal
Manage the persistent thread goal from the Python REPL. Use to read goal status and budget usage, to start a goal when the user explicitly asks for one, to…
by gabrielmoreira★ 23 GitHub stars
Install goal in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Goal
The thread goal is a persistent objective the harness keeps re-prompting you to pursue across turns until it is complete. Goal state (status, token budget, usage accounting) lives in the host; this skill is the kernel-side interface to it. Call it directly from the Python REPL:
await goal.get()
await goal.create("ship the release notes")
await goal.pause()
await goal.resume()
# If the user cancels the objective: await goal.cancel()
await goal.complete()
API
await goal.get()— current goal as a dict:goal(orNonewhen no goal is set),remaining_tokens, andcompletion_budget_report. Thegoaldict carriesobjective,status,token_budget,tokens_used,time_used_seconds, and timestamps.await goal.create(objective, token_budget=None)— start a new active goal. Fails while a goal is still pending (active, paused, or budget-limited); a completed or errored goal is replaced by the new one. Only create a goal when the user or system/developer instructions explicitly ask for a persistent long-running goal; do not infer goals from ordinary tasks. Settoken_budgetonly when an explicit token budget is requested.await goal.complete()— mark the existing goal achieved. Use only when the objective has actually been achieved and no required work remains; do not call it merely because the budget is nearly exhausted or because you are stopping work. When the result includes acompletion_budget_report, report that final usage to the user.await goal.pause()— stop automatic pursuit and retain the objective.await goal.resume()— resume a paused goal without resetting usage or budget.await goal.cancel()— stop pursuing an unwanted goal without claiming success.
These calls return a dict containing the updated goal; inspect
result["goal"]["status"] before announcing success. Host errors raise
RuntimeError; the transport's status envelope is not part of the result. Pausing or
canceling from Python lets the current call finish; it prevents further goal
continuations rather than aborting its own tool execution.
Rules
- Use pause, resume, and cancel when requested by the user or system/developer instructions. Cancel is not completion; do not report the objective achieved.
- Clear and budget-limiting remain host-controlled; no Python API exposes them.
- When an active goal is actually complete, call
await goal.complete(); do not merely say it is done — the harness keeps continuing the goal until the completion call arrives.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the goal skill do?
Manage the persistent thread goal from the Python REPL. Use to read goal status and budget usage, to start a goal when the user explicitly asks for one, to pause, resume, or cancel a goal when requested, or to mark the active goal complete once its objective is fully achieved.
How do I install the goal skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the goal skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…