# goal-prompt

Generates copy-paste /goal directives for Claude Code and Codex with verified stop conditions and invariant checks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 7805
- Author: trailofbits
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trailofbits/skills/tree/HEAD/plugins/goal-prompt/skills/goal-prompt/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/goal-prompt

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill goal-prompt -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/goal-prompt/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/goal-prompt/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill goal-prompt -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/goal-prompt/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill goal-prompt -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/goal-prompt/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install trailofbits/skills goal-prompt
```

2. **Manually: put the files in place**
- File: `.github/skills/goal-prompt/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill goal-prompt -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/trailofbits/skills --path plugins/goal-prompt/skills/goal-prompt
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/goal-prompt/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill goal-prompt -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/trailofbits/skills/tree/HEAD/plugins/goal-prompt/skills/goal-prompt/SKILL.md

## When to use it
- 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
- 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

## Similar
- [plannotator-setup-goal](https://affpapa.org/en/nevibecode/skills/plannotator-setup-goal.md) — skill · 11400 installs
- [define-goal](https://affpapa.org/en/nevibecode/skills/define-goal.md) — skill · 2800 installs
- [qiaomu-goal-meta-skill](https://affpapa.org/en/nevibecode/skills/qiaomu-goal-meta-skill.md) — skill · 849 installs
- [goal-plan](https://affpapa.org/en/nevibecode/skills/goal-plan.md) — skill · 770 installs
- [jackin-goal-prompt](https://affpapa.org/en/nevibecode/skills/jackin-goal-prompt.md) — skill · 470 installs
- [goal-release](https://affpapa.org/en/nevibecode/skills/goal-release.md) — skill · ★ 1552

From the same set: [trailofbits/skills](https://affpapa.org/en/nevibecode/by/trailofbits/skills.md) — 77 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
