AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

Goal Test (write 'done' as a script)

Turns a vague task into a machine-checkable definition of done, writes goal-test.sh, and optionally wraps a headless agent in a bounded retry loop.

Dev & CodingIntermediate★ 1,603⑂ 273AI score 8/10Last updated: Nov 3, 2026

What it does

  • Restates what you want as verifiable facts: which command exits 0, which file exists, which string appears, which metric crosses a threshold.
  • Reuses checks you already have — test suite, linter, build, type checker — instead of reimplementing them.
  • Writes a goal-test.sh (or .py) under ~40 lines in the project root: one pass/fail line per check, exit 0 only when everything passes.
  • Runs it immediately to prove it currently fails (a goal test that passes today tests nothing).
  • Optionally generates goal-loop.sh, driving a headless agent until the test passes, with three explicit brakes: an out-of-model checker, a stop rule, and an attempt budget.

Who it's for

  • Developers who want to run an agent in a loop but can't define when to stop.
  • Teams that need an objective 'definition of done' for bug fixes and refactors.
  • Anyone who distrusts model self-review as a completion signal.
  • Not for building multi-case eval suites (use an evals skill instead).

Examples

  1. "Improve the error handling" becomes three checks: make test exits 0, no bare except: in src/, coverage ≥ 80%.
  2. Red CI: goal-loop.sh retries the agent up to 5 times, feeding the verbatim failure output back as the prompt each round.
  3. "Remove all type errors" combines tsc --noEmit with lint, stopping the loop the moment both pass.

· · · 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI 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 /tmp/second-brain-os && mkdir -p ~/.claude/skills/goal-test && cp -r /tmp/second-brain-os/plugins/agents-course/skills/goal-test/* ~/.claude/skills/goal-test/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/undefined-ui/second-brain-os.git
  3. Create the skill folder: mkdir -p ~/.claude/skills/goal-test
  4. Copy the files: cp -r second-brain-os/plugins/agents-course/skills/goal-test/* ~/.claude/skills/goal-test/
  5. Restart Claude Code, then ask something like "turn this goal into a goal-test script" to trigger it.
  6. For the loop feature you need the claude CLI installed; review the auto-edit permission mode and attempt/cost limits before running it unattended.