Token导航 LogoToken导航

Agent Skill · 开发

dual-loop(双环路)

dual-loop 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dual-loop 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 15,988。

总安装 544周安装 22GitHub Stars 2下载 171核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dual-loop(双环路)
来源仓库:https://github.com/richfrem/agent-plugins-skills
仓库路径:skills/dual-loop
安装命令:
npx skills add https://github.com/richfrem/agent-plugins-skills --skill dual-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/richfrem/agent-plugins-skills --skill dual-loop

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

dual-loop 定义内外环代理委托架构,实现任务分解与结果验证的双重保障机制。适用于 Codex、Claude、Cursor、Gemini CLI 中复杂工作流的分层协调管理。外层代理负责规划与校验,内层代理专注编码执行,形成闭环质量控制体系。

无需额外依赖包,仅需 Python 3.8+ 标准库即可部署运行核心逻辑。dual-loop 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/dual-loop

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/richfrem/agent-plugins-skills --skill dual-loo…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

dual-loop 怎么安装?

在终端执行 npx skills add https://github.com/richfrem/agent-plugins-skills --skill dual-loop。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dual-loop 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dual-loop 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

dual-loop 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dual-loop 用的人多吗?

公开数据是累计安装 544 次,近一周安装 22 次,下载 171 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dual-loop 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
dual-loop

双环路 · 本页

5442需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Dependencies

This skill requires Python 3.8+ and standard library only. No external packages needed.

To install this skill's dependencies:

pip-compile ./requirements.in
pip install -r ./requirements.txt

See ../../requirements.txt for the dependency lockfile (currently empty — standard library only).


Dual-Loop (Inner/Outer Agent Delegation)

This skill defines the orchestration pattern for the Dual-Loop Agent Architecture. The Outer Loop (the directing agent) uses this protocol to organize work, delegate execution to an Inner Loop (the coding/tactical agent), and rigorously verify the results before merging.

This architecture is entirely framework-agnostic and can be utilized by any AI agent pairing (e.g., Antigravity directing Claude Code, or an OpenHands agent directing a specialized CLI sub-agent).

CRITICAL: Anti-Simulation Rules

YOU MUST ACTUALLY PERFORM THE VALIDATIONS LISTED BELOW. Describing what you "would do" or marking a step complete without actually doing the verification is a PROTOCOL VIOLATION.

Architecture Overview

flowchart LR
    subgraph Outer["Outer Loop (Strategy & Protocol)"]
        Scout[Scout & Plan] --> Spec[Define Tasks]
        Spec --> Packet[Generate Strategy Packet]
        Verify[Verify Result] -->|Pass| Commit[Seal & Commit]
        Verify -->|Fail| Correct[Generate Correction Packet]
    end

    subgraph Inner["Inner Loop (Execution)"]
        Receive[Read Packet] --> Execute[Write Code & Run Tests]
        Execute -->|No Git| Done[Signal Done]
    end

    Packet -->|Handoff| Receive
    Done -->|Completion| Verify
    Correct -->|Delta Fix| Receive

Reference: Architecture Diagram


The Workflow Loop

Step 1: The Plan (Outer Loop)

  1. Orientation: The Outer Loop agent reads the project requirements or goals.
  2. Decomposition: Break the goal down into distinct Work Packages (WPs) or sub-tasks.
  3. Verification: Confirm that the tasks are atomic, testable, and do not overlap.

Step 2: Prepare Execution Environment

  1. Isolation: Ensure a safe workspace exists for the Inner Loop. Workspace creation (e.g., worktrees, branching, ephemeral containers) is strictly a delegated responsibility of the Orchestrator or external tooling. The Dual-Loop just receives the environment.
  2. Update State: Mark the current Work Package as "In Progress" in whatever task-tracking system the project uses.

Step 3: Generate Strategy Packet (Outer Loop)

  1. Write a tightly scoped markdown document (the "Strategy Packet") specifically for the Inner Loop.
  2. Requirements for the Packet:

- The exact goal. - A Pre-Execution Workflow Commitment Diagram (an ASCII box) mapping out the steps the Inner Loop must take. - Only the specific file paths the sub-agent needs to care about. - Strict "NO GIT" constraints (the Inner Loop must not commit). - If generating scripts/pipelines, instruct the Inner Loop to use the "Modular Building Blocks" architecture (split convenience CLI wrappers from core Python APIs). - Clear Acceptance Criteria.

  1. Save the packet (e.g., handoffs/task_packet_001.md).

Step 4: Hand-off (The Bridge)

The Outer Loop invokes the Inner Loop. Depending on the environment, this is either done by spawning a sub-process (e.g., claude "Read handoffs/task_packet_001.md"), calling an API, or asking the Human User to switch terminals.

Step 5: Execute (Inner Loop)

The Inner Loop agent:

  1. Reads the packet.
  2. Writes the code.
  3. Runs the tests.
  4. Signals "Done" when the Acceptance Criteria are met (or if it gets fundamentally stuck).
*Constraint: The Inner Loop MUST NOT run version control commands.*

Step 6: Verify (Outer Loop)

Once the Inner Loop signals completion, the Outer Loop must verify the results:

  1. Delta Check: Inspect the changes (e.g., via diff tools or system state checks) to see what the Inner Loop actually altered.
  2. Test Check: Run the test suite mechanically to ensure nothing broke.
  3. Lint Check: Validate the syntax.
On Verification PASS:
  1. The Outer Loop accepts the changes.
  2. The task tracker is updated to "Done".
On Verification FAIL:
  1. The Outer Loop generates a Correction Packet using the strict Severity-Stratified Output Schema:

- 🔴 CRITICAL: The code fails to compile, tests fail, or the requested feature is entirely missing. - 🟡 MODERATE: The feature works, but violates project architecture, ADRs, or performance standards. - 🟢 MINOR: The feature works and follows architecture, but has minor naming or stylistic issues.

  1. The Outer Loop loops back to Step 4, handing the Correction Packet to the Inner Loop.

Step 7: Self-Assessment Survey (MANDATORY — Outer Loop and Inner Loop)

Before handoff, both the Outer Loop and Inner Loop MUST each complete the Post-Run Self-Assessment Survey (references/post_run_survey.md). Answer every section in full.

Count-Based Signals: How many times did you not know what to do next? Miss a step? Use wrong CLI syntax? Get redirected by a human? Total friction events?

Qualitative Friction: Where were you most uncertain? Which step felt ambiguous? What was the biggest source of friction? What one change would have helped most?

Improvement Recommendation: What one change should be tested before the next run? What is the target (Skill/Prompt/Script/Rule)?

Save to: ${CLAUDE_PROJECT_DIR}/context/memory/retrospectives/survey_[YYYYMMDD]_[HHMM]_[AGENT].md

Emit survey completion:

python3 context/kernel.py emit_event --agent <ROLE> \
  --type learning --action survey_completed \
  --summary "retrospectives/survey_[DATE]_[TIME]_[AGENT].md"

If any single friction cause appears 3+ times this cycle, flag for os-learning-loop Full Loop before the next cycle begins.

Step 8: Completion & Handoff

Once all Work Packages are verified and surveys saved, the Dual-Loop pattern is complete. The Outer Loop terminates and returns control to the global lifecycle manager (Orchestrator) for memory persistence via session-memory-manager and ecosystem sealing.


Task Lane Management

Throughout the process, the Outer Loop must maintain discipline over task states. If you are operating this loop, you must ensure you or the task tracker accurately reflects:

  1. Backlog -> Doing (When Strategy Packet is generated)
  2. Doing -> Review (When Inner Loop signals completion)
  3. Review -> Done (When Outer Loop verifies and commits)
  4. Review -> Doing (If verification fails and a Correction Packet is sent)

Workspace Isolation

Dual-Loop (Agent-Loops) does not manage workspaces. It receives an isolated directory or execution context from the Orchestrator and runs the loop inside it. Workspace creation (e.g., git worktrees, branches) is a delegated responsibility of the Orchestrator or the global system environment.

Fallback: In-Place Execution

If an isolated workspace cannot be provided:

  1. The Inner Loop codes directly in the main directory.
  2. The Outer Loop must log this lack of isolation in a friction log for the handoff to the Orchestrator.
  3. All other constraints (no system manipulation from Inner Loop out of scope, verification gate, correction packets) still apply.

Fundamental Constraints

  • No Protocol Crossing: The Inner Loop manages tacticals (code compilation, tests). The Outer Loop manages strategy (git, architecture decisions, human interactions).
  • Isolation: Strategy Packets must be minimal. Do not send the Inner Loop thousands of lines of conversation history. Give it exactly what it needs to execute the specific Work Package.

平台分布

Codex

32.34%
按下载量换算55

Claude

31.9%
按下载量换算55

Cursor

19.42%
按下载量换算33

Gemini CLI

9.11%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills