Claude Code /goal Command
Autonomous execution mode for Claude Code. Set a completion condition, Claude works turn after turn until a fast evaluator model confirms the goal is met. No "keep going" prompts. Walk away and come back when it's done.
Source audit note: earlier imports attributed this page to Nick Spisak using status ID 2054989194414465222, but the raw X export shows that ID belongs to Matt Epstein's launch-agent article, not Nick Spisak. The original /goal source URL is unresolved in the local X export, so treat this as a compiled pattern page until the source is recovered. Source: raw X bookmark audit, 2026-07-04
How It Works
- Type
/goalfollowed by a clear completion condition - Claude takes a full turn (reasons, plans, edits, runs tests)
- A fast evaluator model (Haiku by default) reads the transcript and answers: "Is the goal condition met?"
- If no → Claude starts another turn immediately
- If yes → goal auto-clears, control returns to user
A loop with a model-verified exit condition. Source: compiled from local wiki import; source URL unresolved, reviewed 2026-07-04
Good Goals vs Bad Goals
Goals must be specific, measurable, and verifiable from the transcript.
Works well:
- "all tests in test/auth pass and the lint step is clean"
- "CHANGELOG.md has an entry for every PR merged this week"
- "every call site of the old API has been migrated and the build succeeds"
Fails:
- "make the code better" (vague - loops forever or evaluator halluccinates success)
- "redesign auth, add OAuth, write tests, update docs, deploy" (too many objectives)
The mental model: treat /goal like a ticket assigned to a very literal junior developer who never gets tired. Write exact acceptance criteria.
Project Setup for Success
Three things make /goal dramatically more reliable:
- CLAUDE.md at project root - architecture decisions, conventions, Definition of Done. Read automatically every turn.
- Hooks for auto-validation - auto-run lint or type-checking after every file edit so Claude catches issues mid-run.
- Auto Mode enabled - reduces permission prompts. Without it, a 30-turn run stalls on every file write approval.
Comparison: /goal vs /loop vs Stop Hooks
| Command | Trigger | Best For |
|---|---|---|
/goal |
Model-verified completion condition | Outcome-based work with defined end state |
/loop |
Schedule/interval | Polling, periodic tasks |
| Stop hooks | Custom evaluation logic per turn | Maximum flexibility, more setup |
Failure Modes
- Token burn on vague goals - loose conditions = turns with no progress
- Evaluator only sees transcript - if Claude doesn't print test results or file diffs, evaluator can't verify
- Complex multi-step overwhelm - break into sequential goals instead
- No built-in token budget - Claude keeps going until done or Ctrl+C. Community plugins add token caps
claude-code-setup Plugin
Anthropic released an official plugin that bootstraps the full Claude Code environment for any project:
/plugin install claude-code-setup@claude-plugins-official
See the dedicated page Claude Code Setup. The official Anthropic plugin scans the project and recommends the top 1-2 hooks, skills, MCP servers, subagents, and slash commands per category — it is read-only, so it advises rather than modifying files. Most developers run Claude Code vanilla, which produces a messy experience; the real power comes from the ecosystem: CLAUDE.md + hooks + skills + /goal + Agent View. Source: X/@Suryanshti777, 2026-05-17
Harness Engineering Connection
/goal is a concrete implementation of the Harness Engineering while-loop model:
- The while loop: Claude's turn-by-turn execution
- The stop condition: the goal completion check by the evaluator
- The evaluator: Haiku reading the transcript
- Context window discipline: breaking complex goals into sequential ones
The shape is a while loop. The engineering is the goal condition, the evaluator, and the project setup (CLAUDE.md, hooks, auto-mode). Source: compiled, 2026-05-19
Relevance to Kevin's Stack
Directly applicable to Kevin's automation pipeline:
- source-compile automation could use /goal with "all raw sources absorbed and wiki pages updated"
- skill-maintenance could use /goal with "all skills from recent sessions codified and wiki synced"
- Combines with Agent View (multi-session dashboard) for parallel autonomous agents - mirrors Cursor Orchestrate Skill pattern
- The evaluator model pattern (fast cheap model checking expensive model's work) parallels Security and Review Skills
Source: compiled from local wiki import; source URL unresolved, reviewed 2026-07-04
Timeline
- 2026-07-04 | Corrected a source-attribution bug: status ID
2054989194414465222belongs to @mattepstein, so it was removed as the Nick Spisak/goalsource pending recovery of the original URL. Source: raw X bookmark audit, 2026-07-04 - 2026-06-12 | claude-code-setup promoted to dedicated page Claude Code Setup; @Suryanshti777 surfacing tweet cited (4,564 likes, 13,851 bookmarks); corrected plugin as read-only (recommends, does not modify). Source: X/@Suryanshti777, 2026-05-17
- 2026-05-19 | Added claude-code-setup plugin info and harness engineering connection. Source: User, 2026-05-19
- 2026-05-14 | Earlier import recorded Nick Spisak's /goal command guide as the source for this page, but the source URL is now unresolved after the 2026-07-04 raw X audit. ~4,900 likes, ~19K bookmarks were preserved from that earlier import as unverified engagement context. Source: local wiki import, reviewed 2026-07-04