跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

goal-test

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.

测试1kplugins/agents-course/skills/goal-test/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/undefined-ui/second-brain-os/goal-test/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

Write done as a script

Theory: The four parts of a loop and the goal test build page. "Improve the error handling" cannot terminate a loop, because nothing can ever say it is finished. The goal must be phrased so that a program — not a person, not the model — returns true or false against it.

Workflow

  1. Extract the claim. Ask what the user wants true at the end, then restate it as verifiable facts: which command exits 0, which file exists, which string appears, which number crosses which threshold. If a part cannot be checked by a program, say so and negotiate it down to what can.
  2. Prefer checks that already exist. The test suite, the linter, the build, the type checker. A goal test that shells out to make test is better than one that reimplements it.
  3. Write goal-test.sh (or .py if the checks are easier there) in the project root: runs every check, prints one line per check with pass/fail, exits 0 only when all pass. Keep it under ~40 lines; it must run in seconds and be safe to run repeatedly.
  4. Run it now. It should fail before the work is done — a goal test that passes on the current state is testing nothing. Show the failing output.
  5. Offer the loop. If the user wants the agent driven until done, wrap it:
#!/usr/bin/env bash
# goal-loop.sh — run a headless agent until the goal test passes or attempts run out.
set -u
MAX_ATTEMPTS=5
for i in $(seq 1 "$MAX_ATTEMPTS"); do
  FEEDBACK=$(./goal-test.sh 2>&1) && { echo "done in $i attempt(s)"; exit 0; }
  claude -p "Goal: <the goal>. The goal test currently fails with:
$FEEDBACK
Fix the code so the goal test passes." \
    --permission-mode acceptEdits --output-format json > ".attempt-$i.json"
done
echo "goal test still failing after $MAX_ATTEMPTS attempts — falling back to a human"
exit 1

Adjust the agent command to whatever CLI the user runs. Keep the three brakes visible and named: the checker outside the model (goal-test.sh), the stop rule (test passes), the budget (MAX_ATTEMPTS, plus a dollar cap read from the JSON output if they want one).

Rules

  • The checker never asks the model's opinion; self-review is not a checker.
  • Feed the checker's output back verbatim — the failure text is the prompt.
  • If the user cannot state done as a check, they do not have a loopable task yet; tell them that plainly and suggest an interactive session instead.

相似的 Skill

skill-creator
anthropics/skills180k

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

测试

ponytail-audit
DietrichGebert/ponytail158k

ponytail-audit

Quality audit of a whole repo: bugs, security holes, what breaks under real load, risky code without tests, slow paths, and what to delete, merge or split. Ranked, each finding explained in plain English. One-shot report, changes nothing. Use for "audit this codebase", "review the whole repo", "find bloat", "what can I delete", /ponytail-audit.

测试

ponytail-audit
DietrichGebert/ponytail158k

ponytail-audit

Quality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.

测试

ponytail-review
DietrichGebert/ponytail158k

ponytail-review

Quality review of a diff: bugs, security, real load, missing tests, speed, and what to delete. Each finding says what goes wrong and how to fix it.

测试

ci-cd-and-automation
addyosmani/agent-skills103k

ci-cd-and-automation

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

测试

idea-refine
addyosmani/agent-skills103k

idea-refine

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

测试