跳到正文
Skillpedia
智能体48k · #3709

ai-loop

它能做什么

这个工具把编程工作拆分成几个清晰的步骤:规划(spec)、构建和审查。它能确保 AI 准确遵循你的指令,在每个阶段检查自己的工作,并在涉及重要操作时征求你的同意。

适用场景

  • ✓当你希望 AI 按照计划,从零开始创建一个新东西时。
  • ✓当工作需要拆分成更小的部分,并且有明确规则时。
  • ✓当你希望 AI 在交付前先检查自己的工作时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-loop/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ai-loop/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想创建一个 Python 函数,用来计算一组数字的平均值。这个函数应该忽略非数字的值,如果列表为空,则返回 0。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会先理解你的需求(也就是规格说明,即 specification)。然后,它会按照这份规格说明编写代码。最后,它会审查代码,看看是否一切正确,必要时会重复这个过程。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

AI-Loop Skill

Overview

The ai-loop skill structures a bounded development cycle for agentic workflows. By dividing the process into distinct planning (Spec), implementation (Build), and validation (Review) phases, it helps an agent build and correct scoped code changes while keeping requirements, risk gates, and stop conditions explicit.

When to Use This Skill

  • Use when you need a feature built from scratch or heavily modified, and you want the agent to handle the lifecycle (specification, implementation, and verification) inside one clearly bounded workflow.
  • Use when working with isolated components, modules, or features that have well-defined scopes and constraints.
  • Use when the user asks for a complete development pass but the work still has clear success criteria, a reasonable verification path, and no unresolved safety or product decisions.

How It Works

This skill executes a controlled development loop composed of three phases: Spec, Build, and Review. When invoked, the agent moves through those phases until the scoped requirements pass verification, a stop condition is reached, or human approval is needed.

Before starting, define:

  • The maximum number of build-review iterations.
  • The verification commands or manual checks that count as evidence.
  • The actions that require explicit approval, such as destructive commands, production changes, external service writes, or broad architectural pivots.

Phase 1: Spec (Planning)

  1. Reuse the current request, accepted plan and existing artifacts. Ask only for essential missing scope or acceptance criteria; do not repeat answered questions.
  2. Do not start building yet.
  3. When you have enough information, use the existing specification or, when needed, save a scoped new one at specs/<feature-name>.md without overwriting user work.
  4. The spec must include:
    • The objective
    • The exact requirements
    • Edge cases to handle
    • A concrete definition of done that someone could check the build against
    • The iteration budget, verification commands, and approval gates.

Phase 2: Build (Implementation)

  1. Read the spec you just created in specs/<feature-name>.md.
  2. Build exactly what it describes.
  3. Do not add features, do not refactor unrelated code, and do not invent requirements that aren't in the spec.
  4. Focus strictly on fulfilling the spec. List which spec requirements you covered so the review step can check them.

Phase 3: Review (Verification)

  1. Compare your implementation against specs/<feature-name>.md.
  2. Go requirement by requirement and verify if it was met. List every gap, bug, or missing piece, naming the exact spec item each one fails.
  3. If anything fails and the iteration budget is not exhausted, write the specific fixes needed and loop back to Phase 2 (Build) to address them.
  4. Use the agreed iteration/resource limits and scope. Ask for material product or consequential authorization decisions that are not already resolved; routine repairs within the accepted outcome need no new checkpoint. Continue independent work when a dependent check is unavailable.
  5. Only pass the build and conclude the skill execution when every requirement in the spec is fully met and the declared verification evidence has passed.

Examples

Example 1: Creating a Basic Statistics Helper

User:

I want to add a utility for calculating basic statistics (mean, median, mode) of an array of numbers.

Agent (Phase 1 - Spec):

I can help with that. To get started, what programming language should this statistics calculator be implemented in? Also, how should empty arrays or invalid inputs be handled?

User:

JavaScript. If the array is empty, return null. If there are non-numbers, ignore them.

Agent (Phase 1 - Spec):

Thank you. I have created the specification file at specs/stats-calculator.md with the requirements we discussed. Now, I will start implementing it.

Agent (Phase 2 - Build):

(Creates stats_calculator.js and implements mean, median, and mode matching the spec exactly) I have finished implementing the calculator. I will now verify the implementation.

Agent (Phase 3 - Review):

Checking implementation against specs/stats-calculator.md:

  • Requirement: mean calculation -> PASS
  • Requirement: median calculation -> PASS
  • Requirement: mode calculation -> PASS
  • Requirement: empty array returns null -> PASS

…

常见问题

什么是“审批关卡”(approval gates)?

这是指 AI 在做某些有风险的操作前会停下来,征求你的许可,比如修改核心代码或删除数据。

如果 AI 无法完成工作怎么办?

它会告诉你还缺少什么、为什么无法完成,并遵守你设置的限制(比如尝试次数上限)。

AI 能编写任何类型的代码吗?

它最适合定义清晰、相对独立的任务。对于规模很大或会影响系统多个部分的改动,它可能不是最合适的工具。

详情

作者的原始描述

Runs a bounded spec-build-review development loop with explicit scope, stop conditions, and human approval gates for risky or ambiguous work.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#3709
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能