Goal Test Script Writer
Turns a vague task like "improve error handling" into an executable `goal-test.sh` that returns pass/fail, plus an optional bounded agent retry loop.
AutomationIntermediate★ 815⑂ 128AI score 9/10Last updated: Sep 29, 2026
What it does
- Restates what you want into program-verifiable facts: which command exits 0, which file exists, which string appears, which number crosses a threshold. Anything uncheckable is negotiated down.
- Reuses checks you already have (test suite, linter, build, type checker) and writes a
goal-test.shunder ~40 lines in the project root: runs every check, prints one pass/fail line each, exits 0 only when all pass. - Runs it immediately to show it failing — a goal test that already passes is testing nothing.
- Optionally wraps a headless agent in
goal-loop.sh: retry until the test passes orMAX_ATTEMPTSruns out, feeding the failure output back verbatim as the prompt. - Keeps the three brakes explicit: a checker outside the model, a stop rule, and a budget.
Who it's for
- Anyone running coding agents in a loop who lacks a clear definition of done.
- Developers and tech leads who must convert "make X better" into agreed, checkable completion criteria.
- Teams automating done-ness in CI (for multi-case eval suites, use evals-bootstrap instead).
Examples
- "Improve the error handling" → redefined as
pytest -qpassing, exception handling present in module X, and a stacktrace string in the logs; goal-test.sh generated and run. - Fix a broken build: bundle
npm run build,tsc --noEmit, andeslint .into one checker, then drive up to 5 agent attempts with the raw failure text as feedback. - "No dead links in the docs" → checker based on the link-checker exit code and a zero broken-link count, safe to re-run repeatedly.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/undefined-ui/second-brain-os/HEAD/plugins/agents-course/skills/goal-test/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the plugins/agents-course/skills/goal-test folder from the GitHub repo undefined-ui/second-brain-os into my ~/.claude/skills/goal-test/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/undefined-ui/second-brain-os.git && mkdir -p ~/.claude/skills && cp -r second-brain-os/plugins/agents-course/skills/goal-test ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/undefined-ui/second-brain-os.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r second-brain-os/plugins/agents-course/skills/goal-test ~/.claude/skills/ - Verify
~/.claude/skills/goal-test/SKILL.mdexists. - Restart Claude Code, then in your project ask: "turn this goal into a goal test" or "run the agent in a loop until it's done".
- (Optional) For the loop you need the
claudeCLI installed; since the agent edits files unattended, commit your work to git first.
View source on GitHub ↗License: MIT