Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

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.sh under ~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 or MAX_ATTEMPTS runs 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

  1. "Improve the error handling" → redefined as pytest -q passing, exception handling present in module X, and a stacktrace string in the logs; goal-test.sh generated and run.
  2. Fix a broken build: bundle npm run build, tsc --noEmit, and eslint . into one checker, then drive up to 5 agent attempts with the raw failure text as feedback.
  3. "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)
  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 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.

  1. Open a terminal.
  2. Clone the repo: git clone https://github.com/undefined-ui/second-brain-os.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r second-brain-os/plugins/agents-course/skills/goal-test ~/.claude/skills/
  5. Verify ~/.claude/skills/goal-test/SKILL.md exists.
  6. 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".
  7. (Optional) For the loop you need the claude CLI installed; since the agent edits files unattended, commit your work to git first.