Review Fix Loop
Use this skill to turn review into a closed feedback loop: review the current scope, fix clear issues, run focused verification, and review the resulting diff again.
Scope
Start by determining the review target:
- Prefer the user-specified files, branch, pull request comments, inline comments, or "last turn changes".
- If no target is specified, review the current uncommitted diff.
- Include staged and unstaged changes when the repo has both, but call out which scope was reviewed.
- Do not review unrelated dirty files unless they affect the requested change.
Before editing, identify user-owned unrelated changes and leave them alone.
Review Pass
Review like a code reviewer, not like a formatter.
Prioritize findings in this order:
- Correctness bugs and behavioral regressions.
- Data loss, security, privacy, compliance, or irreversible side effects.
- Missing tests or validation for changed behavior.
- Integration risks across modules, APIs, schemas, background jobs, or UI workflows.
- High-impact maintainability issues introduced by the diff.
Ignore minor style nits unless they hide a real bug or conflict with the local codebase.
For each finding, capture:
- File and line or narrow code area.
- Why it is a real risk.
- The smallest reasonable fix.
- Whether the fix is safe to apply now.
Fix Loop
Run up to 3 iterations.
For each iteration:
- Review the target diff.
- Fix findings that are clear, local, and within scope.
- Leave design choices, ambiguous requirements, or risky behavior changes for the user instead of guessing.
- Run the narrowest meaningful verification.
- Review only the new diff created by the fix.
Stop early when no serious findings remain.
Stop and report instead of continuing when:
- A fix requires product or architecture decisions the user has not made.
- The remaining issue needs external credentials, unavailable services, or large test data.
- Verification requires a destructive operation or broad environment change.
- The same class of issue remains after 3 loops.
Verification
Choose verification proportional to the change:
- Small pure function change: focused unit test or import/compile check.
- UI change: focused test plus browser or screenshot check when a running app is relevant.
- Streamlit change: compile/import check, focused tests, health check, and browser text check when practical.
- Data/schema/import change: fixture-based test plus output artifact inspection.
- Docs-only change: link/path sanity and rendered structure check when relevant.
Do not run an expensive full suite by default when a focused test proves the edited behavior. Mention when full-suite coverage was skipped.
Final Answer
Lead with the review outcome, then summarize fixes.
Use this structure:
- Findings: serious issues found initially, or "No serious findings remain" after the loop.
- Fixed: concrete changes made.
- Verified: commands, browser checks, health checks, or artifact checks run.
- Remaining risk: skipped tests, accepted limitations, or decisions still needing the user.
- Next path: 1-2 useful next actions only when they naturally follow.
If no edits were needed, say that clearly and list any residual test gaps.
Rules
- Keep fixes narrow and reviewable.
- Do not commit, push, change visibility, or rewrite history unless the user explicitly asks.
- Do not reformat unrelated files.
- Do not revert user changes unless explicitly requested.
- Prefer existing project patterns and test helpers.
- When the user asks for inline code-review comments, emit inline comments for actionable findings; otherwise keep findings in the final response.
1---2name: review-fix-loop3description: Review, fix, verify, and re-review code changes in a bounded loop. Use when the user asks for review, code review, /review, inspect current changes, fix review findings, address inline comments, 自动修复 review 问题, 复审, or wants Codex to keep fixing and reviewing until no serious issues remain. Focus on bugs, regressions, missing tests, unsafe behavior, and high-impact maintainability issues. Do not use for broad architecture planning, unclear new features, pure formatting, git commit creation, or bug diagnosis without an existing diff.4---56# Review Fix Loop78Use this skill to turn review into a closed feedback loop: review the current scope, fix clear issues, run focused verification, and review the resulting diff again.910## Scope1112Start by determining the review target:1314- Prefer the user-specified files, branch, pull request comments, inline comments, or "last turn changes".15- If no target is specified, review the current uncommitted diff.16- Include staged and unstaged changes when the repo has both, but call out which scope was reviewed.17- Do not review unrelated dirty files unless they affect the requested change.1819Before editing, identify user-owned unrelated changes and leave them alone.2021## Review Pass2223Review like a code reviewer, not like a formatter.2425Prioritize findings in this order:26271. Correctness bugs and behavioral regressions.282. Data loss, security, privacy, compliance, or irreversible side effects.293. Missing tests or validation for changed behavior.304. Integration risks across modules, APIs, schemas, background jobs, or UI workflows.315. High-impact maintainability issues introduced by the diff.3233Ignore minor style nits unless they hide a real bug or conflict with the local codebase.3435For each finding, capture:3637- File and line or narrow code area.38- Why it is a real risk.39- The smallest reasonable fix.40- Whether the fix is safe to apply now.4142## Fix Loop4344Run up to 3 iterations.4546For each iteration:47481. Review the target diff.492. Fix findings that are clear, local, and within scope.503. Leave design choices, ambiguous requirements, or risky behavior changes for the user instead of guessing.514. Run the narrowest meaningful verification.525. Review only the new diff created by the fix.5354Stop early when no serious findings remain.5556Stop and report instead of continuing when:5758- A fix requires product or architecture decisions the user has not made.59- The remaining issue needs external credentials, unavailable services, or large test data.60- Verification requires a destructive operation or broad environment change.61- The same class of issue remains after 3 loops.6263## Verification6465Choose verification proportional to the change:6667- Small pure function change: focused unit test or import/compile check.68- UI change: focused test plus browser or screenshot check when a running app is relevant.69- Streamlit change: compile/import check, focused tests, health check, and browser text check when practical.70- Data/schema/import change: fixture-based test plus output artifact inspection.71- Docs-only change: link/path sanity and rendered structure check when relevant.7273Do not run an expensive full suite by default when a focused test proves the edited behavior. Mention when full-suite coverage was skipped.7475## Final Answer7677Lead with the review outcome, then summarize fixes.7879Use this structure:8081- **Findings:** serious issues found initially, or "No serious findings remain" after the loop.82- **Fixed:** concrete changes made.83- **Verified:** commands, browser checks, health checks, or artifact checks run.84- **Remaining risk:** skipped tests, accepted limitations, or decisions still needing the user.85- **Next path:** 1-2 useful next actions only when they naturally follow.8687If no edits were needed, say that clearly and list any residual test gaps.8889## Rules9091- Keep fixes narrow and reviewable.92- Do not commit, push, change visibility, or rewrite history unless the user explicitly asks.93- Do not reformat unrelated files.94- Do not revert user changes unless explicitly requested.95- Prefer existing project patterns and test helpers.96- When the user asks for inline code-review comments, emit inline comments for actionable findings; otherwise keep findings in the final response.