What does this skill do?

The Agent Loop Skill turns Claude into a designer and auditor of agent loops: it guides you through five steps to write machine-decidable, goal-oriented loops (using plan/build/judge or dispatch-by-document templates) and then runs any existing loop through a checklist of five failure modes: infinite loop, verifier gaming, execution of incorrect responses, unresolved ambiguity, and obsolete memory.

Writing a Loop from Scratch
5-Step Guide: Filter before building, define a machine-decidable objective, choose a loop type (servo, controller, cron), skeleton, and damping.
Audit an Existing Loop
A checklist of five failure modes, with review questions and specific solutions for each identified problem.
Set Verifiable Goals
A five-point framework for a machine to determine whether an exit condition is met (yes/no), with anti-Goodhart limits and a Plan B for escalation to a human.
Roll out in three phases
From manual execution to skills or sub-agents, and finally to cron, with the human always flipping the final switch.

Usage examples

🛠️ Design a new loop
I want a night loop that fixes the tests that fail in my repo. Help me write it right from the start.
🔍 Audit an existing loop
I have this agent loop that creates automatic PRs. Check it against the five failure modes before deploying it to production.
🎯 Set a measurable goal
My goal is to "improve the quality of the payment module's code." Make it something a machine can verify as "yes" or "no."
🚦 Choose loop type
I need an agent that monitors financial reconciliations every hour and only takes action if there are discrepancies. What kind of loop would work for me?

Features

Machine-Determinable Objectives Five-point framework prioritizing reconciliation over assertion: anchor to external facts (golden sample, difference versus reference) rather than “sounds good.”
Types of Loops Servo (closed-loop), thermostat-type controller, controller with output condition, and timer-based programming, depending on the nature of the task.
Skeletons: plan/build/judge Three independent roles with deterministic rules: Build cannot edit the acceptance conditions, and the judge is never the same agent as the builder.
Checklist of Five Failure Modes Infinite loop, Turing test, execution of incorrect answers, unresolved ambiguity, and obsolete memory—each with its own antidote.
Three Red Lines The decision ultimately rests with the human; responsibility is not transferred, and the more autonomous the loop is, the stricter the human review becomes.

Frequently asked questions

No. The skill is methodological: it serves as a guide for design and review. You just need Claude Code or Cowork to activate it.
Yes, as long as the loop can be automated. Step 0 includes a four-condition filter to determine whether your task warrants a loop.
A report that cycles through the five failure modes and the three red lines, highlighting the correct answers in red and suggesting the corresponding countermeasure.
Yes. The skill is MIT, and the antibodies are patterns that you can adjust, although it's recommended that you keep the three red lines intact.
Agent Loops: Design and Review with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.