一键导入
review-fix-cycle
Run one review-fix iteration — review code, fix findings, simplify, and commit.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run one review-fix iteration — review code, fix findings, simplify, and commit.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Identify unlabeled GitHub issues and external PRs that may belong to a specific team, and normalize conventional title scopes to the team's canonical short form
Generate standup notes from GitHub PR activity
Monitor CI checks after pushing, detect flaky vs legit failures, and auto-fix
Reference for GitHub PR review endpoints and resolving review threads via gh CLI. Use when replying to a PR review comment, posting a new review comment, or resolving review threads.
PostHog repo-specific workflow, database access rules, production architecture notes, and SDK repository locations. Use when working in posthog/posthog or any PostHog SDK repo.
Plan, implement, and iteratively review a task end-to-end using Claude + Copilot reviewers in a linear flow.
| name | review-fix-cycle |
| description | Run one review-fix iteration — review code, fix findings, simplify, and commit. |
| argument-hint | [<review-target>] [--iteration N] |
| model | sonnet |
Run one full review-fix-simplify-commit cycle. Designed to be invoked repeatedly (with fresh context each time) by the review-fix-loop.sh wrapper script, but can also be run standalone.
Arguments:
<review-target> — Anything /review-code accepts: PR URL, PR number, branch name, commit, range. If omitted, auto-detects (see Step 1).--iteration N — Iteration number (default 1). Used for logging and status tracking.Extract from $ARGUMENTS:
--iteration N (default to 1)Determine the review target:
gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number' 2>/dev/null
git branch --show-currentSave the resolved target as $REVIEW_TARGET.
Set up the notes directory:
mkdir -p "$(git rev-parse --show-toplevel)/.notes"
Invoke the review-code skill:
Skill("review-code", args: "--force --append $REVIEW_TARGET")
Using --append ensures each iteration builds upon the previous review. The review agents receive the existing review as context and focus only on NEW findings — they skip already-raised issues, update status for resolved ones, and avoid duplicating work.
Wait for the review to complete before proceeding.
Get the review file path:
~/.claude/skills/review-code/scripts/review-file-path.sh
Parse the JSON output and extract the file_path field. Then use the Read tool to read the review file contents.
Parse the review markdown for findings from the latest review section only. When --append is used, the file may contain prior review sections separated by ---. Focus on findings after the last separator (or the entire file on the first iteration).
Findings are prefixed with code-formatted severity markers:
`blocking` — Must fix. Bugs, security issues, breakage.`suggestion` — Worth considering. Author's call.`nit` — Minor style/naming. Take it or leave it.`question` — Clarification needed. Not necessarily a problem.Categorize each finding:
Fix (always):
blocking findingssuggestion findings that fix correctness, security, or clarity issuessuggestion findings with concrete code improvements that make the code simpler or cleanernit findings that are clearly correct and easy to applySkip (only when):
question findings (these are informational, not actionable)Count the findings: $TOTAL_FINDINGS, $TO_FIX, $TO_SKIP.
If zero actionable findings: Jump to Step 8 and write the status file with "clean": true, "fixed": 0, "skipped": 0, "committed": false. Skip Steps 5, 6, and 7.
Process findings in priority order: blocking first, then suggestions, then nits.
For each actionable finding:
For each skipped finding, note the title, reason, source, and file/line in memory. The skipped log is written after the commit (see Step 7a) to avoid accidentally staging it.
Invoke the simplify skill to review the changes just made:
Skill("simplify")
Apply any improvements it suggests.
Invoke the commit skill with force mode:
Skill("commit", args: "--force Address review feedback (iteration $N)")
After the commit, append any skipped findings to .notes/review-skipped.md. Writing after the commit ensures the log file is never accidentally staged alongside the code changes.
For each skipped finding noted in Step 5, append:
## Iteration $N — $DATE
### Skipped: $FINDING_TITLE
**Reason:** $WHY_SKIPPED
**Source:** $AGENT_NAME, `$FILE:$LINE`
Use append mode (do not overwrite previous iterations).
Write the status file to .notes/review-cycle-status.json:
REPO_ROOT=$(git rev-parse --show-toplevel)
Use the Write tool to create $REPO_ROOT/.notes/review-cycle-status.json:
{
"iteration": $N,
"clean": $CLEAN,
"total_findings": $TOTAL_FINDINGS,
"fixed": $TO_FIX,
"skipped": $TO_SKIP,
"committed": $COMMITTED,
"timestamp": "$ISO_TIMESTAMP"
}
Where:
clean is true if zero actionable findings were foundcommitted is true if a commit was made (false if clean or all skipped)Report the iteration summary to the user:
Review-fix cycle iteration $N complete.
Findings: $TOTAL_FINDINGS total, $TO_FIX fixed, $TO_SKIP skipped.
Status: $STATUS