‹ 首页

goal-driven-execution

@developersglobal · 收录于 1 周前

Transforms imperative instructions into declarative goals with verifiable success criteria. Enables autonomous looping until verified completion.

适合你,如果想让AI自主执行任务直到成功

/ 下载安装
goal-driven-execution.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add developersglobal/ai-agent-skills/goal-driven-execution
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- developersglobal/ai-agent-skills/goal-driven-execution
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify developersglobal/ai-agent-skills/goal-driven-execution
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
64GitHub stars
~862上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · f47f948
Overview

Andrej Karpathy's key insight: "LLMs are exceptionally good at looping until they meet specific goals. Don't tell it what to do — give it success criteria and watch it go."

This skill converts vague imperative instructions ("make the login work") into declarative goals with concrete, testable success criteria. Agents with clear goals self-correct autonomously. Agents with vague goals produce vague results and require constant intervention.

When to Use
  • Before starting any multi-step task
  • When a task has been described imperatively ("do X, then Y, then Z")
  • When you're unsure how you'll know when you're "done"
  • For long-running or complex implementations
Process
Step 1: Extract the Underlying Goal
  1. Read the full request.
  2. Ask: What is the user trying to achieve, not just what they asked for?
  3. Write the goal as: "The task is complete when [observable, verifiable outcome]."

Example transformation:

  • ❌ Imperative: "Add error handling to the API."
  • ✅ Goal: "The task is complete when: all API endpoints return structured error responses for 4xx/5xx cases, error responses include a code, message, and requestId, and the existing tests pass."

Verify: The goal statement is observable and testable by a third party.

Step 2: Define Success Criteria
  1. List 3–7 specific, binary success criteria: ``` Success when:
  2. [ ] All existing tests pass
  3. [ ] New behavior X is demonstrated by test Y
  4. [ ] No regressions in file Z
  5. [ ] Manual check: [describe what to look for] ```
  6. Each criterion must be falsifiable — you can clearly state when it passes or fails.

Verify: Every criterion can be checked without the original author.

Step 3: Define the Execution Plan
  1. Break the goal into ordered steps, each with its own verify check: ```
  2. [Step] → verify: [command or check]
  3. [Step] → verify: [command or check]
  4. [Step] → verify: [command or check] ```
  5. Identify the first failure mode — what's most likely to go wrong? Plan for it.

Verify: The plan is readable and each step is independently verifiable.

Step 4: Execute and Loop
  1. Follow the plan step-by-step.
  2. At each verify checkpoint — actually run the check. Do not skip.
  3. If a check fails: diagnose, fix, re-verify. Do not proceed past a failing check.
  4. When all checks pass: report completion with evidence.
Common Rationalizations (and Rebuttals)

| Excuse | Rebuttal | |--------|----------| | "The goal is obvious" | Obvious goals still need explicit success criteria. What's obvious to you is ambiguous to an agent. | | "I'll know when it's done" | That's not a verifiable criterion. Write it down. | | "The tests will tell me" | Which tests? What do they cover? What don't they cover? | | "It's too simple for a plan" | Simple tasks rarely fail. Complex tasks without a plan always do. |

Red Flags
  • The task is described as a to-do list, not a goal
  • You don't know how you'll verify completion
  • You're 80% through and realize the original framing was wrong
  • "It seems to work" is your verification strategy
Verification
  • [ ] Goal is stated as an observable, testable outcome
  • [ ] Success criteria are listed and binary (pass/fail)
  • [ ] Execution plan has verify steps for each phase
  • [ ] All verify checks have been run (not just assumed passing)
  • [ ] Evidence of completion is documented
References
  • [think-before-coding skill](../think-before-coding/SKILL.md)
  • [task-decomposition skill](../task-decomposition/SKILL.md)
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。