pr-fix-guide
Skill4 starsChanged 15 days agoMITView on GitHub
Fix PR review issues directly without agent delegation. Combines root cause analysis and fixing into a single-agent flow.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyze-deps-guideSkill
- design-planSkill
- docs-writingSkill
- frontend-designSkill
- implement-guideSkill
- implement-test-guideSkill
- modern-web-guidanceSkill
- pr-review-follow-upSkill
- pr-review-guideSkill
- shadcn-adapt-guideSkill
- shadcnSkill
- ui-audit-guideSkill
- analyze-deps-guideSkill
- design-planSkill
- docs-writingSkill
- frontend-designSkill
- implement-guideSkill
- implement-test-guideSkill
- pr-fix-guideSkill
- pr-review-follow-upSkill
- pr-review-guideSkill
- shadcn-adapt-guideSkill
- shadcnSkill
- ui-audit-guideSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 67
Read each issue's severity from the Severity column of the review body.
- Distinctive: line 79
Do NOT blindly accept the reviewer's suggested fix.
- Distinctive: line 81
Keep the reasoning in your head.
- Distinctive: line 98
Do not wait for explicit approval.
- Distinctive: line 104
After emitting the plan, fix all issues.
- Distinctive: line 120
Read the specific comment / inline-review thread fully — including any reviewer back-and-forth
- Distinctive: line 121
Run the Reflex Check (above) at the moment of writing the change — same triggers, plus the two fix-specific ones
- Distinctive: line 160
If something is genuinely not clean, say so on that trailing line — don't pad the output with a verification section.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Fix Guide
Purpose
Fix issues identified in PR reviews by combining root cause analysis (normally done by Principal Architect) and fixing (normally done by SDE2) into a single direct flow.
Rules
The full ruleset lives in .claude/rules/*.md — those files are the spec. Don't try to keep all of them in working memory.
The Reflex Check lives in implement-guide/SKILL.md (Part 2 → Step 3). It names the actions that should evoke a rule mid-write and points at the relevant file. The same triggers fire when writing a fix patch as when writing fresh code — read it before each fix; open a full rule file only when a reflex actually fires.
Two reflexes specific to fixing (root-cause and don't-over-fix) live below in Part 2 → Fix Process.
Part 1: Root Cause Analysis
Step 1: Gather Review Context
Fetch PR details:
gh pr view {pr_number} --json number,title,body,headRefName,baseRefName,author,url- Extract GitHub issue from PR body (
Closes #123) Get all review feedback:
# Resolve owner/repo gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"' gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews gh api repos/{owner}/{repo}/pulls/{pr_number}/commentsGet changed files:
gh pr diff {pr_number}
Step 2: Categorize Issues
Extract all issues from reviews and categorize:
| Category | Indicator | Priority |
| Blocking | ❌ Blocking, "blocking", "must", "required" | Fix first |
| Minor | ⚠️ Minor, "minor", "consider", "suggestion", "nit" | Fix second |
Read each issue's severity from the Severity column of the review body. In a follow-up review, the Status column (❌ Still Present, ⚠️ Partial) and the ⚠️ New inline marker are not severity.
Step 3: Analyze Root Causes
For EACH issue:
- Read the relevant file(s) and surrounding code context -- not just the flagged line
- Understand what the reviewer is pointing at
- Research the root cause -- is it the line they flagged, or something deeper? What's the real shape of the problem?
- Decide what you'll actually do -- this may agree with, improve on, or differ from the reviewer's suggestion
- Everything is in scope. Do not carve out a "deferred" bucket. Reviewer framing like "not blocking", "follow-up", or "post-launch monitor" is not a license to skip — it is still a fix in this PR unless the finding maps to a cited, existing issue number. See
no-follow-up-deferral.md.
Do NOT blindly accept the reviewer's suggested fix. Research and reason from the code.
Keep the reasoning in your head. The user verifies by reading the code, not prose — do NOT dump root-cause analysis into chat.
Plan Output Format
Emit a single one-line-per-fix table, then proceed to fixing directly:
## Plan: #{pr_number}
| # | File:line | Fix |
| --- | ------------ | --------------------------- |
| 1 | `file.ts:42` | {what you'll do — one line} |
| 2 | `file.ts:78` | {what you'll do — one line} |
Proceeding.Do not wait for explicit approval. The plan is a preview so the user can interrupt if needed, not an approval gate. Pause only for a specific fix that is genuinely ambiguous or needs an architectural call.
Part 2: Fixing
After emitting the plan, fix all issues.
Fix Process
Before each change, run the Reflex Check from implement-guide/SKILL.md (Part 2 → Step 3). Same triggers fire here — the reviewer comment is the occasion for the edit, but the edit itself can still smuggle in a useEffect that orchestrates React state, a defensive existence check the schema already guarantees, a callback / mode-discriminator prop, a // fix for X comment, or a ripple gap downstream.
Two reflexes specific to fixing:
- The reviewer flagged a symptom — is the symptom the root cause, or is the cause upstream? -> Read enough surrounding code to find the cause, not just the flagged line. Fix the cause; the symptom resolves itself. The reviewer's suggested fix is input, not instruction — you may agree with it, improve on it, or differ.
- About to fix the flagged line, plus "improve a few things while I'm here"? -> Don't. Make the smallest correct change that addresses the comment. Out-of-scope cleanup belongs in its own PR.
- Fix all blocking issues first, then all minor issues
- For each fix:
- Read the specific comment / inline-review thread fully — including any reviewer back-and-forth
- Run the Reflex Check (above) at the moment of writing the change — same triggers, plus the two fix-specific ones
- Fix autonomously -- do NOT stop for user confirmation between individual fixes
- Only pause if:
- The fix is genuinely ambiguous (the reviewer's intent is unclear)
- The fix requires an architectural decision beyond the scope of the comment
- A fix introduces a conflict with another pending fix
Verify Fixes
Run checks:
pnpm typecheck pnpm lint- Review against original comments:
- Does each fix address the feedback?
- Any unintended side effects?
- Fix any new issues introduced
Fix Output Format
Single one-line-per-fix table. No "Changes Made", no code snippets, no "Next Steps". Verification is one trailing line.
## Done: #{pr_number}
| # | File:line | Fix |
| --- | ------------ | -------------------------- |
| 1 | `file.ts:42` | {what was done — one line} |
| 2 | `file.ts:78` | {what was done — one line} |
Typecheck + lint: clean.If something is genuinely not clean, say so on that trailing line — don't pad the output with a verification section.
Principles
- Architect-first thinking -- understand root causes before fixing; reviewer suggestions are input, not instructions
- Address the actual feedback -- read carefully, don't assume
- Follow loaded rules --
.claude/rules/files are source of truth - Terse output -- plan and completion are one-line-per-fix tables; no root-cause prose, no rationale, no "issues addressed" narrative. The user verifies via the code
- Plan is a preview, not a gate -- emit the plan table and proceed directly. Pause only on a specific fix that is genuinely ambiguous
- No patches -- proper solutions only
- Don't over-fix -- only change what was requested
- Research before fixing -- if a fix involves a third-party library, verify correct usage via WebSearch
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

