autonomous-loops
Fungsinya
Tool ini membantu membuat workflow otomatis agar AI bisa mengerjakan tugas pemrograman secara berulang tanpa campur tangan Anda di setiap langkah. Tersedia berbagai cara untuk mengatur tugas ini, mulai dari urutan sederhana hingga sistem yang lebih kompleks dengan banyak agen.
Kapan dipakai
- βMengotomatiskan tugas pengembangan kode yang berulang.
- βMengatur proyek pemrograman menjadi langkah-langkah kecil yang berurutan.
- βMembangun pipeline pengembangan berkelanjutan, mirip dengan CI/CD.
Link skill
https://github.com/affaan-m/ECC/blob/main/skills/autonomous-loops/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuat workflow untuk mengimplementasikan fitur baru, mengujinya, lalu membersihkan kodenya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Anda mendefinisikan serangkaian perintah atau langkah yang harus diikuti AI secara berurutan. Setiap langkah bisa berupa tugas spesifik, seperti menulis kode, menguji, atau meninjau, dan AI menjalankannya satu per satu.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Autonomous Loops Skill
Compatibility note (v1.8.0):
autonomous-loopsis retained for one release. The canonical skill name is nowcontinuous-agent-loop. New loop guidance should be authored there, while this skill remains available to avoid breaking existing workflows.
Patterns, architectures, and reference implementations for running Claude Code autonomously in loops. Covers everything from simple claude -p pipelines to full RFC-driven multi-agent DAG orchestration.
When to Use
- Setting up autonomous development workflows that run without human intervention
- Choosing the right loop architecture for your problem (simple vs complex)
- Building CI/CD-style continuous development pipelines
- Running parallel agents with merge coordination
- Implementing context persistence across loop iterations
- Adding quality gates and cleanup passes to autonomous workflows
Loop Pattern Spectrum
From simplest to most sophisticated:
| Pattern | Complexity | Best For |
|---|---|---|
| Sequential Pipeline | Low | Daily dev steps, scripted workflows |
| NanoClaw REPL | Low | Interactive persistent sessions |
| Infinite Agentic Loop | Medium | Parallel content generation, spec-driven work |
| Continuous Claude PR Loop | Medium | Multi-day iterative projects with CI gates |
| De-Sloppify Pattern | Add-on | Quality cleanup after any Implementer step |
| Ralphinho / RFC-Driven DAG | High | Large features, multi-unit parallel work with merge queue |
1. Sequential Pipeline (claude -p)
The simplest loop. Break daily development into a sequence of non-interactive claude -p calls. Each call is a focused step with a clear prompt.
Core Insight
If you can't figure out a loop like this, it means you can't even drive the LLM to fix your code in interactive mode.
The claude -p flag runs Claude Code non-interactively with a prompt, exits when done. Chain calls to build a pipeline:
#!/bin/bash
# daily-dev.sh β Sequential pipeline for a feature branch
set -e
# Step 1: Implement the feature
claude -p "Read the spec in docs/auth-spec.md. Implement OAuth2 login in src/auth/. Write tests first (TDD). Do NOT create any new documentation files."
# Step 2: De-sloppify (cleanup pass)
claude -p "Review all files changed by the previous commit. Remove any unnecessary type tests, overly defensive checks, or testing of language features (e.g., testing that TypeScript generics work). Keep real business logic tests. Run the test suite after cleanup."
# Step 3: Verify
claude -p "Run the full build, lint, type check, and test suite. Fix any failures. Do not add new features."
# Step 4: Commit
claude -p "Create a conventional commit for all staged changes. Use 'feat: add OAuth2 login flow' as the message."
Key Design Principles
- Each step is isolated β A fresh context window per
claude -pcall means no context bleed between steps. - Order matters β Steps execute sequentially. Each builds on the filesystem state left by the previous.
- Negative instructions are dangerous β Don't say "don't test type systems." Instead, add a separate cleanup step (see De-Sloppify Pattern).
- Exit codes propagate β
set -estops the pipeline on failure.
Variations
With model routing:
# Research with Opus (deep reasoning)
claude -p --model opus "Analyze the codebase architecture and write a plan for adding caching..."
# Implement with Sonnet (fast, capable)
claude -p "Implement the caching layer according to the plan in docs/caching-plan.md..."
# Review with Opus (thorough)
claude -p --model opus "Review all changes for security issues, race conditions, and edge cases..."
With environment context:
# Pass context via files, not prompt length
echo "Focus areas: auth module, API rate limiting" > .claude-context.md
claude -p "Read .claude-context.md for priorities. Work through them in order."
rm .claude-context.md
With --allowedTools restrictions:
# Read-only analysis pass
claude -p --allowedTools "Read,Grep,Glob" "Audit this codebase for security vulnerabilities..."
# Write-only implementation pass
claude -p --allowedTools "Read,Write,Edit,Bash" "Implement the fixes from security-audit.md..."
β¦
Pertanyaan umum
Apa perbedaan antara jenis-jenis loop?
Loop memiliki tingkat kompleksitas yang berbeda. 'Sequential Pipeline' adalah daftar tugas sederhana, sedangkan 'Infinite Agentic Loop' menggunakan beberapa agen yang bekerja bersama secara paralel dengan rencana yang lebih rinci.
Bisakah saya menggunakan model AI yang berbeda untuk setiap langkah?
Bisa. Anda dapat mengatur penggunaan model yang berbeda (seperti Opus atau Sonnet) tergantung pada tingkat kompleksitas atau jenis tugas di setiap langkah workflow Anda.
Apa yang terjadi jika sebuah langkah gagal?
Jika sistem diatur dengan benar (menggunakan `set -e`), seluruh urutan tugas akan berhenti sehingga langkah berikutnya tidak dijalankan dengan error.
Detail
Deskripsi asli dari pembuat
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.
repo: affaan-m/ECC
Popularitas
- Bintang GitHub
- 280k
- Peringkat
- #266
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
accessibility
280kMembantu agent Anda membuat antarmuka yang ramah untuk semua orang. Memastikan website dan aplikasi tetap bisa dipakai penyandang disabilitas, seperti tunanetra.
agent-architecture-audit
280kMembuat agent Anda memeriksa apakah semuanya berjalan dengan benar. Agent akan menemukan dan memperbaiki masalah pada sistem AI agar bekerja sesuai harapan.
agent-eval
280kMembantu agent Anda membandingkan berbagai alat coding AI. Mengukur mana yang lebih cepat, lebih murah, dan lebih andal untuk tugas tertentu.
agent-harness-construction
280kMembuat agent Anda lebih memahami cara menyelesaikan tugas. Agent mengoptimalkan alat dan instruksi yang digunakan agar peluang berhasilnya lebih besar.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.