autonomous-loops
/install autonomous-loops
Autonomous Loops — Patterns for Claude Code Automation
Running Claude in loops enables spec-driven development, CI/CD-style pipelines, and iterative refinement without human intervention between steps.
Quick Start
Choose your pattern by complexity:
- Sequential Pipeline (simple) — Chain
claude -pcalls for linear workflows - Persistent REPL (simple) — Interactive sessions with history
- Spec-Driven Parallel (medium) — Deploy N agents from spec, manage waves
- PR Automation Loop (medium) — PR creation, CI fix, auto-merge
- De-Sloppify Pass (add-on) — Cleanup step after any implementation
- RFC-Driven DAG (advanced) — Multi-unit parallel work with dependency graph
Pattern Spectrum
| Pattern | Setup | Complexity | Best For |
|---|---|---|---|
| Sequential Pipeline | Bash script | Low | Daily tasks, scripted workflows |
| REPL | Node/CLI | Low | Interactive development |
| Parallel Agents | Claude Code loop | Medium | Content generation, spec variations |
| PR Loop | Shell script | Medium | Iterative multi-day projects |
| De-Sloppify | Add-on to any | Optional | Quality cleanup after implementation |
| DAG Orchestration | Python/Node | High | Large features, parallel units, merge coordination |
References
references/sequential-pipeline.md— Basicclaude -ploops with examplesreferences/persistent-repl.md— NanoClaw-style session persistencereferences/parallel-agents.md— Spec-driven deployment with wave managementreferences/pr-automation.md— Continuous Claude PR loop with CI gatesreferences/de-sloppify.md— Quality cleanup patternreferences/dag-orchestration.md— RFC-driven multi-unit coordination
Key Principles
- Isolation — Each loop iteration gets fresh context (no bleed-through)
- Context Persistence — Use files (SHARED_TASK_NOTES.md) to bridge iterations
- Exit Conditions — Always set max-runs, max-cost, max-duration, or completion signal
- No Blind Retries — Capture error context for next iteration
- Separate Concerns — Different loop patterns for different problem sizes
Decision Matrix
Is this a single focused change?
├─ Yes → Sequential Pipeline
└─ No → Do you have a spec/RFC?
├─ Yes → Do you need parallel work?
│ ├─ Yes → DAG Orchestration
│ └─ No → PR Automation Loop
└─ No → Do you need many variations?
├─ Yes → Parallel Agents + Spec
└─ No → Sequential Pipeline + De-Sloppify
Anti-Patterns
❌ Infinite loops without exit conditions ❌ No context bridge between iterations ❌ Retrying the same failure without capturing error context ❌ Negative instructions instead of cleanup passes ❌ All agents in one context window (reviewer should never be the author) ❌ Ignoring file overlap in parallel work
Adapted from everything-claude-code by @affaan-m (MIT)
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install autonomous-loops - 安装完成后,直接呼叫该 Skill 的名称或使用
/autonomous-loops触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
autonomous-loops 是什么?
Autonomous Claude Code loop patterns: sequential pipelines, persistent REPL sessions, parallel spec-driven generation, PR automation, cleanup passes, and RFC... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 127 次。
如何安装 autonomous-loops?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install autonomous-loops」即可一键安装,无需额外配置。
autonomous-loops 是免费的吗?
是的,autonomous-loops 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
autonomous-loops 支持哪些平台?
autonomous-loops 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 autonomous-loops?
由 Deonte Cooper(@djc00p)开发并维护,当前版本 v1.0.1。