一键导入
fix-pr
Use when a PR has review comments to address, CI failures to fix, or codecov coverage gaps to resolve
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when a PR has review comments to address, CI failures to fix, or codecov coverage gaps to resolve
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user wants to create a new cryochamber application, set up a scheduled agent task, or scaffold a cryo project with plan.md and cryo.toml
Use when the user wants a screenshot of the cryohub web dashboard for documentation, README, mdbook, or a slide deck. Spawns cryohub on a chamber workspace, drives headless Chrome, and saves a PNG to the requested path.
Use when preparing a new crate release, bumping versions, or tagging a release
Use when the user wants visual state machines of the cryochamber daemon — the overall event loop around inbox messages and TODO-triggered wakes, plus per-item lifecycles for a message and for a reminder — rendered as hand-written SVGs
Use after implementing a feature or any code change to verify completeness and correctness before committing
| name | fix-pr |
| description | Use when a PR has review comments to address, CI failures to fix, or codecov coverage gaps to resolve |
Resolve PR review comments, fix CI failures, and address codecov coverage gaps for the current branch's PR.
IMPORTANT: Never use gh api --jq. It double-escapes through the shell and breaks in zsh (backslashes in \(...) and != get mangled). Always pipe to jq instead.
# Get PR number
PR=$(gh pr view --json number --jq .number)
# Get PR head SHA (on remote)
HEAD_SHA=$(gh api repos/{owner}/{repo}/pulls/$PR | jq -r '.head.sha')
Three sources of feedback to check:
# Copilot and user inline review comments (on code lines)
gh api repos/{owner}/{repo}/pulls/$PR/comments \
| jq -r '.[] | "[\(.user.login)] \(.path):\(.line // .original_line) — \(.body)"'
# Review-level comments (top-level review body)
gh api repos/{owner}/{repo}/pulls/$PR/reviews \
| jq -r 'map(select(.body | length > 0)) | .[] | "[\(.user.login)] \(.state): \(.body)"'
# Issue-level comments (general discussion, exclude bots)
gh api repos/{owner}/{repo}/issues/$PR/comments \
| jq -r 'map(select(.user.login | test("codecov|copilot") | not)) | .[] | "[\(.user.login)] \(.body)"'
# All check runs on the PR head
gh api repos/{owner}/{repo}/commits/$HEAD_SHA/check-runs \
| jq -r '.check_runs[] | "\(.name): \(.conclusion // .status)"'
# Codecov bot comment with coverage diff
gh api repos/{owner}/{repo}/issues/$PR/comments \
| jq -r '.[] | select(.user.login == "codecov[bot]") | .body'
Categorize all findings:
| Priority | Type | Action |
|---|---|---|
| 1 | CI failures (test/clippy/build) | Fix immediately -- blocks merge |
| 2 | User review comments | Address each one -- respond on PR |
| 3 | Copilot review comments | Evaluate validity, fix if correct |
| 4 | Codecov coverage gaps | Add tests for uncovered lines |
For each failing check:
make clippy locally, fix warningsmake test locally, fix failuresmake build locally, fix errorsFor each review comment:
Do NOT respond on the PR -- just fix and commit. The user will push and respond.
Copilot suggestions with suggestion blocks contain exact code. Evaluate each:
IMPORTANT: Do NOT run cargo-llvm-cov locally. Use the gh api to read the codecov report instead.
From the codecov bot comment (fetched in Step 1c), extract:
For detailed line-by-line coverage, use the Codecov API:
# Get file-level coverage for the PR
gh api repos/{owner}/{repo}/issues/$PR/comments \
| jq -r '.[] | select(.user.login == "codecov[bot]") | .body' \
| grep -oP 'filepath=\K[^&]+'
Then read the source files and identify which new/changed lines lack test coverage.
make test to verify tests passAfter pushing, CI will re-run coverage. Check the updated codecov comment on the PR.
After all fixes:
# Verify everything passes locally
make check # fmt + clippy + test
Commit with a descriptive message referencing the PR:
git commit -m "fix: address PR #$PR review comments
- [summary of fixes applied]
"
Report to user:
Run /review-implementation first to catch issues before push. Then /fix-pr after push to address CI and reviewer feedback.
After creating a PR and running make copilot-review, use /fix-pr to address the resulting feedback.