autonomous-loops

Orchestrates autonomous Claude Code loops from sequential pipelines to multi-agent DAG workflows.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill autonomous-loops-prabaljainn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: autonomous-loops
Source: https://github.com/prabaljainn/my-claude-code-setup/tree/main/claude/skills/autonomous-loops
Command: npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill autonomous-loops-prabaljainn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running Claude Code autonomously over long tasks is hard: single prompts lose context between iterations, parallel agents conflict on files, and naive loops waste money without exit conditions. This Skill provides proven patterns and reference architectures for building self-running development loops that iterate, review, and merge code without human intervention. ## Core Features & Use Cases - Loop Pattern Spectrum: Six architectures from simple claude -p sequential pipelines to RFC-driven multi-agent DAG orchestration (Ralphinho), with a decision matrix for choosing the right one. - Context Bridging & Quality Gates: Techniques like SHARED_TASK_NOTES.md for cross-iteration memory, the de-sloppify cleanup pass, and separate reviewer agents to eliminate author bias. - Bounded Autonomy: Exit conditions via max-runs, max-cost, max-duration, and completion signals, plus CI failure auto-recovery and merge-queue eviction handling. - Use Case: You want Claude to add tests across a repo overnight. Use the Continuous Claude PR loop pattern: each iteration creates a branch, runs claude -p, opens a PR, waits for CI, auto-fixes failures, merges, and repeats until the cost cap is hit. ## Quick Start Ask Claude to set up a sequential autonomous pipeline using the autonomous-loops patterns that implements a feature, runs a cleanup pass, verifies the build, and commits each step.

Frequently Asked Questions about autonomous-loops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Claude Code autonomously in a loop?▼

Chain non-interactive `claude -p` calls in a shell script, where each call is an isolated step such as implement, cleanup, verify, and commit. Use `set -e` so failures stop the pipeline, and always define exit conditions like max runs or max cost.

How do I choose between a sequential pipeline and a multi-agent DAG workflow?▼

Use a sequential pipeline for single focused changes and a DAG orchestrator like Ralphinho when you have multiple interdependent work units needing parallel implementation. The decision matrix in the Skill maps task shape, spec availability, and parallelism needs to the right pattern.

How do I preserve context between separate claude -p iterations?▼

Each `claude -p` call starts with a fresh context window, so bridge state through the filesystem. A SHARED_TASK_NOTES.md file that Claude reads at the start and updates at the end of each iteration is the standard approach.

Why should code review run in a separate agent from implementation?▼

A reviewer that wrote the code suffers author bias and misses its own mistakes. Running review in a separate agent process with its own context window, as in the Ralphinho pipeline stages, produces more objective quality and security checks.

What happens when parallel agents conflict on the same files?▼

Use a merge queue that rebases each unit onto main, runs tests, and evicts failures with full conflict context captured. The eviction context is fed back to the implementer agent so the retry resolves the conflict intelligently instead of blindly repeating.

How do I stop an autonomous loop from running forever?▼

Always set bounds: --max-runs for iteration count, --max-cost for spend, --max-duration for wall time, or a completion signal phrase that stops the loop after consecutive detections. Unbounded loops are listed as a primary anti-pattern.