write-goal
Give an AI-assisted task a measurable finish condition your team can inspect.
$ claude
> /write-goal ▌
Overview
An open-source Claude Code skill that turns a loose request into a measurable acceptance criterion. The resulting /goal prompt describes the deliverable, the evidence the reviewer should see, and when the agent should stop. A team planning an automation pilot can use the same questions to decide what a successful run means.
Why it exists
I was poking at Claude Code's /goal command when it clicked that I'd been babysitting long tasks by hand while a whole built-in loop sat unused. Then I hit the catch: the evaluator can't run commands or open files — it only sees the transcript. So “loop until the tests pass” is worthless if the test output never gets printed. Solving that puzzle by hand every time got old fast, so I built a skill that writes the goal for me. Fittingly, every task in the session that built it was itself running under /goal — including the one that built this.
What it does
Produces a measurable end state — a real signal like an exit code or a file count, never “works” or “done”
Builds in transcript-visible proof: a specific command whose output Claude must print, so the loop can tell it's finished
Encodes constraints — what must not change on the way to the goal
Adds a turn cap, so a stuck loop stops and reports instead of running forever
If the task is too vague to have a finish line, it asks exactly one question — never a quiz
A real example
Hand it a rough task and get back a goal with all four ingredients built in:
/write-goal utils.js is too big, split it
/goal src/utils.js is split into focused modules each under 200 lines with all imports updated, proven in the transcript by `npm run build` and `npm test` both exiting 0 with the same passing-test count as before. Do not change any exported function signature. Stop after 25 turns and report what remains.
Install
One command from the repo root. It drops the skill into ~/.claude/skills/ — nothing gets overwritten without you doing it yourself.
$ git clone https://github.com/edcadet10/write-goal $ cd write-goal $ ./install.sh
More from the toolkit
Have a workflow you want to test?
Describe a recurring task, the inputs your team uses, and who checks the result. We can use those details to scope a practical first test.