goal-prompt — Claude Code skill: what it does, how to install
Generates copy-paste /goal directives for Claude Code and Codex with verified stop conditions and invariant checks.
npx skills add trailofbits/skills --skill goal-prompt -a claude-codeWhat goal-prompt does
This skill shapes unstructured instructions into a single-line /goal command capped at 4,000 characters. In Claude Code, an evaluator model reviews the transcript to decide if a task is done, and it cannot run commands itself. Because of that, the skill writes observable end states and forces the agent to print command output directly into the log.
Under the hood, it formats drafts using uv run --no-project {baseDir}/scripts/format_goal_prompt.py --fenced. The script normalizes whitespace, strips outer wrappers, and warns when a turn limit or blocker clause is missing. It also pairs checks to prevent shortcuts, such as deleting callers instead of fixing them or silencing test suites.
If critical details are absent from the prompt or codebase, the skill refuses to invent them. It outputs the normalized command and appends a Missing: list detailing what you need to provide.
What it helps with
- draft single-line /goal commands with definite finish lines
- prevent models from gaming checks by deleting or skipping tests
- enforce turn limits and blocker exit clauses
- format long objectives into strict 4,000-character single-line prompts
Example prompts for the agent
- Draft a /goal command to migrate legacyAuth to auth.verify with test verification
- Turn this refactoring plan into a Claude Code goal prompt with a 20 turn bound
- Format my audit objective for Codex and check for missing stop conditions
How to install goal-prompt
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill goal-prompt -a claude-code2Manually: put the files in place
~/.claude/skills/goal-prompt/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/goal-prompt/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill goal-prompt -a codex2Manually: put the files in place
.agents/skills/goal-prompt/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill goal-prompt -a cursor2Manually: put the files in place
.cursor/skills/goal-prompt/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install trailofbits/skills goal-prompt2Manually: put the files in place
.github/skills/goal-prompt/SKILL.md1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill goal-prompt -a gemini-cli2Platform CLI
gemini skills install https://github.com/trailofbits/skills --path plugins/goal-prompt/skills/goal-promptManually: put the files in place
.devin/skills/goal-prompt/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add trailofbits/skills --skill goal-prompt -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about goal-prompt
How to install goal-prompt in Claude Code?
Run npx skills add trailofbits/skills --skill goal-prompt -a claude-code. The skill file is placed in ~/.claude/skills/goal-prompt/SKILL.md.
What does goal-prompt do?
It structures requests into single-line /goal commands for autonomous execution in Claude Code and Codex. It links requirements with AND, adds output checks, and sets stop criteria so agents do not loop endlessly.
Why does the skill enforce showing test output in the transcript?
Claude Code evaluates completion through a separate model that only reads the conversation transcript. If terminal command results are not printed, the evaluator cannot confirm the success criteria.