Tooluck logoTooluck
SKILL.md

goal-test

Agent skill fromundefined-ui/second-brain-os

Turn a vague task into a testable definition of done and generate an executable goal-test script for it, optionally with a bounded retry loop around a headless agent. Use when the user wants to run an agent in a loop, asks how to know when an agent task is finished, or says a goal like "improve X" needs to become checkable. Do NOT use for building eval suites over many cases — that is evals-bootstrap.

How to install goal-test

install goal-test
# install the second-brain-os pack with the skills CLI
npx skills add undefined-ui/second-brain-os

# or add only this skill to Claude Code: copy the folder

plugins/agents-course/skills/goal-test/

# into

~/.claude/skills/goal-test/ (all projects)

.claude/skills/goal-test/ (one project)

plugins/agents-course/skills/goal-test/SKILL.md

MITFull file
1# Write done as a script
2
3Theory: [The four parts of a loop](https://secondbrainos.dev/#/read/course-2-loop/the-four-parts)
4and the [goal test build page](https://secondbrainos.dev/#/read/track-loop/build-goal-test).
5"Improve the error handling" cannot terminate a loop, because nothing can ever
6say it is finished. The goal must be phrased so that a program — not a person,
7not the model — returns true or false against it.
8
9## Workflow
10
111. **Extract the claim.** Ask what the user wants true at the end, then
12 restate it as verifiable facts: which command exits 0, which file exists,
13 which string appears, which number crosses which threshold. If a part
14 cannot be checked by a program, say so and negotiate it down to what can.
152. **Prefer checks that already exist.** The test suite, the linter, the
16 build, the type checker. A goal test that shells out to `make test` is
17 better than one that reimplements it.
183. **Write `goal-test.sh`** (or `.py` if the checks are easier there) in the
19 project root: runs every check, prints one line per check with pass/fail,
20 exits 0 only when all pass. Keep it under ~40 lines; it must run in
21 seconds and be safe to run repeatedly.
224. **Run it now.** It should fail before the work is done — a goal test that
23 passes on the current state is testing nothing. Show the failing output.
245. **Offer the loop.** If the user wants the agent driven until done, wrap it:
25
26```bash
27#!/usr/bin/env bash
28…

Excerpt shown under the repository's MIT license.

More skills in second-brain-os

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates