autonomous-loops
🤖 AI Summary
This skill provides patterns and reference implementations for running Claude Code in autonomous loops, from simple `claude -p` pipelines to complex multi-agent DAG orchestration with parallel agents and merge coordination.
How to Install
Claude Code:
git clone --depth 1 https://github.com/affaan-m/ECC.git && cp ECC/skills/autonomous-loops ~/.claude/skills/autonomous-loops -r# 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
Details
| Category | AI/ML → ml |
| Source | affaan-m/ECC |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 220.5K |
| Est. per Skill | N/A (shared across 121 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | N/A |
Related Skills
ai-product
AI Product Development Every product will be AI-powered. The question is whether you'll build it rig
agentfolio
AgentFolio Role: Autonomous Agent Discovery Guide Use this skill when you want to discover, compare,
pptx-official
PPTX creation, editing, and analysis Overview A user may ask you to create, edit, or analyze the con
seo-fundamentals
SEO Fundamentals Foundational principles for sustainable search visibility. This skill explains how
Works Well With
Skills from the same repository — often designed to work together
accessibility
Accessibility (WCAG 2.2) This skill ensures that digital interfaces are Perceivable, Operable, Under
agent-architecture-audit
Agent Architecture Audit A diagnostic workflow for agent systems that hide failures behind wrapper l
agent-eval
Agent Eval Skill A lightweight CLI tool for comparing coding agents head-to-head on reproducible tas