Skip to content

Guide · Agent skill

How to use the Autonomous Loops Patterns agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The autonomous-loops skill gives an AI agent a reference guide for running Claude Code repeatedly and automatically, without a person approving each step. It covers loop designs ranging from a simple ordered sequence of non-interactive claude -p calls to large RFC-driven multi-agent DAG systems. It is aimed at developers who script or automate coding work, and after this guide you will know how to install the skill, trigger it with plain requests and judge whether the example pipeline is safe for your project.

Autonomous Loops Patternsaffaan-m/ECC · MIT

Quick start

  1. 1Check the requirements. Install the Claude Code CLI, confirm the claude command accepts the -p flag, and make sure a Bash shell is available for the example script. You also need an Anthropic account or API access.
  2. 2Download and unzip the skill. Download the autonomous-loops ZIP from this page and unzip it so you have an autonomous-loops folder containing SKILL.md.
  3. 3Place the folder in a skills directory. Move the folder to ~/.claude/skills/ for all projects, or to the project's .claude/skills/ folder for one repository. In the Claude apps, upload it under Settings → Capabilities → Skills instead.
  4. 4Describe your loop in plain language. Ask the agent to design an unattended workflow, for example a feature implementation followed by cleanup, tests and a commit.
  5. 5Choose the simplest architecture that fits. Use the pattern table to decide between an ordered pipeline and a multi-agent setup based on how large and parallel the work is.
  6. 6Adapt the example and review the result. Copy the daily-dev.sh pattern into a feature branch, replace the prompts with your own spec and checks, then review the diff and commits before merging.

What the skill makes the agent do

An agent skill is a folder with a SKILL.md file that tells the agent how to handle a certain kind of task. When this skill is active, the agent can help you choose a loop architecture that fits a problem, explain how to build the pipeline and apply a few design principles.

The skill lists six loop patterns, from the simplest to the most elaborate: an ordered pipeline, an NanoClaw REPL for interactive persistent sessions, an infinite agent loop for parallel content generation or spec-driven work, a continuous Claude PR loop for multi-day projects with CI gates, a De-Sloppify cleanup pattern that is added after any implementation step, and a Ralphinho / RFC-driven DAG for large features with a merge queue.

  • Choose between a simple pipeline and a multi-agent setup for a given problem
  • Build an ordered pipeline of non-interactive claude -p calls
  • Add a cleanup pass and a verification step after implementation
  • Design for isolated steps, order dependence and exit-code propagation

Install the skill from the ZIP or the Claude apps

Download the ZIP file for autonomous-loops from this page and unzip it. For Claude Code, place the resulting autonomous-loops folder in your user skills directory at ~/.claude/skills/, or in a project-specific .claude/skills/ folder if you want the skill available only in one repository.

In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal use across projects: ~/.claude/skills/
  • Single project only: the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills

Trigger the skill with natural requests

You do not need a special command. Describe what you want in plain language and mention loops, pipelines or automation so the agent knows the skill applies. The skill's own usage notes say it is relevant when you set up an unattended development workflow, choose the right loop architecture for a problem, build a CI/CD-style continuous development pipeline, or add quality gates to an automated workflow.

  • "Help me design an unattended loop that implements a feature, cleans it up, runs tests and commits."
  • "Should this large feature use a simple claude -p pipeline or a multi-agent setup?"
  • "Write a bash script that chains claude -p steps for a daily development task."
  • "Add a De-Sloppify cleanup step after the implementation step in our pipeline."

Example: an ordered pipeline with claude -p

The skill's main example is daily-dev.sh, a bash script for a feature branch. Each claude -p call is a separate, focused step with its own fresh context. The steps are: implement a feature from a spec, run a cleanup pass that removes unnecessary type tests and overly defensive checks, run the full build, lint, type check and test suite, and create a conventional commit.

The script starts with set -e, so a failing step stops the pipeline. Treat it as a template to adapt, not a finished tool.

#!/bin/bash # daily-dev.sh — 機能ブランチの順序パイプライン set -e # ステップ1:機能を実装 claude -p "docs/auth-spec.mdのスペックを読む。src/auth/にOAuth2ログインを実装します。TDDを最初にテストを書いてください。新しいドキュメントファイルを作成しないでください。" # ステップ2:De-sloppify(クリーンアップパス) claude -p "前回のコミットで変更されたすべてのファイルを確認します。不要なタイプテスト、過度に防御的なチェック、またはテスト言語機能を削除します(例:TypeScriptジェネリクスが機能するテスト)。実際のビジネスロジックテストを保つ。クリーンアップ後にテストスイートを実行します。" # ステップ3:検証 claude -p "完全なビルド、lint、型チェック、テストスイートを実行します。失敗を修正します。新しい機能を追加しないでください。" # ステップ4:コミット claude -p "ステージングされたすべての変更の従来的なコミットを作成します。メッセージとして「feat: add OAuth2 login flow」を使用します。"

Design principles to apply to any loop

The skill gives four principles for building loops. Following them makes a pipeline easier to debug and reason about.

  • Isolate each step: each claude -p call starts with a fresh context window, so context does not bleed between steps.
  • Respect order: steps run in sequence and each one depends on the file system state left by the previous step.
  • Avoid negative instructions: instead of telling the agent not to do something, add a separate cleanup step.
  • Propagate exit codes: set -e stops the pipeline on the first failure.

Safety: what the example can change

The example is designed to run without a human in the loop. The skill's own notes warn that running it unattended can change many files and commit code without review. Before running any pipeline like this, work in a branch, read the spec the first step uses, and make sure the verification step runs your real build and tests.

The skill does not run scripts and does not use the network itself. It is a reference document. Claude Code still needs an Anthropic account or API access to run.

  • Run unattended loops on a feature branch, not on your main branch
  • Review the commit history and diff after each run
  • Keep the cleanup and verification steps; they are the quality gates

Compatibility note: use continuous-agent-loop for new guidance

The skill is kept for one release so existing workflows do not break. The canonical name is continuous-agent-loop, and new loop guidance is meant to be written there. If you are starting a new project, look for that name first.

What people use it for

  • Automating a daily feature step: implement from a spec, clean up, verify and commit in a fixed sequence
  • Deciding whether a large feature needs a simple claude -p pipeline or an RFC-driven multi-agent DAG
  • Adding a De-Sloppify cleanup pass after any automated implementation step
  • Building a CI-style continuous development pipeline with quality gates such as build, lint, type check and tests

Frequently asked questions

How do I install the autonomous-loops skill?

Download the ZIP from this page and unzip it. Put the autonomous-loops folder in ~/.claude/skills/ for all projects, or in a project's .claude/skills/ folder for one repository. In the Claude apps, upload it under Settings → Capabilities → Skills.

What do I need to run it?

You need the Claude Code CLI with the claude command and its -p flag, a Bash shell for the example script, and an Anthropic account or API access. The skill itself runs no scripts and uses no network.

Is the autonomous-loops skill free?

The skill is released under the MIT licence, as stated on this page. Claude Code itself requires an Anthropic account or API access, and the source does not cover its pricing.

Should I use autonomous-loops or continuous-agent-loop?

The skill is kept for one release for compatibility. The file says the canonical name is continuous-agent-loop and new loop guidance belongs there, so use that name for new work.

Is it safe to run the example script unattended?

Be careful. Running it unattended can change many files and commit code without review. Use a feature branch, review the diff and keep the verification step so failures stop the pipeline.

What is the difference between a simple pipeline and a multi-agent DAG?

A simple pipeline is an ordered sequence of focused claude -p calls, each with a fresh context. The RFC-driven DAG pattern is meant for large features with several parallel units and a merge queue, and the skill rates it as high complexity.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers who want a clear reference for scripting Claude Code steps in CI or shell scripts, and teams weighing a simple pipeline against a multi-agent setup. It is not suited to non-developers, and it does not cover model routing or advanced features, which the file defers to external documentation that is not included. For new loop work, start with the continuous-agent-loop name the file recommends.

Download the skill