ai-loop
Runs a controlled development loop with human approval. Ensures risky or complex work is reviewed before proceeding.
What it does
This tool organizes programming work into clear steps: plan (spec), build, and review. It ensures the AI follows your instructions precisely, checking its work at each stage and asking for your approval on important actions.
When to use it
- ✓When you want the AI to create something new from scratch, following a plan.
- ✓When the work needs to be broken down into smaller parts with clear rules.
- ✓When you want the AI to check its own work before delivering.
Example of what to ask your AI
“I want to create a Python function that calculates the average of a list of numbers. The function should ignore non-numeric values and return 0 if the list is empty.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The AI first understands what you want (specification). Then, it builds the code following that specification. Finally, it reviews the code to see if everything is correct, repeating the process if necessary.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill ai-loopOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/ai-loop/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from 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)
- Reuse the current request, accepted plan and existing artifacts. Ask only for essential missing scope or acceptance criteria; do not repeat answered questions.
- Do not start building yet.
- When you have enough information, use the existing specification or, when needed, save a scoped new one at
specs/<feature-name>.mdwithout overwriting user work. - 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)
- Read the spec you just created in
specs/<feature-name>.md. - Build exactly what it describes.
- Do not add features, do not refactor unrelated code, and do not invent requirements that aren't in the spec.
- Focus strictly on fulfilling the spec. List which spec requirements you covered so the review step can check them.
Phase 3: Review (Verification)
- Compare your implementation against
specs/<feature-name>.md. - 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.
- 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.
- 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.
- 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.mdwith the requirements we discussed. Now, I will start implementing it.
Agent (Phase 2 - Build):
(Creates
stats_calculator.jsand implementsmean,median, andmodematching 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
…
FAQ
What are 'approval gates'?
These are moments when the AI stops and asks for your permission before doing something risky, like changing core code or deleting data.
What happens if the AI can't complete the work?
It will inform you about what's missing and why it couldn't complete it, respecting the limits you set (like the number of attempts).
Can the AI create any type of code?
It's best for well-defined, isolated tasks. For very large changes or those affecting many system parts, it might not be the best tool.
Details
Original description by the author
Runs a bounded spec-build-review development loop with explicit scope, stop conditions, and human approval gates for risky or ambiguous work.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2095
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC