A skill for designing, building, and shipping verifiable AI agent loops. Compatible with any IDE or LLM agent.
Loop Factory turns repeatable tasks into closed automation: trigger + execution + verification, with cost ceilings, retry policies, and safe stopping conditions. It ships with a brainstorm mode to surface loop ideas you did not think to ask for.
Most "agent loops" in the wild are just scripts with an LLM call inside. They run until they crash, spend whatever they spend, and trust the model to self-check. Loop Factory treats a loop as an engineering artifact with a spec, a budget, a verification gate, and a failure mode.
If you cannot write the sentence "Whenever X, the agent will Y, then verify Z, stopping when W" then you do not have a loop. You have a script. Loop Factory gets you to a real loop.
/plugin marketplace add roman-ryzenadvanced/loop-factory
/plugin install loop-factory
npx skills add roman-ryzenadvanced/loop-factory -g
-g installs globally. Drop it for per-project scope.
Clone this repo. Copy the matching file from configs/ into your project root:
| Host | File |
|---|---|
| Claude Code | configs/CLAUDE.md -> .claude/CLAUDE.md |
| Cursor | configs/.cursorrules -> .cursorrules |
| Windsurf | configs/.windsurfrules -> .windsurfrules |
| Copilot | configs/copilot-instructions.md -> .github/copilot-instructions.md |
| Codex | configs/AGENT_RULES.md -> AGENTS.md |
| Gemini | gemini-extension.json |
| Generic | configs/CLINEMD.md -> AGENT.md |
Design a loop:
Use loop-factory.
Read SKILL.md, then design a loop that fixes ESLint errors on save.
Output the full 11-field loop contract.
Brainstorm loop ideas:
Use loop-factory.
Run brainstorm mode on this repo.
Output 3 to 7 candidates, scored, with top 2 recommendations.
- A 7-phase workflow from brainstorm to ship.
- A 5-dimension scoring rubric. No loop ships below the minimum.
- Ready-to-use host configs for Claude Code, Cursor, Windsurf, Copilot, Codex, Grok, Gemini.
- 5 ready-to-run loop playbooks: lint-fix, test-fix, refactor, doc-gen, review.
- A brainstorm mode that finds loops for you.
- Cost ceilings per loop type. Budget exceeded = loop stops.
- Safety boundaries: no prod without staging, no irreversible without approval.
loop-factory/
├── SKILL.md # Core protocol (read this first)
├── AGENTS.md # Canonical agent instructions
├── docs/ # Guides and methodology
├── prompts/ # System prompt, brainstorm prompt, input/output templates
├── frameworks/ # Reusable mental models (loop anatomy, scoring, brainstorm)
├── playbooks/ # Scenario-specific loop recipes
├── templates/ # Fill-in skeletons
├── examples/ # End-to-end worked examples
├── tests/ # Prompts that verify agent understanding
├── configs/ # Per-host ready-to-use configs
├── .claude-plugin/ # Claude Code plugin manifest
├── .codex-plugin/ # Codex plugin manifest
├── .grok-plugin/ # Grok plugin manifest
└── gemini-extension.json
See docs/roadmap.md.
See CONTRIBUTING.md. Pull requests welcome. Read tests/test-prompts.md first to confirm your output matches the contract.
MIT. See LICENSE.
If Loop Factory saves you a runaway bill or catches a broken agent run, star the repo so others find it.