分享一个 Codeg 多智能体协同下的 skill 案例,在一个会话里跨 Agent 协同,效率拉满
使用 Github:Codeg (开启多智能体协同的情况下)在 claude code 进行开发,在一个会话里使用 skill 和不使用 skill 的区别效果:

使用 skill 后任务完成会由 codex 自动 review ,有问题直接修复,解决了我以前手动来回倒腾的问题。这是 skill 内容(如果使用其它子智能体 review 的话,可以把 skill 里面的 codex 替换一下),可以直接在 skills 管理里面添加,欢迎大佬们使用反馈,或者创作分享:
name: sub-agent-review-loop
description: Use when any task could modify code, tests, config, schemas, migrations, deps, build/deploy scripts, artifacts, or behavior before completion
Sub-Agent Review Loop
Overview
Use Codex as an independent reviewer after work that can modify artifacts or behavior. Loop until the latest result is production-ready.
Core principle: Work is not complete until Codex approves the latest fixed version as production-ready.
Required Loop
- Finish the implementation and run the relevant local checks.
- Call Codeg MCP
delegate_to_agentwithagent_type: "codex", absoluteworking_dir, and a self-containedtaskcontaining the request, changed files or diff/SHAs, checks run, and constraints. - Require this quality bar: production-ready; do not approve while in-scope correctness, security, reliability, data, API, UX, performance, test, or maintainability issues remain.
- Use
receiving-code-review: verify claims, fix valid feedback, and push back with evidence on invalid or out-of-scope feedback. - Run the relevant checks again after fixes.
- Send the updated result back to Codex for re-review.
- Repeat until Codex approves the latest version with no unresolved valid in-scope issues.
Do not use an ordinary in-session Task/general-purpose reviewer as a substitute.
If delegate_to_agent is missing, Codeg MCP is not injected/enabled, the call fails, or the Codex child session fails, tell the human and leave the task incomplete or blocked. Do not self-review instead.
Codeg MCP Call
{
"agent_type": "codex",
"working_dir": "<absolute current working directory>",
"task": "<complete review prompt; child cannot see this conversation>"
}
Codex Review Prompt
Review these completed changes as Codex.
Quality bar: production-ready. Do not approve while in-scope correctness,
security, reliability, data, API, UX, performance, test, or maintainability
issues remain.
User request:
<request>
Changes to review:
<diff, changed files, or BASE_SHA..HEAD_SHA>
Verification already run:
<commands and results>
Return:
- Verdict: APPROVED or CHANGES_REQUESTED
- Critical / Important / Minor issues
- Required verification
For re-review, add:
Re-review the latest state after fixes against the same production-ready quality
bar. Do not approve unless the current version is ready to ship.
Quick Reference
| Situation | Required action |
|---|---|
| Artifact/behavior-changing task is done | Call delegate_to_agent before final response |
| Codex finds valid issues | Fix, verify, send back to Codex |
| Feedback seems wrong | Verify, push back with evidence |
| Minor issues remain | Fix valid ones unless they expand scope or risk |
| Codex approves latest version | Final response may be sent after checks pass |
Red Flags
Rationalizations:
- “The change is tiny.”
- “The user is waiting.”
- “Tests already passed.”
- “I reviewed my own diff.”
- “Codex only found nits.”
- “I fixed the issue, so another review is unnecessary.”
- “I used a generic reviewer subagent instead of Codeg MCP.”
Common Mistakes
| Mistake | Fix |
|---|---|
| Reviewing the original diff after fixes | Ask Codex to review the latest state |
| Blindly applying feedback | Verify with codebase evidence first |
| Stopping after fixes | Re-dispatch Codex after changes |
| Treating tests as a replacement for review | Run tests and Codex review |
| Using an in-session reviewer | Use Codeg MCP delegate_to_agent |
Completion Gate
Final response is allowed only after implementation and accepted fixes are done, relevant checks pass or limitations are stated, Codex approves the latest version, and no known valid production-readiness issue remains in scope.