# Autonomous loops

> Autonomous loops is an open-source agent skill for developer tools. Patterns for running Claude Code autonomously in loops, from simple pipelines. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/smartworldarafath/REA_Skill/tree/main/.agents/skills/autonomous-loops
- **Repository:** https://github.com/smartworldarafath/rea_skill
- **GitHub stars:** 66
- **License:** MIT
- **Skill name:** autonomous-loops
- **Collection:** https://github.com/smartworldarafath/REA_Skill
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill is a reference guide for designing autonomous Claude Code workflows that run without a human in the loop. It walks through a spectrum of loop architectures, starting with sequential chains of non-interactive claude -p calls, moving to a persistent session REPL, parallel sub-agent generation driven by a specification file, a continuous pull-request loop that waits on CI and merges, and an RFC-driven orchestration that splits a spec into a dependency graph with tiered quality stages and a merge queue.

The guide explains practical concerns such as keeping state between iterations with a shared notes file, capturing failure context instead of blindly retrying, adding a separate cleanup pass rather than negative instructions, and setting exit conditions through run limits, cost caps, time limits or completion signals. It includes example shell scripts, command templates and a decision matrix for picking a pattern.

The skill is marked as retained for compatibility only. Its frontmatter points readers to continuous-agent-loop for new loop guidance. It contains no bundled scripts; the examples are illustrative and depend on the Claude Code CLI and, for some patterns, GitHub CLI or external tools.

## When your agent uses it

> Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems. Retained for compatibility only: when new autonomous loop guidance is needed, use continuous-agent-loop instead.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/autonomous-loops)
- [License: MIT](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/autonomous-loops)

## Features

- **Loop architecture spectrum:** Compares simple sequential pipelines, interactive sessions, parallel generation and DAG orchestration so you can match a loop to the task.
- **Sequential claude -p pipelines:** Shows how to chain non-interactive Claude Code calls in a shell script with fail-fast exit handling and model routing.
- **Cross-iteration context notes:** Describes keeping a shared progress file between independent agent runs so each iteration picks up where the last stopped.
- **De-sloppify cleanup pass:** Explains adding a separate review step that removes low-value tests and redundant checks after an implementation step.
- **Continuous PR and CI loop:** Covers creating branches and pull requests, waiting for checks, retrying CI failures and merging, with cost and time limits.
- **RFC-driven DAG orchestration:** Outlines decomposing a spec into work units, tiered quality pipelines per unit and a merge queue with conflict eviction.

## Good for

- Set up a nightly script that implements a feature, cleans up, runs checks and commits
- Run repeated improvement iterations on a repo with a cost or time cap
- Split a written RFC into parallel work units and land them through a merge queue
- Generate many spec-driven variations in parallel with separate sub-agents
- Choose between a simple pipeline and a multi-agent workflow for a given project

## Install

### Claude Code

This skill ships in the `rea-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath
```

Or copy only this skill to `~/.claude/skills/autonomous-loops`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/autonomous-loops &&
cp -R "$tmp/.agents/skills/autonomous-loops" ~/.claude/skills/autonomous-loops &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/autonomous-loops` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/autonomous-loops` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/autonomous-loops &&
cp -R "$tmp/.agents/skills/autonomous-loops" ~/.agents/skills/autonomous-loops &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/autonomous-loops` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/autonomous-loops` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/autonomous-loops &&
cp -R "$tmp/.agents/skills/autonomous-loops" ~/.cursor/skills/autonomous-loops &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/autonomous-loops` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/autonomous-loops
```

Or copy the folder to `~/.gemini/skills/autonomous-loops` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/autonomous-loops`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/autonomous-loops &&
cp -R "$tmp/.agents/skills/autonomous-loops" ~/.copilot/skills/autonomous-loops &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/autonomous-loops` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git
```

Then copy `REA_Skill/.agents/skills/autonomous-loops` into your agent's skills folder as `autonomous-loops`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Is Autonomous loops still the recommended one for new loop guidance?

No. The skill notes that it is retained for one release for compatibility, and new loop guidance should go to continuous-agent-loop.

### Does Autonomous loops install scripts or tools for me?

No bundled scripts are included. The examples call the Claude Code CLI and some reference external tools such as continuous-claude, gh and jj, which must be installed separately.

### Which clients does Autonomous loops work with?

The content is written for Claude Code, so it is tied to that client's CLI and workflows.

### How do I install Autonomous loops in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/autonomous-loops to use it in all your projects, or to .claude/skills/autonomous-loops in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

### Does Autonomous loops run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Autonomous loops?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Autonomous loops?

The closest alternatives to Autonomous loops are Continuous agent loop, Orchestration, Agentic os, Autonomous agent harness and Patterns.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Continuous agent loop](https://ai-powered.com/skills/continuous-agent-loop): Continuous agent loop is an open-source agent skill for developer tools.
- [Orchestration](https://ai-powered.com/skills/orchestration-xiaolai): Orchestration is an open-source agent skill for developer tools.
- [Agentic os](https://ai-powered.com/skills/agentic-os-smartworldarafath): Agentic os is an open-source agent skill for developer tools.
- [Autonomous agent harness](https://ai-powered.com/skills/autonomous-agent-harness): Autonomous agent harness is an open-source agent skill for developer tools.
- [Patterns](https://ai-powered.com/skills/patterns-xiaolai): Patterns is an open-source agent skill for developer tools.
- [Ecc workflow](https://ai-powered.com/skills/ecc-workflow): Ecc workflow is an open-source agent skill for developer tools.
- [Writing agents](https://ai-powered.com/skills/writing-agents-xiaolai): Writing agents is an open-source agent skill for developer tools.
- [Principle never block on the human](https://ai-powered.com/skills/principle-never-block-on-the-human): Principle never block on the human is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/autonomous-loops
