帮助开发者设计和选择自治式 Claude Code 循环架构与实现模式。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "autonomous-loops" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/autonomous-loops/SKILL.md 2. 保存为 ~/.claude/skills/autonomous-loops/SKILL.md 3. 装好后重载技能,告诉我可以用了
我想让 Claude Code 自动完成一个中等复杂度的功能开发,并在每轮后做校验。请根据 autonomous-loops 的模式,比较顺序流水线、持续 PR 循环和 RFC 驱动 DAG,并推荐适合方案与理由。
给出不同循环架构的对比、适用场景以及推荐方案。
请为“实现 OAuth2 登录功能”生成一个 autonomous-loops 风格的顺序流水线,包含实现、清理、验证、提交四步,每步都输出可直接用于 claude -p 的提示词。
一组按步骤组织的非交互式提示词,可直接串联成自动开发流程。
我有一个大型功能需要拆成多个并行开发单元。请基于 autonomous-loops 说明如何使用 RFC 驱动的多代理 DAG 编排,并补充合并协调、质量闸门和上下文持久化建议。
一个面向大型项目的并行自治工作流设计说明。
开发者或团队需要让 Claude Code 在较少人工干预下持续执行开发任务时,可用该技能选择合适的循环模式并组织步骤化流程。
适用于需要像 CI/CD 一样持续迭代代码的场景,可在循环中加入验证、清理和质量检查步骤,减少低质量输出进入下一轮。
当大型功能需要拆分为多个并行单元时,可参考其 RFC 驱动多代理 DAG 模式,处理并行执行与合并协调问题。
文档介绍了如何让 Claude Code 以自治循环方式运行,覆盖从简单的 claude -p 顺序流水线,到交互式会话、持续 PR 循环、质量清理附加模式,再到 RFC 驱动的多代理 DAG 编排。内容重点包括适用场景、复杂度分层,以及在持续开发中加入并行协作、上下文持久化和质量闸门的方法。
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.
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 |
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.
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."
claude -p call means no context bleed between steps.set -e stops the pipeline on failure.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:
…
它提供运行 Claude Code 自治循环的模式、架构和参考实现,从简单的顺序流水线到 RFC 驱动的多代理 DAG 编排。重点是帮助用户为不同复杂度的自动化开发任务选择合适方案。
文档提到它适合无人值守开发工作流、CI/CD 风格持续开发、并行代理协作、上下文持久化,以及在循环中加入质量闸门和清理步骤等场景。
文档说明在 v1.8.0 中,autonomous-loops 仅作为保留名称继续提供一个版本,规范名称已改为 continuous-agent-loop。新的循环指导应写在后者中。
帮助开发者落实 Django 安全最佳实践,构建更安全的认证、授权与部署方案。
扫描多项技能并提炼通用规则,自动追加、修订或新建规则文件。
提供面向生产后端的 MySQL 与 MariaDB 设计、查询与运维模式建议。
帮助你判断解析结构化文本时何时用正则、何时引入大模型兜底。
用于 Laravel 项目的环境检查、测试、安全扫描与发布验收
提供地道 Kotlin 模式与最佳实践,帮助构建健壮高效且易维护的应用。
自动分批执行开发任务,帮助你在离线时持续完成编码与迭代。
提供面向 Claude Code 的生产级开发工作流与多代理协作方案
集成多种 Claude Code 工作流,提升开发测试、评审与自动化协作效率
通过 Claude DevFleet 规划并调度多代理并行编码任务,跟踪进度并读取结构化报告。
让多个 Claude Code 代理彼此通信并协同完成开发任务。
帮助 Claude Code 记录反馈与偏好,并自动同步到项目记忆文档中。