autonomous-loops

Implements autonomous Claude Code loop architectures from sequential pipelines to multi-agent DAG orchestration.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Femad-6/my-skills --skill autonomous-loops-femad-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autonomous-loops
Source: https://github.com/Femad-6/my-skills/tree/main/.github/skills/autonomous-loops
Command: npx skills add https://github.com/Femad-6/my-skills --skill autonomous-loops-femad-6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running Claude Code autonomously over long tasks requires choosing and wiring the right loop architecture, and ad-hoc setups often fail due to context loss between iterations, merge conflicts in parallel work, or low-quality output from unconstrained agents. ## Core Features & Use Cases - Loop Pattern Spectrum: Six documented architectures ranging from simple claude -p sequential pipelines and the NanoClaw REPL to the Infinite Agentic Loop, Continuous Claude PR loop, and RFC-driven DAG orchestration (Ralphinho). - Quality Patterns: The De-Sloppify cleanup pass, tiered complexity pipelines, separate reviewer context windows, and merge-queue eviction recovery with full conflict context. - Use Case: A team with a written RFC for a large feature decomposes it into dependency-ordered work units, runs each through research/plan/implement/test/review stages in isolated worktrees, and lands them via an automated merge queue. ## Quick Start Ask the agent to set up a sequential claude -p pipeline that implements a feature with TDD, runs a de-sloppify cleanup pass, verifies the build, and commits the result.

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?

Use the claude -p flag to run Claude Code non-interactively with a prompt, then chain calls in a shell script with set -e so each step builds on the previous one's filesystem state. Add exit conditions like max-runs, max-cost, or a completion signal to prevent infinite loops.

What is the difference between a sequential pipeline and the Continuous Claude PR loop?

A sequential pipeline chains claude -p calls for scripted, single-focus tasks, while the Continuous Claude PR loop creates branches, opens PRs, waits for CI checks, auto-fixes failures, and merges across many iterations. Use the PR loop for multi-day iterative projects and pipelines for daily scripted steps.

How do I keep context between autonomous Claude iterations?

Each claude -p call starts with a fresh context window, so bridge iterations with a SHARED_TASK_NOTES.md file that Claude reads at the start and updates at the end of each iteration. Filesystem state and context files passed via prompts also work.

When should I use RFC-driven DAG orchestration instead of simpler loops?

Use DAG orchestration when you have a written RFC, multiple interdependent work units, and a need for parallel implementation with merge coordination. For single-file changes or quick iteration, a sequential pipeline or NanoClaw session is simpler and sufficient.

Why does my autonomous agent generate low-quality or bloated tests?

LLMs instructed to do TDD often add tests for language features and overly defensive checks. Instead of negative instructions in the implementer prompt, add a separate de-sloppify pass where a fresh agent removes test slop while keeping business logic tests.

How do parallel agents avoid merge conflicts in autonomous workflows?

Assign each agent a unique work unit with minimal file overlap, run units in isolated worktrees, and land them through a merge queue that rebases onto main and runs tests. Evicted units re-enter with full conflict context so the next attempt resolves the collision.