evanca/ai-agent-skills / skills/loop-designer
loop-designer
VerifiedUse when the user wants to automate a recurring task, monitor something continuously ("check my PR every 5 minutes", "watch CI", "triage feedback hourly"), build a retry-until-green repair loop, schedule autonomous agent work, design a produce-validate-fix pipeline, or debug a loop that stalls, over-reaches, or burns tokens; trigger on /goal, /loop, /schedule, cron-like agent automation, "keep doing X until Y", iterative repair, self-healing pipelines, or agent-loop questions for any runtime including Claude Code, Claude Agent SDK, OpenAI Codex, and OpenClaw.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.4 KB |
| references/tool_claude_agent_sdk.md | markdown | 6.6 KB |
| references/tool_claude_code.md | markdown | 2.6 KB |
| references/tool_codex_repair_loops.md | markdown | 2.7 KB |
| references/tool_openclaw.md | markdown | 2.9 KB |
references/tool_claude_code.md
View on GitHub# Loop types (from claude.com/blog/getting-started-with-loops)
Loops = "agents repeating cycles of work until a stop condition is met." Categorized by trigger, stop criteria, primitives, and task fit.
## Turn-based loops
- **Trigger:** user prompt. **Stop:** Claude determines completion or needs context.
- **Best for:** shorter tasks outside regular processes.
- Encode verification as skills: e.g. "Verify any UI change end-to-end before declaring it done" — start dev servers, interact with changes, check console errors, run performance audits.
## Goal-based loops (`/goal`)
- **Trigger:** manual real-time prompt. **Stop:** goal achieved or max turns reached.
- **Best for:** tasks with verifiable exit criteria.
- Example: `/goal get the homepage Lighthouse score to 90 or above, stop after 5 tries.`
- An evaluator model checks whether success criteria are met before allowing the agent to stop.
## Time-based loops (`/loop` and `/schedule`)
- **Trigger:** specified time intervals. **Stop:** user cancellation or work completion.
- **Best for:** recurring work or monitoring external systems.
- `/loop` runs locally on your machine; `/schedule` runs in the cloud for autonomous operation.
- Example: `/loop 5m check my PR, address review comments, and fix failing CI`
## Proactive loops
- **Trigger:** events or schedules without real-time human involvement. **Stop:** individual tasks exit when goals met; the routine runs until disabled.
- **Best for:** recurring, well-defined work streams.
- Compose primitives: `/schedule every hour: check #project-feedback for bug reports. /goal: don't stop until every report found this run is triaged, actioned, and responded to.`
## Managing code quality in loops
- Keep the codebase clean enough for Claude to follow.
- Encode verification as skills using quantitative checks.
- Make documentation easily accessible.
- Use a second agent for code review to reduce self-review bias.
- When issues arise, encode the fix systematically (skill/CLAUDE.md) so all future iterations improve.
## Token usage management
- Match primitives and models to task complexity.
- Define specific success and stop criteria — vague goals burn tokens.
- Pilot before large-scale runs.
- Use scripts for deterministic work instead of reasoning through steps.
- Match routine intervals to actual change frequency of the thing being watched.
- Review usage via `/usage`.
## Getting started heuristic
Identify bottleneck tasks and check: (1) can you write verification checks? (2) can you define completion clearly? (3) is there a scheduled work pattern? Then run the loop, observe where it stalls or over-reaches, and iterate.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate 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. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |