skills/review-and-fix/SKILL.md
Pre-push CodeRabbit review-fix loop. Runs local CodeRabbit review, fixes valid issues, and repeats until clean so the branch passes CodeRabbit review on push with no additional comments. Use when the user says "review and fix", "review loop", or wants to ensure the branch is CodeRabbit-clean before pushing.
npx skillsauth add pitzcarraldo/skills review-and-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ensure the current branch passes CodeRabbit review before pushing — so that when the branch is pushed and CodeRabbit runs on the PR, it produces no new review comments.
This skill runs CodeRabbit CLI locally, validates and fixes real issues, and repeats the cycle until the review is clean.
coderabbit --version 2>/dev/null || echo "NOT_INSTALLED"
coderabbit auth status 2>&1
If CLI is not on the latest version, update first:
coderabbit update
coderabbit --version
If CLI is still not installed or not on the latest version:
CodeRabbit CLI is not installed or outdated.
Install: https://www.coderabbit.ai/cli
Auth: coderabbit auth login
Search for AGENTS.md in the repository root. If found, follow its build/lint/test/commit guidance throughout.
Check arguments or ask the user:
| Flag | Scope |
|------|-------|
| (default) | All changes vs origin/main (-t all --base origin/main) |
| --uncommitted | Uncommitted only vs origin/main (-t uncommitted --base origin/main) |
| --committed | Committed only vs origin/main (-t committed --base origin/main) |
| --base <branch> | Override base branch (--base <branch>) — defaults to origin/main, not local main |
Always compare against the remote tracking branch (origin/main) instead of the local main, since the local main may be stale. If a different base is required, pass --base <branch> explicitly.
Before running the review, ensure origin/main is up to date:
git fetch origin main
coderabbit review --agent --base origin/main [additional scope flags]
Parse the output. The --agent flag produces minimal structured output optimized for AI agents. The --base origin/main flag ensures the review compares against the remote tracking branch.
Extract each finding and perform a two-step evaluation:
| Severity | Label | Action | |----------|-------|--------| | Critical/High | CRITICAL | Must fix | | Medium | WARNING | Should fix | | Minor/Low/Info | INFO | Skip (log only) |
If no Critical or Warning findings → EXIT with success message.
Before fixing any Critical or Warning finding, validate whether it is a true positive:
Read the actual code at the reported location with sufficient surrounding context (10+ lines before and after). Then classify:
| Category | Criteria | Action | |----------|----------|--------| | Valid | Issue exists in current code and the suggestion is technically correct | Fix it | | False Positive | Code already handles the concern, or the tool misread the implementation | Skip and log reason | | Context-Dependent | Suggestion is technically valid but conflicts with project conventions, intentional design, or surrounding code patterns | Skip and log reason | | Already Addressed | Issue was fixed in a recent commit or is handled elsewhere in the codebase | Skip and log reason |
Validation checklist for each finding:
Common false positive patterns to watch for:
any types that are required by external APIsDisplay findings table with validation results:
Review Cycle #N - Findings
| # | Severity | Verdict | Issue | Location |
|---|----------|---------|-------|----------|
| 1 | CRITICAL | Valid | ... | file.ts:42 |
| 2 | WARNING | False+ | ... | file.ts:89 |
| 3 | WARNING | Valid | ... | file.ts:102 |
| 4 | INFO | — | ... | file.ts:12 |
Fixing 2 valid issue(s), skipping 1 false positive...
For each validated Critical and Warning finding (Critical first):
Fixed: [Issue] at [Location]Skip INFO-level findings and false positives — log them but do not fix.
Run project validation if available (from AGENTS.md):
pnpm lint or equivalentpnpm build or tsc --noEmitpnpm test if relevant files changedIf validation fails, fix the failure before proceeding.
┌─────────────────────────────────┐
│ coderabbit review --agent │
└──────────┬──────────────────────┘
▼
┌───────────────┐
│ Any valid │──No──→ EXIT (success)
│ Critical or │
│ Warning? │
└───────┬───────┘
Yes
▼
┌───────────────┐
│ Fix issues │
│ Verify fixes │
└───────┬───────┘
▼
┌───────────────┐
│ Re-run review │──→ (back to top)
└───────────────┘
Max iterations: 5 (safety limit)
After fixing, go back to Step 2 and re-run the review.
Exit conditions:
After the loop exits, display:
Review & Fix Complete
Iterations: N
Total issues found: X
- Fixed: Y
- False positives: F
- Skipped (INFO): Z
- Persistent (unfixable): W
Files modified:
- path/to/file-a.ts
- path/to/file-b.ts
development
Review a tech spec document written in the team's Notion template format (Summary, Background, Goals, Non-Goals, Plan, Measuring Impact, Security/Privacy/Risks, Other Considerations, Milestones, Open Questions). Use when the user asks to "테크 스펙 리뷰", "tech spec 리뷰", "스펙 문서 리뷰", "이 스펙 봐줘", or provides a Notion/Google Docs/Markdown tech spec link or file and asks for feedback, critique, or readiness check before sharing with the team.
tools
Draft a daily standup from the current user's Slack, GitHub, Linear, and Google Calendar activity. Use when the user asks to create, prepare, or summarize a standup/status update from connected app activity; to collect a user's work for a date; or to verify whether Slack, GitHub, Linear, and Google Calendar connectors/MCP tools are available before drafting a standup.
development
List and resume previous coding agent sessions by loading their context into the current session. Use when the user wants to (1) see previous sessions for the current directory with summaries, (2) continue work from a previous session by loading its full conversation context, (3) recover work from an interrupted session, or (4) transfer context between sessions. Supports Claude Code and Codex sessions.
tools
This skill should be used when the user asks to "rename branch", "change branch name", "update branch name based on changes", or wants to create a meaningful branch name based on the changes.