define-agent-goal

define-agent-goal is a command for Claude Code, Cursor from emaraschio/cursor-commands. It costs 44 tokens per session (1,433 once invoked), scanned A, original, MIT.

A planning command that turns a rough software task into a structured agent Goal. It records the objective, success checks, and any parallel helper work, then waits for approval before execution.

In plain words
What is it for?
Use it to define tasks, write three to five verification criteria, split suitable work into helper goals, and save the approved plan for later execution.
Why use it?
It makes the intended result and approval point explicit before an agent starts changing anything.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md). Also seen: mentions subagents.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/emaraschio/cursor-commands/define-agent-goal
Clone the repo
git clone --depth 1 https://github.com/emaraschio/cursor-commands

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for define-agent-goal

README.md
[![agentmods](https://agentmods.dev/badge/commands/emaraschio/cursor-commands/define-agent-goal.svg)](https://agentmods.dev/commands/emaraschio/cursor-commands/define-agent-goal)
Your own site
<a href="https://agentmods.dev/commands/emaraschio/cursor-commands/define-agent-goal"><img src="https://agentmods.dev/badge/commands/emaraschio/cursor-commands/define-agent-goal.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,433 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01433
Opus 5 $0.00022 $0.00717
Sonnet 5 $0.00009 $0.00287
Haiku 4.5 $0.00004 $0.00143

Measured 6d ago against content hash 6cd33c9c0954, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

define-agent-goal scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/define-agent-goal.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

Define an agent Goal using human-reviewed autonomy and a two-step handshake: draft the Goal and wait for Goal approval; execute only after a later explicit execute now. Plan-only on delivery and on Goal approval. Full workflow: .cursor/skill-contracts/define-agent-goal/SKILL.md (user install: ~/.cursor/skill-contracts/define-agent-goal/SKILL.md). End-user notes: .cursor/skill-contracts/define-agent-goal/reference.md.

Defaults

Setting Default
Deliverable Goal in chat (sections 1 to 6; section 7 when parallel work is implied)
Success criteria 3 to 5 checkboxes under Verification
Handshake Approve Goal, then later execute now; Goal approval is not execute
Discovery Fast path when full intake template is provided and unambiguous
Persistence Always auto-write to <host-repo-root>/agent-goals/<kebab-slug>.md (gitignored); never docs/agent-goals/
Examples Generic names only (service-a, repo1)

Steps

  1. Read .cursor/skill-contracts/define-agent-goal/SKILL.md for the full agent contract; if that file is missing, read ~/.cursor/skill-contracts/define-agent-goal/SKILL.md.
  2. Execute phases in order (Intake → Discovery [or fast path] → Draft → Clarify gate → Deliver); do not skip the clarify gate or start executing the task.
  3. Report the final Goal with 3 to 5 success criteria, two-step approval handshake, copyable intake template, and section 7 helper goals when parallelism applies (each with iteration and stopping).
  4. Auto-write under <host-repo-root>/agent-goals/<kebab-slug>.md (ensure /agent-goals/ is gitignored); never use docs/agent-goals/.

Anti-patterns

  • Clarify gate before publish. Trigger: outcome, verification, stopping condition, or boundaries are ambiguous. Wrong: publishing a Goal with guessed or TBD outcome/verification/stopping/boundaries. Correct: stop at the Clarify gate and ask before finalizing. Reason: a Goal shipped on assumptions authorizes work no one reviewed.
  • 3 to 5 success criteria. Trigger: drafting section 2 Verification. Wrong: fewer than 3 or more than 5 checkboxes. Correct: include 3 to 5 success criteria as scannable, testable checkboxes. Reason: too few criteria leave done-ness vague; too many bury the signal.
  • Complete every Goal section with bounded autonomy. Trigger: drafting the final Goal from a vague task. Wrong: publishing with missing sections or vague autonomy like "fix everything". Correct: clarify first, fill all six sections (plus section 7 when parallel), and keep boundaries narrow. Reason: an under-specified Goal lets the agent act far beyond what the user intended.
  • Require helper goals when work is parallel. Trigger: cross-repo, audit fan-out, explore-then-implement, or explicit subagents. Wrong: a single-agent Goal with no section 7, or mini-goals missing iteration/stopping. Correct: add one mini-goal per helper with outcome, verification, boundaries, iteration policy, and stopping condition (inherit parent when identical). Reason: parallel work without named helpers collapses into vague autonomy.
  • Do not invent section 7 for single-agent work. Trigger: one repo, one surface, no fan-out. Wrong: padding the Goal with unused helpers. Correct: omit section 7. Reason: false-positive parallelism wastes tokens and muddies ownership.
  • Two-step handshake: Goal approval is not execute. Trigger: finishing Goal delivery, or user says "approved" or "LGTM" on the Goal. Wrong: editing code, running destructive commands, or starting the underlying task in that turn. Correct: deliver the Goal and stop; acknowledge approval and wait for a later execute now (unless they explicitly skip Goal definition and order execution). Reason: this skill defines the Goal; conflating review with run causes unwanted changes.
  • Save: always auto-write to root agent-goals/ (gitignored). Trigger: Goal delivery. Wrong: writing under docs/agent-goals/ or committing Goals. Correct: <host-repo-root>/agent-goals/<kebab-slug>.md with /agent-goals/ in .gitignore. Reason: Goals are local working notes; docs/ paths get tracked and fight that intent.
  • Do not claim a native Goals product feature. Trigger: describing what this deliverable is. Wrong: implying a built-in Goals API or product feature. Correct: present this as a portable Goal document for Cursor agents. Reason: a native-product claim misleads the user about what shipped.
  • Prefer the intake fast path. Trigger: all four intake fields are present and unambiguous. Wrong: re-asking obvious duplicate questions. Correct: skip redundant discovery and draft the Goal. Reason: redundant interviews burn tokens when the user already supplied the inputs.

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 65 lines · 44 tokens per session scan A 6cd33c9c0954

Subscribe to this mod's changes

define-agent-goal is a command published in the GitHub repository emaraschio/cursor-commands (9 stars, last pushed 29d ago), licensed MIT. It adds 44 tokens to every session and 1,433 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.