Autonomous multi-round open-source review loop. Repeatedly reviews a repository via Codex MCP, applies the minimum hardening fixes, and re-reviews until the repository or paper-code release is ready or max rounds are reached. Use when the user says "review until it passes", "open source review loop", "maintainer review loop", or wants the oss-hardening pipeline to end with an external quality gate and iterative fixes.
Autonomously iterate: review -> implement the minimum hardening fixes -> re-review, until the external reviewer gives a positive release-readiness assessment or MAX_ROUNDS is reached.
Context: $ARGUMENTS
Tool Dispatch (priority order)
Official Codex MCP tools (preferred): call mcp__codex__codex for round 1 and mcp__codex__codex-reply for rounds 2+. These are the canonical entry points — always try them first.
Codex skill helpers: if the Codex MCP tools are unavailable or return an error, invoke the codex:rescue skill as a fallback to delegate the review task through the Codex CLI runtime.
Manual fallback: if neither is reachable, record the failure in OSS_REVIEW_LOOP.md, surface the blocker to the user, and suggest they verify their Codex MCP setup.
Never skip step 1 and jump to a fallback. Always attempt the official tool first.
Constants
MAX_ROUNDS = 4
POSITIVE_THRESHOLD: score >= 7/10, or verdict contains ready or almost
REVIEW_DOC = OSS_REVIEW_LOOP.md in the project root
REVIEWER_MODEL = gpt-5.4. Use a currently available Codex model; prefer gpt-5.4, gpt-5.3-codex, or gpt-5.2-codex.
Input Contract
Primary input: the repository plus any hardening artifacts that already exist:
OSS_AUDIT.md
OSS_PLAN.md
OSS_REFACTOR.md
OSS_TEST_STRATEGY.md
OSS_CI.md
OSS_DOCS.md
OSS_HARDENING_STATUS.md
OSS_REVIEW.md if a one-shot review already happened
Optional input: explicit release target, contributor audience, support expectations, or constraints like "no new deps".
Default: if artifacts are partial, review the current repo state and fix the highest-leverage open-source gaps first.
Output Contract
Create or update OSS_REVIEW_LOOP.md as a cumulative log. Each round must include:
Overall score
Verdict: ready, almost, or not ready
Ranked weaknesses
Minimum fixes requested by the reviewer
Actions taken this round
Verification commands and outcomes
Full raw reviewer response, preserved verbatim
Also update OSS_HARDENING_STATUS.md after every round with:
current review-loop round
latest score
latest verdict
next recommended stage or command
Non-goals
Do not chase cosmetic perfection if the repository is already releasable.
Do not hide failing checks, weak docs, or missing automation to get a better score.
Do not broaden the scope beyond the minimum fixes that materially improve release readiness.
Workflow
Initialization
Read README*, CONTRIBUTING.md, package/build manifests, CI workflows, tests, and the OSS_*.md hardening artifacts.
Identify current strengths, known gaps, license or citation status, and available local verification commands.
Initialize round counter = 1.
Create or update OSS_REVIEW_LOOP.md with a header and timestamp.
Loop (repeat up to MAX_ROUNDS)
Phase A: Review via official Codex MCP tools
Round 1 — call mcp__codex__codex directly (the official tool, not a Bash wrapper):
mcp__codex__codex:
config: {"model_reasoning_effort": "xhigh"}
prompt: |
[Round 1/MAX_ROUNDS of open-source review loop]
Repository briefing:
[purpose, setup commands, verification commands, hardening artifacts, known gaps]
Please act as a senior open-source maintainer reviewing this repository for public release readiness.
Evaluate:
1. Onboarding and usability
2. Correctness and user safety
3. Maintainability and structure
4. Testability and automation
5. CI and release hygiene
6. Documentation, licensing, and contributor clarity
7. Security and responsible maintenance
Then provide:
1. Overall score 1-10
2. Overall verdict: Ready / Almost / Not Ready
3. Remaining critical weaknesses ranked by severity
4. For each weakness, specify the MINIMUM fix
5. For each fix, specify the best return stage: audit / plan / refactor / tests / ci / docs
Be direct and practical. Focus on the smallest fix package that materially improves open-source quality.
Save the returned threadId immediately after round 1 — it is required for all subsequent rounds.
Round 2+ — call mcp__codex__codex-reply with the saved threadId to maintain conversation context. Do NOT create a new thread for each round.
If mcp__codex__codex is unreachable, fall back per the Tool Dispatch priority order above.
Phase B: Parse Assessment
Save the full raw response verbatim for the round log. Then extract:
overall score
verdict
ranked weaknesses
minimum fixes
return stage for each fix
Stop condition:
If score >= 7 and verdict contains ready or almost, stop the loop and document final state.
Phase C: Implement Fixes
Apply the minimum fixes in priority order. Use the recommended return stage to guide how you respond:
audit: revisit the repo assumptions and update OSS_AUDIT.md and OSS_PLAN.md only as needed
plan: tighten scope, ordering, or acceptance criteria in OSS_PLAN.md
refactor: apply the smallest structural or tooling change that unlocks maintainability
tests: add or repair CI-safe tests, fixtures, and local verification commands
ci: update or add the minimal workflow needed to enforce checks
Prefer the smallest change set that addresses the reviewer concern
Reuse the existing oss-* stage artifacts instead of inventing a parallel process
If a fix clearly belongs to another stage skill, follow that stage's contract and update its artifact
Phase D: Verify
After implementing fixes:
run the narrowest relevant local verification commands
record success or failure
if a command fails, fix the highest-leverage issue before asking for re-review
Typical verification sources:
commands documented in README*
commands recorded in OSS_TEST_STRATEGY.md
commands recorded in OSS_CI.md
repository-native scripts such as npm test, python -m unittest, pytest, cargo test, go test ./...
Phase E: Document Round
Append to OSS_REVIEW_LOOP.md:
## Round N (timestamp)
### Assessment
- Score: X/10
- Verdict: ready / almost / not ready
- Key weaknesses: [bullet list]
### Minimum Fixes Requested
- [fix 1] -> return stage: tests
- [fix 2] -> return stage: docs
### Actions Taken
- [what was changed]
### Verification
- [command] -> [pass/fail]
### Reviewer Raw Response
<details>
<summary>Click to expand full reviewer response</summary>
[paste the complete raw response verbatim]
</details>
### Status
- [continuing to round N+1 / stopping]
Update OSS_HARDENING_STATUS.md with:
current round
latest score
latest verdict
current loop status
Increment round counter -> back to Phase A.
Termination
When the loop ends:
Write a final summary to OSS_REVIEW_LOOP.md
Update OSS_HARDENING_STATUS.md
If stopped at max rounds without a positive assessment:
list the remaining blockers
estimate which stage should be revisited next
say whether the repo is close to release or still materially blocked
Anti-patterns
Do not bypass the official mcp__codex__codex / mcp__codex__codex-reply tools by shelling out to codex directly in Bash — the MCP tools handle authentication, threading, and config automatically.
Do not ask for re-review before applying and verifying the minimum fixes from the previous round.
Do not broaden scope beyond the reviewer's minimum-fix package.
Do not reset context each round; use mcp__codex__codex-reply with the saved threadId to maintain thread continuity.
Do not create a new mcp__codex__codex thread for rounds 2+; always use mcp__codex__codex-reply.
Do not advance past MAX_ROUNDS without surfacing remaining blockers.
Self-check
Before declaring this stage complete, verify:
OSS_REVIEW_LOOP.md contains round entries with score, verdict, weaknesses, minimum fixes, actions taken, verification outcomes, and raw response.
OSS_HARDENING_STATUS.md reflects the latest round number, score, verdict, and next action.
Round count does not exceed 4.
If the loop stopped without a positive result, remaining blockers and the recommended return stage are explicit.
Key Rules
ALWAYS call the official mcp__codex__codex / mcp__codex__codex-reply tools first; only fall back to codex:rescue if the MCP endpoint is unreachable
ALWAYS use config: {"model_reasoning_effort": "xhigh"}
Save threadId from the round 1 mcp__codex__codex call and reuse it with mcp__codex__codex-reply for all subsequent rounds — never create a new thread mid-loop
Preserve the full raw reviewer response
Ask for minimum fixes, not an aspirational rewrite
Fix issues before re-reviewing; do not just promise changes
Treat broken setup, missing tests, missing CI, weak docs, missing license or citation path, irreproducible claims, and unsafe release posture as higher severity than polish
Keep the log self-contained
Prompt Template for Round 2+ (official mcp__codex__codex-reply tool)
Always use the official mcp__codex__codex-reply tool for rounds 2+. This preserves thread context and avoids redundant briefings.
mcp__codex__codex-reply:
threadId: [saved from round 1 mcp__codex__codex call]
config: {"model_reasoning_effort": "xhigh"}
prompt: |
[Round N update]
Since your last review, we have:
1. [Action 1]: [result]
2. [Action 2]: [result]
3. [Action 3]: [result]
Updated verification status:
[commands and outcomes]
Please re-score and re-assess.
Same format: Score, Verdict, Remaining Weaknesses, Minimum Fixes, Return Stage for each fix.
Failure Handling
If mcp__codex__codex is unreachable, retry once. If still unavailable, fall back to codex:rescue skill. If neither works, record the failure in OSS_REVIEW_LOOP.md with the error details and surface the blocker to the user with setup instructions.
If the reviewer returns a truncated response, use mcp__codex__codex-reply on the same thread to request completion.
If a round's minimum fixes cannot all be applied in one session, apply the highest-leverage fixes and document deferred items explicitly.
If the loop reaches MAX_ROUNDS without a positive verdict, stop, list remaining blockers, and recommend a return stage.
Done Criteria
OSS_REVIEW_LOOP.md contains 1 to 4 round entries with assessment, minimum fixes, actions taken, verification outcomes, raw response, and status.
OSS_HARDENING_STATUS.md reflects the latest loop state.
The final state is either a positive readiness assessment or a clear blocker list with a recommended return stage.
1---2name: oss-review-loop3description: Autonomous multi-round open-source review loop. Repeatedly reviews a repository via Codex MCP, applies the minimum hardening fixes, and re-reviews until the repository or paper-code release is ready or max rounds are reached. Use when the user says "review until it passes", "open source review loop", "maintainer review loop", or wants the oss-hardening pipeline to end with an external quality gate and iterative fixes.4---56# OSS Review Loop78Autonomously iterate: review -> implement the minimum hardening fixes -> re-review, until the external reviewer gives a positive release-readiness assessment or `MAX_ROUNDS` is reached.910## Context: $ARGUMENTS1112## Tool Dispatch (priority order)13141. **Official Codex MCP tools** (preferred): call `mcp__codex__codex` for round 1 and `mcp__codex__codex-reply` for rounds 2+. These are the canonical entry points — always try them first.152. **Codex skill helpers**: if the Codex MCP tools are unavailable or return an error, invoke the `codex:rescue` skill as a fallback to delegate the review task through the Codex CLI runtime.163. **Manual fallback**: if neither is reachable, record the failure in `OSS_REVIEW_LOOP.md`, surface the blocker to the user, and suggest they verify their Codex MCP setup.1718Never skip step 1 and jump to a fallback. Always attempt the official tool first.1920## Constants2122- MAX_ROUNDS = 423- POSITIVE_THRESHOLD: score >= 7/10, or verdict contains `ready` or `almost`24- REVIEW_DOC = `OSS_REVIEW_LOOP.md` in the project root25- REVIEWER_MODEL = `gpt-5.4`. Use a currently available Codex model; prefer `gpt-5.4`, `gpt-5.3-codex`, or `gpt-5.2-codex`.2627## Input Contract2829- Primary input: the repository plus any hardening artifacts that already exist:30 - `OSS_AUDIT.md`31 - `OSS_PLAN.md`32 - `OSS_REFACTOR.md`33 - `OSS_TEST_STRATEGY.md`34 - `OSS_CI.md`35 - `OSS_DOCS.md`36 - `OSS_HARDENING_STATUS.md`37 - `OSS_REVIEW.md` if a one-shot review already happened38- Optional input: explicit release target, contributor audience, support expectations, or constraints like "no new deps".39- Default: if artifacts are partial, review the current repo state and fix the highest-leverage open-source gaps first.4041## Output Contract4243Create or update `OSS_REVIEW_LOOP.md` as a cumulative log. Each round must include:44451. Overall score462. Verdict: `ready`, `almost`, or `not ready`473. Ranked weaknesses484. Minimum fixes requested by the reviewer495. Actions taken this round506. Verification commands and outcomes517. Full raw reviewer response, preserved verbatim5253Also update `OSS_HARDENING_STATUS.md` after every round with:5455- current review-loop round56- latest score57- latest verdict58- next recommended stage or command5960## Non-goals6162- Do not chase cosmetic perfection if the repository is already releasable.63- Do not hide failing checks, weak docs, or missing automation to get a better score.64- Do not broaden the scope beyond the minimum fixes that materially improve release readiness.6566## Workflow6768### Initialization69701. Read `README*`, `CONTRIBUTING.md`, package/build manifests, CI workflows, tests, and the `OSS_*.md` hardening artifacts.712. Identify current strengths, known gaps, license or citation status, and available local verification commands.723. Initialize round counter = 1.734. Create or update `OSS_REVIEW_LOOP.md` with a header and timestamp.7475### Loop (repeat up to MAX_ROUNDS)7677#### Phase A: Review via official Codex MCP tools7879**Round 1** — call `mcp__codex__codex` directly (the official tool, not a Bash wrapper):8081```text82mcp__codex__codex:83 config: {"model_reasoning_effort": "xhigh"}84 prompt: |85 [Round 1/MAX_ROUNDS of open-source review loop]8687 Repository briefing:88 [purpose, setup commands, verification commands, hardening artifacts, known gaps]8990 Please act as a senior open-source maintainer reviewing this repository for public release readiness.9192 Evaluate:93 1. Onboarding and usability94 2. Correctness and user safety95 3. Maintainability and structure96 4. Testability and automation97 5. CI and release hygiene98 6. Documentation, licensing, and contributor clarity99 7. Security and responsible maintenance100101 Then provide:102 1. Overall score 1-10103 2. Overall verdict: Ready / Almost / Not Ready104 3. Remaining critical weaknesses ranked by severity105 4. For each weakness, specify the MINIMUM fix106 5. For each fix, specify the best return stage: audit / plan / refactor / tests / ci / docs107108 Be direct and practical. Focus on the smallest fix package that materially improves open-source quality.109```110111Save the returned `threadId` immediately after round 1 — it is required for all subsequent rounds.112113**Round 2+** — call `mcp__codex__codex-reply` with the saved `threadId` to maintain conversation context. Do NOT create a new thread for each round.114115If `mcp__codex__codex` is unreachable, fall back per the Tool Dispatch priority order above.116117#### Phase B: Parse Assessment118119Save the full raw response verbatim for the round log. Then extract:120121- overall score122- verdict123- ranked weaknesses124- minimum fixes125- return stage for each fix126127Stop condition:128129- If score >= 7 and verdict contains `ready` or `almost`, stop the loop and document final state.130131#### Phase C: Implement Fixes132133Apply the minimum fixes in priority order. Use the recommended return stage to guide how you respond:134135- `audit`: revisit the repo assumptions and update `OSS_AUDIT.md` and `OSS_PLAN.md` only as needed136- `plan`: tighten scope, ordering, or acceptance criteria in `OSS_PLAN.md`137- `refactor`: apply the smallest structural or tooling change that unlocks maintainability138- `tests`: add or repair CI-safe tests, fixtures, and local verification commands139- `ci`: update or add the minimal workflow needed to enforce checks140- `docs`: tighten README, FAQ, architecture notes, `SECURITY.md`, `CHANGELOG.md`, `LICENSE`, or citation guidance141142Rules for implementation:143144- Prefer the smallest change set that addresses the reviewer concern145- Reuse the existing `oss-*` stage artifacts instead of inventing a parallel process146- If a fix clearly belongs to another stage skill, follow that stage's contract and update its artifact147148#### Phase D: Verify149150After implementing fixes:151152- run the narrowest relevant local verification commands153- record success or failure154- if a command fails, fix the highest-leverage issue before asking for re-review155156Typical verification sources:157158- commands documented in `README*`159- commands recorded in `OSS_TEST_STRATEGY.md`160- commands recorded in `OSS_CI.md`161- repository-native scripts such as `npm test`, `python -m unittest`, `pytest`, `cargo test`, `go test ./...`162163#### Phase E: Document Round164165Append to `OSS_REVIEW_LOOP.md`:166167```markdown168## Round N (timestamp)169170### Assessment171- Score: X/10172- Verdict: ready / almost / not ready173- Key weaknesses: [bullet list]174175### Minimum Fixes Requested176- [fix 1] -> return stage: tests177- [fix 2] -> return stage: docs178179### Actions Taken180- [what was changed]181182### Verification183- [command] -> [pass/fail]184185### Reviewer Raw Response186187<details>188<summary>Click to expand full reviewer response</summary>189190[paste the complete raw response verbatim]191192</details>193194### Status195- [continuing to round N+1 / stopping]196```197198Update `OSS_HARDENING_STATUS.md` with:199200- current round201- latest score202- latest verdict203- current loop status204205Increment round counter -> back to Phase A.206207### Termination208209When the loop ends:2102111. Write a final summary to `OSS_REVIEW_LOOP.md`2122. Update `OSS_HARDENING_STATUS.md`2133. If stopped at max rounds without a positive assessment:214 - list the remaining blockers215 - estimate which stage should be revisited next216 - say whether the repo is close to release or still materially blocked217218## Anti-patterns219220- Do not bypass the official `mcp__codex__codex` / `mcp__codex__codex-reply` tools by shelling out to `codex` directly in Bash — the MCP tools handle authentication, threading, and config automatically.221- Do not ask for re-review before applying and verifying the minimum fixes from the previous round.222- Do not broaden scope beyond the reviewer's minimum-fix package.223- Do not reset context each round; use `mcp__codex__codex-reply` with the saved `threadId` to maintain thread continuity.224- Do not create a new `mcp__codex__codex` thread for rounds 2+; always use `mcp__codex__codex-reply`.225- Do not advance past `MAX_ROUNDS` without surfacing remaining blockers.226227## Self-check228229Before declaring this stage complete, verify:230231- [ ] `OSS_REVIEW_LOOP.md` contains round entries with score, verdict, weaknesses, minimum fixes, actions taken, verification outcomes, and raw response.232- [ ] `OSS_HARDENING_STATUS.md` reflects the latest round number, score, verdict, and next action.233- [ ] Round count does not exceed 4.234- [ ] If the loop stopped without a positive result, remaining blockers and the recommended return stage are explicit.235236## Key Rules237238- ALWAYS call the official `mcp__codex__codex` / `mcp__codex__codex-reply` tools first; only fall back to `codex:rescue` if the MCP endpoint is unreachable239- ALWAYS use `config: {"model_reasoning_effort": "xhigh"}`240- Save `threadId` from the round 1 `mcp__codex__codex` call and reuse it with `mcp__codex__codex-reply` for all subsequent rounds — never create a new thread mid-loop241- Preserve the full raw reviewer response242- Ask for minimum fixes, not an aspirational rewrite243- Fix issues before re-reviewing; do not just promise changes244- Treat broken setup, missing tests, missing CI, weak docs, missing license or citation path, irreproducible claims, and unsafe release posture as higher severity than polish245- Keep the log self-contained246247## Prompt Template for Round 2+ (official `mcp__codex__codex-reply` tool)248249Always use the official `mcp__codex__codex-reply` tool for rounds 2+. This preserves thread context and avoids redundant briefings.250251```text252mcp__codex__codex-reply:253 threadId: [saved from round 1 mcp__codex__codex call]254 config: {"model_reasoning_effort": "xhigh"}255 prompt: |256 [Round N update]257258 Since your last review, we have:259 1. [Action 1]: [result]260 2. [Action 2]: [result]261 3. [Action 3]: [result]262263 Updated verification status:264 [commands and outcomes]265266 Please re-score and re-assess.267 Same format: Score, Verdict, Remaining Weaknesses, Minimum Fixes, Return Stage for each fix.268```269270## Failure Handling271272- If `mcp__codex__codex` is unreachable, retry once. If still unavailable, fall back to `codex:rescue` skill. If neither works, record the failure in `OSS_REVIEW_LOOP.md` with the error details and surface the blocker to the user with setup instructions.273- If the reviewer returns a truncated response, use `mcp__codex__codex-reply` on the same thread to request completion.274- If a round's minimum fixes cannot all be applied in one session, apply the highest-leverage fixes and document deferred items explicitly.275- If the loop reaches `MAX_ROUNDS` without a positive verdict, stop, list remaining blockers, and recommend a return stage.276277## Done Criteria278279- `OSS_REVIEW_LOOP.md` contains 1 to 4 round entries with assessment, minimum fixes, actions taken, verification outcomes, raw response, and status.280- `OSS_HARDENING_STATUS.md` reflects the latest loop state.281- The final state is either a positive readiness assessment or a clear blocker list with a recommended return stage.
Run npx skillmds add zeyuzhangzyz/oss-review-loop in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Autonomous multi-round open-source review loop. Repeatedly reviews a repository via Codex MCP, applies the minimum hardening fixes, and re-reviews until the repository or paper-code release is ready or max rounds are reached. Use when the user says "review until it passes", "open source review loop", "maintainer review loop", or wants the oss-hardening pipeline to end with an external quality gate and iterative fixes. It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
zeyuzhangzyz (@zeyuzhangzyz) published this skill. Their other Agent Skills are listed on their SkillMD profile.