write-goal

A writing skill that turns a plain-language task into a concise Codex Goal, or explains why a Goal is unsuitable. A Goal is a durable objective with a checkable finish line.

In plain words
What is it for?
Use it to draft a Goal for substantial tasks that need continued work, verification and a defined response to blockers.
Why use it?
It helps turn vague or multi-step requests into work with clear completion evidence, limits and stopping conditions.

Skill for Claude CodeCodex

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 skills/petekp/claude-code-setup/write-goal
Any agent
npx skills add petekp/claude-code-setup --skill write-goal
Clone the repo
git clone --depth 1 https://github.com/petekp/claude-code-setup

Made for: Claude Code, Codex.

Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,622 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 $0.00085 $0.01622
Opus 5 $0.00043 $0.00811
Sonnet 5 $0.00017 $0.00324
Haiku 4.5 $0.00009 $0.00162

Measured 2d ago against content hash f5177ba1a2f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write-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 2d 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.

skills/write-goal/SKILL.md · 120 lines

How it starts

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

Write Goal

Overview

Turn the user's request into a compact Codex Goal that can guide continued work until the evidence says it is done. Draft the goal; do not activate it unless the user explicitly asks you to start or set the Goal.

Workflow

  1. Extract the actual task from the prompt that invoked this skill. Ignore the skill mention itself.
  2. Decide whether a Goal is appropriate. Use a Goal for durable, multi-step work with an auditable finish line. For one-line edits, simple explanations, or vague improvement requests without a checkable end state, say that a normal prompt is a better fit and offer the closest tightened prompt instead.
  3. Draft one Goal that includes:
    • outcome: what must be true when finished
    • verification surface: tests, commands, artifacts, logs, benchmarks, source evidence, or review output that proves it
    • constraints: behavior, scope, public APIs, files, style, budget, or safety limits that must remain intact
    • boundaries: allowed repos, files, tools, data, and resources
    • iteration policy: how Codex should choose the next action after each result
    • blocked stop condition: when to stop and what evidence, attempted paths, blocker, and needed input to report
  4. Keep it as short as the evidence contract allows. Prefer one compact paragraph. Do not list every component if the sentence already carries it.
  5. Include the default adversarial review loop unless the user explicitly opts out.
  6. If required details are missing, make conservative assumptions inline. Ask only when missing information would make the Goal unsafe or impossible to verify.

Task Fit

  • Coding or refactoring: name the behavior or code state, the relevant tests or build commands, the scope boundary, and what must not regress.
  • Debugging or flaky tests: include reproduction evidence, focused verification, regression checks, and the point where missing evidence becomes a blocker.
  • Research or audits: require a claim inventory, evidence mapping, confidence labels, and a final report that separates confirmed, supported, blocked, and uncertain claims.
  • Docs or content: name the artifact, reader outcome, source-of-truth checks, build or link checks, and terminology constraints.
  • Vague requests: narrow the task with explicit assumptions if there is a plausible evidence surface. If there is not, return a tightened normal prompt instead of a Goal.
  • One-off tasks: do not force a Goal. Say it is better as a normal prompt and provide that prompt.

Read the full file on GitHub · 120 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 120 lines · 85 tokens per session scan A f5177ba1a2f8

Subscribe to this mod's changes

write-goal is a skill published in the GitHub repository petekp/claude-code-setup (45 stars, last pushed 26d ago), licensed MIT. It adds 85 tokens to every session and 1,622 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

forget

Delete specific observations from agentmemory after showing them and getting explicit confirmation. Use when the user says "forget this", "delete memory", "remove that note", or wants to scrub specific data for privacy.

rohitg00/agentmemory · 43 tokens

handoff

Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.

rohitg00/agentmemory · 55 tokens

lesson

Save a correction or hard-won rule as a confidence-weighted lesson that resurfaces before similar work. Use when the user corrects your approach, says "learn this", "always" or "never do X", or you notice yourself repeating a past mistake.

rohitg00/agentmemory · 55 tokens

memory-discipline

The session loop that makes agentmemory pay off, recall before starting work, save at decision points, learn from corrections. Use when starting a nontrivial task, after settling a decision or debugging a gotcha, or whenever deciding if something belongs in memory.

rohitg00/agentmemory · 56 tokens

remember

Save an insight, decision, or learning to agentmemory's long-term storage with searchable concept tags. Use when the user says "remember this", "save this", "note that", "don't forget", or wants to preserve knowledge for future sessions.

rohitg00/agentmemory · 52 tokens

agentmemory-hooks

The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.

rohitg00/agentmemory · 42 tokens