autonomous-loops
ما الذي تفعله
تساعد هذه المهارة على إنشاء سير عمل آلي، حتى يتمكن الذكاء الاصطناعي من تنفيذ مهام البرمجة بشكل متكرر دون تدخلك في كل خطوة. وتوفر طرقًا مختلفة لتنظيم هذه المهام، من تسلسلات بسيطة إلى أنظمة أكثر تعقيدًا مع عدة وكلاء.
متى تستخدمها
- ✓أتمتة مهام تطوير الكود المتكررة.
- ✓تنظيم مشروع برمجي في خطوات صغيرة متتابعة.
- ✓بناء خطوط تطوير مستمرة، شبيهة بـ CI/CD.
رابط المهارة
https://github.com/affaan-m/ECC/blob/main/skills/autonomous-loops/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أنشئ سير عمل لتنفيذ ميزة جديدة، ثم اختبرها، ثم نظّف الكود.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تحدد سلسلة من الأوامر أو الخطوات ينفذها الذكاء الاصطناعي بالترتيب. كل خطوة يمكن أن تكون مهمة محددة، مثل كتابة الكود أو اختباره أو مراجعته، ويُنفّذها الذكاء الاصطناعي واحدة بعد الأخرى.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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..."
…
الأسئلة الشائعة
ما الفرق بين أنواع الحلقات؟
تختلف الحلقات في التعقيد. «خط الأنابيب التسلسلي» (Sequential Pipeline) قائمة بسيطة من المهام. أما «الحلقة الوكيلية اللانهائية» (Infinite Agentic Loop) فتستخدم عدة وكلاء يعملون معًا بالتوازي، وفق خطة أكثر تفصيلًا.
هل أستطيع استخدام نماذج ذكاء اصطناعي مختلفة لكل خطوة؟
نعم، يمكنك ضبطها لاستخدام نماذج مختلفة (مثل Opus أو Sonnet) حسب تعقيد كل خطوة أو نوعها.
ماذا يحدث إذا فشلت خطوة؟
إذا فشلت خطوة وكان النظام مضبوطًا بشكل صحيح (باستخدام `set -e`)، يتوقف تسلسل المهام كله، فلا تُنفّذ الخطوات التالية بأخطاء.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 280k
- الترتيب
- #266
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
accessibility
280kيساعد وكيلك على بناء واجهات يستطيع الجميع استعمالها، ويضمن عمل المواقع والتطبيقات جيدًا لذوي الإعاقة، كالمكفوفين وذوي الحركة المحدودة.
agent-architecture-audit
280kيتأكد وكيلك من أن كل شيء يعمل بشكل صحيح، ويجد مشكلات أنظمة الذكاء الاصطناعي ويصلحها، ليؤدي كما هو متوقع.
agent-eval
280kيساعد وكيلك على مقارنة أدوات البرمجة بالذكاء الاصطناعي المختلفة، ويقيس أيها أسرع وأرخص وأكثر موثوقية لمهام محددة.
agent-harness-construction
280kيساعد وكيلك على فهم طريقة إنجاز المهام بشكل أفضل، عبر تحسين الأدوات والتعليمات التي يستعملها لزيادة فرص نجاحه.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.