goal-prompt
Drafts copy-paste-ready /goal commands for goal mode in Claude Code and Codex
Install / Use
npx skills add trailofbits/skills --skill goal-promptInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of goal-prompt
goal-prompt scores 90/100 on our quality scale, 437th of 2,185 Development & Engineering skills we index (top 20%).
Its SKILL.md is 6.0 KB long, split into 6 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
With 7,225 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 3 days ago, so goal-prompt is actively maintained.
- It is released under the CC-BY-SA-4.0 license; check its terms before commercial use.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
goal-prompt compared with similar skills
All 4 of these similar skills score higher than goal-prompt; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| goal-prompt (this skill)by trailofbits | 90 | 7.2k | 3d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.0k | 5d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | today | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
Frequently asked questions
- How do I install goal-prompt?
- Run
npx skills add trailofbits/skills --skill goal-prompt. The install tabs above show the steps for each supported agent. - Which AI agents does goal-prompt work with?
- It is written for Claude Code and OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is goal-prompt safe to use?
- It is CC-BY-SA-4.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is goal-prompt still maintained?
- The repository was last updated 3 days ago, so goal-prompt is actively maintained.
Skill content
View source on GitHubname: goal-prompt description: "Drafts copy-paste-ready /goal commands for goal mode in Claude Code and Codex. Use when the user asks to create, write, rewrite, improve, compress, clean up, or prepare a goal prompt, goal condition, /goal command, goal-mode objective, or copy-ready long-running task objective." allowed-tools: Bash Read Write
Goal Prompt
/goal keeps the agent working until a completion condition is met. Both Claude Code and Codex take it as one line, max 4,000 characters. In Claude Code a small model re-judges the condition after each turn from the transcript alone — it cannot run commands.
Draft a condition that can terminate, then format it. A goal fits work bigger than one turn with a checkable finish line; chain small goals with review between them rather than writing one giant goal.
Draft
Include, joined with AND — never "or", the loop takes the cheaper branch:
- End state, not activity — "all
legacyAuth()call sites useauth.verify()", not "migrate the auth code". An activity can be claimed; an end state is true or false. - Scope to read first — the files, issue, logs, or plan to read before acting.
- Stated check — the exact command and its observable result ("
npm testexits 0"), plus an instruction to run it and show the output; a result that never lands in the transcript does not exist to the evaluator. - Invariants — what must not change ("without modifying vendor/"), always including "do not weaken, skip, or edit the checks themselves".
- Stop bound or blocked clause — "or stop after 20 turns", "if blocked, stop and report the blocker". Without one, a mis-stated condition loops forever; the formatter warns when it is missing. (Claude Code resets the turn counter on session resume, so a turn bound silently extends across resumes.)
Keep it small. Every constraint narrows the state space the model can explore. Collapse to one terminating criterion when possible, move scope and definitions into a referenced file, and drop non-goals — a constraint earns its place only by closing a real easy-out.
For long goals, also name the final evidence (diff, report, artifact) and require a progress log file — durable state across compaction and resume. If the brief exceeds 4,000 characters, put the details in a GOAL.md and reference that file from the objective.
Never invent missing elements. Ground every element in the user's request, the conversation, or the repository — look things up rather than guessing. If an element cannot be filled from available information, still optimize and format what the user provided, leave the element out, and flag it as missing (see Format). A goal with an invented success condition terminates on the wrong contract.
Close the easy-outs
Before formatting, reread the drafted condition as a lazy model would: what is the cheapest way to make every check pass without doing the intended work? Close the cheapest ones — prefer pairing checks you already have over adding constraints, and do not enumerate every conceivable out into a non-goal list. The recurring outs:
- Delete or stub instead of fix — "search prints nothing" also holds when the callers are gone; pair such checks with one that proves the feature still works.
- Pass on a subset — running one test file, narrowing the search path, excluding directories from the check.
- Game the gate — skipping/xfail-ing tests, hardcoding expected outputs, special-casing the test inputs, editing the check (the invariants rule).
- Claim without running — declaring done or blocked with no check output in the transcript (the show-the-output rule).
Same discipline as above: an out you cannot close from available information goes in the Missing: list as a warning — an invented or absurd constraint is worse than a flagged gap.
Security research goals
Collapse audit goals to one terminating criterion, such as identifying, triggering, and validating one high-severity vulnerability valid under a referenced threat-model file. That file, not the goal, carries scope, attacker powers, severity baseline, and known findings to skip. Use neutral wording ("trigger and validate", not "prove this is exploitable"), require demonstrated preconditions — assumed attacker access is the most common false positive — and stop for human review after each finding rather than piling up untriaged reports. Validate findings with a second pass by a fresh agent, never the finder alone.
Format
Run uv run --no-project {baseDir}/scripts/format_goal_prompt.py --fenced on the draft (file or stdin). It collapses whitespace to one line, strips /goal prefixes, quotes, and fences, warns on a missing stop clause, and rejects output over 4,000 characters — shorten or move detail to a file and rerun.
Return exactly one fenced text block, one line:
/goal <single normalized objective>
Add no prose around it — except when checklist elements could not be grounded: then follow the block with a Missing: list, one line per gap, telling the user what to supply.
Example
Draft:
/goal Migrate the auth module:
- replace legacyAuth() with auth.verify()
- make sure the tests still work
Redrafted and formatted:
/goal All legacyAuth() call sites use auth.verify(): `rg "legacyAuth\(" -t ts` prints nothing AND `npm test` exits 0 (run both, show the output), without modifying vendor/ or weakening any test. If blocked, stop and report attempted paths and the blocker, or stop after 20 turns.
Here npm test came from the repo's package.json — not a guess — and pairing it with the zero-matches check closes the cheapest out: deleting the call sites instead of migrating them. When nothing grounds an element, format what exists and flag the gaps:
Draft: make checkout faster, with no metric or benchmark anywhere in context:
/goal Make checkout faster
Missing:
- measurable end state — which metric and threshold count as "faster"
- verification — the benchmark or command that proves it
- stop bound — e.g. "or stop after 20 turns"
Related Skills
ai-job-search
44.0kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse 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 presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
