
Autonomous Loops
Design and run Claude Code loops—from simple `claude -p` pipelines to RFC-driven multi-agent DAGs—so solo builders can ship features without babysitting every agent turn.
Overview
Autonomous-loops is an agent skill most often used in Build (also Ship, Operate) that documents patterns for autonomous Claude Code loops—from sequential pipelines to RFC-driven multi-agent DAG orchestration.
Install
npx skills add https://github.com/affaan-m/everything-claude-code --skill autonomous-loopsWhat is this skill?
- Spectrum from low-complexity sequential `claude -p` pipelines to medium-complexity infinite agentic loops and sophistica
- Patterns for parallel agents with merge coordination and CI/CD-style continuous development pipelines
- Guidance on context persistence across loop iterations and quality gates plus cleanup passes
- Covers NanoClaw REPL-style persistent sessions and choosing architecture by problem complexity
- Compatibility note: retained one release; new loop guidance should move to `continuous-agent-loop`
- Documents a loop pattern spectrum from low-complexity sequential pipelines through RFC-driven multi-agent DAG systems
- Compatibility retention: canonical skill name is `continuous-agent-loop` as of v1.8.0 note in SKILL.md
Adoption & trust: 4.7k installs on skills.sh; 210k GitHub stars; 0/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want Claude Code to keep working in loops, but ad-hoc prompts do not tell you which architecture fits parallel agents, persistence, or quality gates.
Who is it for?
Solo builders running Claude Code in CI-style or overnight autonomous dev who need a structured menu of loop architectures before investing in multi-agent DAGs.
Skip if: One-shot chat tasks, non-Claude agents with no loop runtime, or teams that already standardized on `continuous-agent-loop` and only need net-new loop docs there.
When should I use this skill?
Setting up autonomous development workflows, choosing loop architecture, building CI/CD-style continuous pipelines, parallel agents with merge coordination, context persistence, or quality gates on autonomous runs.
What do I get? / Deliverables
You pick a loop pattern on the complexity spectrum, wire persistence and gates, and align new guidance with `continuous-agent-loop` when you outgrow this retained skill.
- Chosen loop architecture (pipeline, REPL, infinite loop, or DAG)
- Documented quality gates and cleanup passes
- Handoff plan to `continuous-agent-loop` for new guidance
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Autonomous loops are authored and wired in the product-building phase where agent workflows, orchestration, and dev automation are set up. The skill is procedural knowledge for agent runtimes and loop architectures, not a one-off integration snippet—canonical shelf is agent-tooling.
Where it fits
Stand up a sequential `claude -p` pipeline for lint, test, and fix before merging a feature branch.
Run parallel content or codegen agents with merge coordination when a single serial loop is too slow.
Mirror CI/CD continuous development so pre-release fixes roll through gated autonomous passes.
Keep a persistent REPL-style session or infinite loop for backlog burn-down with cleanup passes between iterations.
How it compares
Use as an orchestration playbook for agent loops, not as a single MCP tool or a manual code-review checklist.
Common Questions / FAQ
Who is autonomous-loops for?
Indie and solo developers using Claude Code who want repeatable autonomous workflows—pipelines, parallel workers, or RFC-driven DAGs—without designing the pattern from scratch each time.
When should I use autonomous-loops?
During Build when wiring agent-tooling; during Ship when modeling CI/CD-style continuous dev; during Operate when iterating long-running agent loops with quality gates and context persistence across runs.
Is autonomous-loops safe to install?
Autonomous loops can run shell, git, and filesystem operations depending on how you implement them—review the Security Audits panel on this page and constrain permissions in your loop config before unattended runs.
Workflow Chain
Then invoke: continuous agent loop
SKILL.md
READMESKILL.md - Autonomous Loops
# Autonomous Loops Skill > Compatibility note (v1.8.0): `autonomous-loops` is retained for one release. > The canonical skill name is now `continuous-agent-loop`. New loop guidance > should be authored there, while this skill remains available to avoid > breaking existing workflows. Patterns, architectures, and reference implementations for running Claude Code autonomously in loops. Covers everything from simple `claude -p` pipelines to full RFC-driven multi-agent DAG orchestration. ## When to Use - Setting up autonomous development workflows that run without human intervention - Choosing the right loop architecture for your problem (simple vs complex) - Building CI/CD-style continuous development pipelines - Running parallel agents with merge coordination - Implementing context persistence across loop iterations - Adding quality gates and cleanup passes to autonomous workflows ## Loop Pattern Spectrum From simplest to most sophisticated: | Pattern | Complexity | Best For | |---------|-----------|----------| | [Sequential Pipeline](#1-sequential-pipeline-claude--p) | Low | Daily dev steps, scripted workflows | | [NanoClaw REPL](#2-nanoclaw-repl) | Low | Interactive persistent sessions | | [Infinite Agentic Loop](#3-infinite-agentic-loop) | Medium | Parallel content generation, spec-driven work | | [Continuous Claude PR Loop](#4-continuous-claude-pr-loop) | Medium | Multi-day iterative projects with CI gates | | [De-Sloppify Pattern](#5-the-de-sloppify-pattern) | Add-on | Quality cleanup after any Implementer step | | [Ralphinho / RFC-Driven DAG](#6-ralphinho--rfc-driven-dag-orchestration) | High | Large features, multi-unit parallel work with merge queue | --- ## 1. Sequential Pipeline (`claude -p`) **The simplest loop.** Break daily development into a sequence of non-interactive `claude -p` calls. Each call is a focused step with a clear prompt. ### Core Insight > If you can't figure out a loop like this, it means you can't even drive the LLM to fix your code in interactive mode. The `claude -p` flag runs Claude Code non-interactively with a prompt, exits when done. Chain calls to build a pipeline: ```bash #!/bin/bash # daily-dev.sh — Sequential pipeline for a feature branch set -e # Step 1: Implement the feature claude -p "Read the spec in docs/auth-spec.md. Implement OAuth2 login in src/auth/. Write tests first (TDD). Do NOT create any new documentation files." # Step 2: De-sloppify (cleanup pass) claude -p "Review all files changed by the previous commit. Remove any unnecessary type tests, overly defensive checks, or testing of language features (e.g., testing that TypeScript generics work). Keep real business logic tests. Run the test suite after cleanup." # Step 3: Verify claude -p "Run the full build, lint, type check, and test suite. Fix any failures. Do not add new features." # Step 4: Commit claude -p "Create a conventional commit for all staged changes. Use 'feat: add OAuth2 login flow' as the message." ``` ### Key Design Principles 1. **Each step is isolated** — A fresh context window per `claude -p` call means no context bleed between steps. 2. **Order matters** — Steps execute sequentially. Each builds on the filesystem state left by the previous. 3. **Negative instructions are dangerous** — Don't say "don't test type systems." Instead, add a separate cleanup step (see [De-Sloppify Pattern](#5-the-de-sloppify-pattern)). 4. **Exit codes propagate** — `set -e` stops the pipeline on failure. ### Variations **With model routing:** ```bash # Research with Opus (deep reasoning) claude -p --model opus "Analyze the codebase architecture and write a plan for adding caching..." # Implement with Sonnet (fast, capable) claude -p "Implement the caching layer according to the plan in docs/caching-plan.md..." # Re