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.
npx agentmods add skills/petekp/claude-code-setup/write-goalnpx skills add petekp/claude-code-setup --skill write-goalgit clone --depth 1 https://github.com/petekp/claude-code-setupWhat 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.
| Model | Per session | Once 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 |
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.
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
- Extract the actual task from the prompt that invoked this skill. Ignore the skill mention itself.
- 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.
- 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
- Keep it as short as the evidence contract allows. Prefer one compact paragraph. Do not list every component if the sentence already carries it.
- Include the default adversarial review loop unless the user explicitly opts out.
- 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.
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.
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.
- 2d ago First seen · 120 lines · 85 tokens per session scan A f5177ba1a2f8
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.
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.
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.
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.
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.
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.
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.