Agent skill

Review Loop

by didi in didi/mpx

当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。

Apache-2.0Auto-check passedDevelopment

Install Review Loop

skills CLI
$ npx skills add didi/mpx --skill review-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install didi/mpx review-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/review-loop .claude/skills/review-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
review-loop
GitHub stars
3.9k
Token cost
~828 tokens
SKILL.md length
209 words
Files
31 (incl. scripts, references)
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。

  • Works in 2 steps: 方案循环:planner 编写或修订 plan.md,plan-reviewer… → 代码循环:用户确认方案后,coder 实施已确认方案,code-reviewer…
  • Tasks that involve Code review
  • SKILL.md covers 必需准备, 强制规则, 工作流角色 and 用户确认节点
  • Runs JavaScript scripts from its folder

What it does

Review Loop is an agent skill from didi/mpx. 当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。

Its SKILL.md is about 830 tokens, which your agent loads only when the skill is triggered. The skill folder holds 35 other files, including scripts and reference files (for example `evals/evals.json`, `jest.config.json` and `references/claude-code.md`).

It sits in Development, covering Code review. It works with WeChat. The repository describes itself as: Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Code review

Example prompts

  • “/review-loop”

Requirements

  • Node.js

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. 方案循环:planner 编写或修订 plan.md,plan-reviewer 对其进行评审。
  2. 代码循环:用户确认方案后,coder 实施已确认方案,code-reviewer 评审产生的差异。

What it can do on your machine

Read from SKILL.md and the folder at commit e2a7612. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 7 files in scripts/ (JavaScript, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Review Loop loads about 828 tokens when it runs, and up to ~9k if it reads all its reference files. Until then it costs about 47 tokens; SKILL.md has 209 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~828
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from didi/mpx at commit e2a7612, republished under its Apache-2.0 licence (© didi). 209 words, ~828 tokens.

Download SKILL.mdSave it as .claude/skills/review-loop/SKILL.md (or your agent's skills folder). This skill also uses 30 other files; get the full folder from GitHub.
name
review-loop
description
当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。

评审循环

使用此 Skill 执行两个阶段的工作流:

  1. 方案循环:planner 编写或修订 plan.md,plan-reviewer 对其进行评审。
  2. 代码循环:用户确认方案后,coder 实施已确认方案,code-reviewer 评审产生的差异。

该工作流必须使用真实的 planner、reviewer 和 coder 子 Agent。如果当前环境无法创建新的原生子 Agent,停止并告知用户本次会话无法运行 review-loop。Codex 和 Claude Code 的四个角色都使用宿主原生子 Agent。

必需准备

开始任务前:

  1. 读取 references/protocol.md、references/state-machine.md 和 references/role-contracts.md。
  2. 根据当前平台读取 references/codex.md 或 references/claude-code.md。
  3. 创建任务 ID。
  4. 运行 scripts/init-workspace.js,创建 .agent-workflows/review-loop/<task-id>/。
  5. 运行 scripts/prepare-agent-roles.js,准备当前平台的真实子 Agent 角色。
  6. 在推进流程前运行 scripts/validate-state.js。

maxRounds 默认为 3。如果用户指定最大循环轮数,将其传给 init-workspace.js。

强制规则

  • 在方案循环结束且用户明确确认方案前,不得实现代码。
  • 所有面向用户或需要用户确认的自然语言中间产物必须使用中文,包括技术方案、评审摘要与结论、问题说明与修改建议、方案修订记录、代码执行记录、角色日志、验证结果说明、剩余风险,以及确认节点的汇总和提问。命令、路径、代码符号、Markdown 固定字段名、协议枚举值和工具原始输出可保留原文。
  • 不得让 reviewer 角色修改仓库文件。Reviewer 只返回一份符合固定格式的 Markdown 文档;编排者通过 scripts/review-manager.js --finalize 解析、持久化并校验该文档。
  • plan-reviewer 和 code-reviewer 的每一轮评审都必须创建全新、独立的原生子 Agent 实例;即使角色和评审类型相同,也不得恢复或复用任何之前轮次创建的 reviewer,且不得继承父级会话、planner 或 coder 的任何上下文。review-manager.js --finalize 会拒绝与历史 reviewer-run 重复的 --agent-id。
  • planner 和 coder 可以跨轮复用各自之前创建的子 Agent 实例,以保留方案修订或代码实现上下文;二者不得相互复用实例。
  • 在 Codex 或 Claude Code 中,运行 scripts/review-manager.js --prepare,将返回的仅含路径的提示词交给新的原生 reviewer 子 Agent,把其唯一纯 Markdown 响应保存到仓库外的临时文件,再运行 scripts/review-manager.js --finalize --input <file> --agent-id <id>。Prepare 会绑定全部输入和 Git 树;finalize 会拒绝漂移、直接校验 Markdown、写入不可变的 reviewer-run 并将规范评审持久化为 reviews/*-review-N.md。不得直接调用 scripts/persist-review-markdown.js。
  • 后续只读复验使用 scripts/validate-review-markdown.js,该命令直接解析和校验 .md 文档。
  • 每轮代码实现和验证完成后直接执行 coder-complete。该转换只校验初始基线与当前工作树可以安全重建,不生成差异文件或轮次范围文件。
  • Prepare 会把初始基线到绑定工作树的完整 diff 写入 diffs/code-diff-N.patch,作为代码 reviewer 与人工共同使用的评审交接产物,并将其内容摘要绑定到 reviewer 请求。
  • 不得生成、传递或记录相邻代码轮次间的增量 patch;code-diff-N.patch 始终表示初始基线到当前评审版本的差异。
  • Prepare 会在 reviewer-run 中绑定当前工作树摘要;评审期间代码发生变化时 finalize 会拒绝结果,必须重新开始当前评审轮次。
  • 所有状态转换都使用 scripts/advance-state.js,不得手动编辑 state.json。
  • reviewer 返回 approved 或循环达到 state.json.maxRounds 时停止当前循环。
  • 因达到 maxRounds 而停止时,用中文汇总剩余问题,并询问用户要继续、接受还是修订。
  • 在确认节点等待期间,如果已评审的方案或代码发生变化,优先开启新一轮评审。只有用户当前消息明确接受变化时才可覆盖,并传入 --accept-changed-inputs true 和非空的 --override-reason。转换会把接受的漂移记录到 state.json.confirmationOverrides。
  • 只能在 max_rounds_reached 确认节点增加 maxRounds;在该节点拒绝结果后,必须由用户当前消息明确给出更高上限,才能恢复起草。传入 --user-confirmed true;不得复用更早的笼统指令绕过已配置上限。
  • 在 plan.md 中保留每轮修订记录,并以中文书写记录内容。

工作流角色

四个必需角色是:

  • planner
  • plan-reviewer
  • coder
  • code-reviewer

使用 templates/roles/ 下的模板作为角色定义。在 Codex 和 Claude Code 中,四个角色都必须是原生子 Agent。Planner/coder 后续轮次可以继续使用各自已有实例;plan-reviewer/code-reviewer 每一轮必须新建实例,并禁用父级会话上下文继承。

用户确认节点

方案循环结束后,用中文向用户展示:

  • plan.md 路径
  • 方案循环终止原因
  • 按轮次整理的评审摘要
  • 未接受的问题及理由

用中文询问是否进入代码循环。只有用户明确确认后,才运行 advance-state.js --event confirm-plan。

代码循环结束后,用中文向用户展示:

  • plan.md 路径
  • 差异摘要
  • 代码循环终止原因
  • 验证命令及结果
  • 剩余风险

用中文询问是否接受最终结果。只有用户明确确认后,才运行 advance-state.js --event confirm-final。

© didi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 30 other files (scripts, references) in .agents/skills/review-loop of didi/mpx.

  • SKILL.md
  • evals/evals.json
  • jest.config.json
  • references/claude-code.md
  • references/codex.md
  • references/protocol.md
  • references/role-contracts.md
  • references/state-machine.md
  • schemas/state.schema.json
  • scripts/__tests__/git-snapshot.spec.js
  • scripts/__tests__/review-loop.spec.js
  • scripts/advance-state.js
  • scripts/check-recoverability.js
  • scripts/git-snapshot.js
  • scripts/init-workspace.js
  • scripts/migrate-workspace.js
  • … and 15 more

Open the folder on GitHubat commit e2a7612

Compare with similar skills

Review Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Review Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Review Loop this skilldidi/mpx3.9k—~828Automated safety check: PassApache-2.0
Cloudbase Code ReviewTencentCloudBase/CloudBase-AI-Toolkit1.1k2 repos~1.1kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Backend Code Reviewlangflow-ai/langflow156k—~3.5kAutomated safety check: NotesMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything85k1 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Cloudbase Code Review

    TencentCloudBase/CloudBase-AI-Toolkit

    Code review and validation for CloudBase projects. An agent skill from TencentCloudBase/CloudBase-AI-Toolkit.

    1.1k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Backend Code Review

    langflow-ai/langflow

    Review backend code for quality, security, maintainability, and best practices based on established checklist rules.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check: notes
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    85k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    69k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed

More from didi/mpx

  • 审计存量 Mpx 项目迁移到“mode 只负责目标筛选、srcMode 只负责源码方言”的新版编译语义。只要用户提到升级 Mpx 后检查条件编译、排查 .ali/.swan 等条件文件、mode/src-mode 区块、@mode/@mode、modeRules/srcModeRules 或外部模板迁移,就应使用本 Skill;不用于与该语义变更无关的普通 Mpx 升级。

    3.9k GitHub stars~731 tokensUpdated 8 days ago
    Auto-check passed
  • Mpx2rn

    didi/mpx

    Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…

    3.9k GitHub stars~3.7k tokensUpdated 8 days ago
    Auto-check passed
  • Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…

    3.9k GitHub stars~1k tokensUpdated 8 days ago
    Auto-check passed
  • 通过查看当前最新版本与上一版本间的git提交记录与代码变更,生成版本变更日志,当用户询问“创建/生成变更日志”、“创建/生成changelog”时使用。

    3.9k GitHub stars~640 tokensUpdated 8 days ago
    Auto-check passed
  • Helps when network-related commands (like curl, git, npm, pip, brew) are failing, timing out, or running slowly due to network issues.

    3.9k GitHub stars~464 tokensUpdated 8 days ago
    Auto-check passed
  • Skill2gene

    didi/mpx

    将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将…

    3.9k GitHub stars~558 tokensUpdated 8 days ago
    Auto-check passed

Works with

Categories

Questions about Review Loop

What does Review Loop do?

当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。. Review Loop is an agent skill from didi/mpx.

When should I use Review Loop?

Review Loop fits situations like: tasks that involve Code review.

How do I install Review Loop in Claude Code?

Run `npx skills add didi/mpx --skill review-loop -a claude-code`. Or copy the skill folder (.agents/skills/review-loop in didi/mpx) into .claude/skills/review-loop in your project. Claude Code loads it when a task matches its description.

How do I install Review Loop in Codex?

Run `npx skills add didi/mpx --skill review-loop -a codex`. Or copy the skill folder (.agents/skills/review-loop in didi/mpx) into .agents/skills/review-loop in your project. Codex loads it when a task matches its description.

Can I use Review Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add didi/mpx --skill review-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/review-loop, .gemini/skills/review-loop, .github/skills/review-loop and .opencode/skills/review-loop in your project.

What does Review Loop need to run?

Going by SKILL.md and its folder, Review Loop needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does Review Loop access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Review Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Review Loop use?

Review Loop is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Review Loop use?

About 828 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.1k tokens, read only when the agent opens those files.

What are the alternatives to Review Loop?

Skills that share tags, products or a category with Review Loop: Cloudbase Code Review (TencentCloudBase/CloudBase-AI-Toolkit, 1.1k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars) and Backend Code Review (langflow-ai/langflow, 156k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Review Loop?

didi (a GitHub organization) maintains it in didi/mpx, which has 3,941 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on September 29, 2026.

Source: didi/mpx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.