원클릭으로
pre-push-review
// Comprehensive local code review using both Claude AI and CodeRabbit AI before pushing changes to GitHub. This command analyzes your local changes and provides actionable feedback without posting anything to GitHub.
// Comprehensive local code review using both Claude AI and CodeRabbit AI before pushing changes to GitHub. This command analyzes your local changes and provides actionable feedback without posting anything to GitHub.
| name | pre-push-review |
| description | Comprehensive local code review using both Claude AI and CodeRabbit AI before pushing changes to GitHub. This command analyzes your local changes and provides actionable feedback without posting anything to GitHub. |
| argument-hint | [--staged] [--base <branch>] |
# Review all commits compared to main branch (default)
/pre-push-review
# Review only staged changes
/pre-push-review --staged
# Review commits compared to a specific base branch
/pre-push-review --base upstream/main
# Review commits compared to develop branch
/pre-push-review --base develop
# Review staged changes (base branch used for context only)
/pre-push-review --staged --base upstream/main
Comprehensive local code review using both Claude AI and CodeRabbit AI before pushing changes to GitHub. This command analyzes your local changes and provides actionable feedback without posting anything to GitHub.
Two Review Modes:
--staged): Review only staged changes (what you've git add-ed)Before starting the review, verify that required tools are installed and authenticated:
Git:
git branch --show-currentCodeRabbit CLI:
coderabbit auth statuscurl -fsSL https://cli.coderabbit.ai/install.sh | shsource ~/.zshrc (or appropriate shell config)coderabbit auth statusIMPORTANT: If CodeRabbit is missing or not authenticated, you will stop and will not proceed.
Parse Parameters:
--staged flag (review staged changes)--base <branch> parameter (default: main)Gather Git Information:
# Get current branch
git branch --show-current
# For commits mode: count new commits vs base
git rev-list --count <base-branch>..HEAD
# For staged mode: check if there are staged changes
git diff --cached --stat
# Get repository root
git rev-parse --show-toplevel
Validate Scope:
git add first and exitFor Commits Mode:
# Get commit log
git log <base-branch>..HEAD --oneline
# Get full diff of all commits
git diff <base-branch>..HEAD
# Get stats (files changed, additions, deletions)
git diff <base-branch>..HEAD --stat
# Get list of changed files
git diff <base-branch>..HEAD --name-only
For Staged Mode:
# Get staged changes diff
git diff --cached
# Get stats of staged changes
git diff --cached --stat
# Get list of staged files
git diff --cached --name-only
IMPORTANT: This is a LOCAL review only - nothing is posted to GitHub.
Run both reviews concurrently for efficiency:
CodeRabbit Review (Background - START THIS FIRST):
coderabbit --prompt-only --type committed --base <base-branch>coderabbit --prompt-only --type uncommitted--prompt-only: Token-efficient AI-optimized output (does NOT post to GitHub)--type committed: Review committed changes (for commits mode)--type uncommitted: Review working directory and staged changes (for staged mode)--base <branch>: Specify base branch for comparisonAGENTS.md for project contextFile: path/to/file.ts
Line: X to Y
Type: potential_issue
Prompt for AI Agent:
[Detailed description of the issue and suggested fix approach]
Claude AI Review (While CodeRabbit runs):
coderabbit --prompt-only --type committed --base <branch>Compare Findings:
Categorize Issues by Severity:
Prioritize by Confidence:
Output a comprehensive review following this template:
# Pre-Push Review Summary
## Overview
- **Review Mode**: Commits (vs. <base-branch>) | Staged Changes
- **Current Branch**: <branch-name>
- **Base Branch**: <base-branch>
- **Commits**: <count> new commits | N/A (staged mode)
- **Files Changed**: <count>
- **Lines Changed**: +<additions> -<deletions>
- **Review Method**: Claude + CodeRabbit | Claude only (if CodeRabbit unavailable)
## Critical Issues (Action Required Immediately)
<count> critical issues identified
### 1. <Issue Title>
- **Location**: <file>:<line>
- **Severity**: Critical
- **Found by**: Claude + CodeRabbit | Claude only | CodeRabbit only
- **Issue**: <concise description>
- **Why it matters**: <explanation of impact>
- **Consequence if not fixed**: <what will happen>
- **Suggested fix**: <actionable recommendation>
## Actionable Issues (Should Address Before Push)
<count> actionable issues identified
### 1. <Issue Title>
- **Location**: <file>:<line>
- **Severity**: High/Medium
- **Found by**: Claude + CodeRabbit | Claude only | CodeRabbit only
- **Issue**: <concise description>
- **Why it matters**: <explanation of impact>
- **Consequence if not fixed**: <what will happen>
- **Suggested fix**: <actionable recommendation>
## Minor Issues (Optional Improvements)
<count> minor issues identified
- <file>:<line> - <brief description>
- <file>:<line> - <brief description>
## Positive Highlights
- <well-implemented features or good practices observed>
- <test coverage improvements>
- <documentation quality>
- <good commit messages (commits mode only)>
## Cross-Check Summary
- **Issues confirmed by both reviewers**: <count>
- **Claude-only findings**: <count>
- **CodeRabbit-only findings**: <count>
- **Conflicting recommendations**: <count> (if any, explain the conflict)
## Commit Quality Analysis (Commits Mode Only)
- **Commit Messages**: Clear and descriptive | Needs improvement
- **Commit Organization**: Well-structured | Consider squashing/splitting
- **Atomic Commits**: Each commit is self-contained | Some commits too large
## Recommendation
- [ ] Ready to push (no critical issues)
- [ ] Fix critical issues before pushing
- [ ] Consider addressing actionable issues before push
- [ ] Safe to push with minor issues (can address in follow-up)
## Next Steps
<Specific actionable steps for the developer>
1. Fix critical issue X in file Y
2. Consider refactoring Z for better performance
3. Add tests for edge case A
4. Update documentation for feature B
## Additional Context
<Any relevant information about the changes, related issues, or architectural considerations>
## CodeRabbit Insights
<Unique findings from CodeRabbit such as:>
- Race conditions detected
- Memory leak potential
- Subtle logic errors that static analysis wouldn't catch
- Performance hotspots
- Concurrency issues
After completing the review, Claude can implement fixes for identified issues:
After implementing fixes, optionally re-run the review to verify:
Review Standards:
Code Review Principles:
Tool Usage:
git diff and git log for gathering local changescoderabbit --prompt-only --type committed --base <branch>coderabbit --prompt-only --type uncommittedOutput Format:
# Review all commits before pushing to PR
/pre-push-review
# Review commits compared to upstream main
/pre-push-review --base upstream/main
# Review only what you've staged
git add src/component.tsx
/pre-push-review --staged
# Review commits on feature branch vs develop
git checkout feature/new-auth
/pre-push-review --base develop
If CodeRabbit is missing:
curl -fsSL https://cli.coderabbit.ai/install.sh | shIf CodeRabbit authentication fails:
coderabbit auth status to check statuscoderabbit auth loginIf no changes to review:
git add <files> firstgit status to help user see what can be stagedIf base branch doesn't exist:
git branch -aIf git repository not found:
If CodeRabbit fails or times out:
coderabbit auth status (authentication improves quality)git status--type uncommitted for faster analysis (staged mode)If CodeRabbit background execution shows no findings:
coderabbit --prompt-only --type committed --base mainIf fix implementation introduces new issues:
If one reviewer fails:
Review Behavior:
git push to catch issues earlyCodeRabbit Integration:
--prompt-only flag provides AI-optimized output without posting to GitHubAGENTS.md for project-specific context--type uncommitted (staged mode) for faster reviewsCross-Check Value:
Optimize CodeRabbit Analysis Time:
--type uncommitted) is fastest - only reviews what you've staged--type committed) reviews all commits vs base branchManaging Long Review Times:
Before Running Review:
git add-ed the files you want reviewedDuring Review:
After Review:
git push with confidenceWorkflow Integration:
# Typical workflow
git add src/feature.tsx
git commit -m "Add new feature"
/pre-push-review # Review before push
# If issues found, let Claude implement fixes:
# Claude will:
# 1. Apply fixes to identified issues
# 2. Handle any pre-commit hook violations
# 3. Stage changes and commit with descriptive message
/pre-push-review # Verify fixes (optional but recommended)
git push origin feature-branch # Push with confidence
Extended Workflow with Fix Implementation:
# 1. Initial development
git add .
git commit -m "feat: implement user authentication"
# 2. Run comprehensive review
/pre-push-review
# 3. Claude finds issues and offers to fix them
# User: "Yes, please fix the actionable issues"
# Claude implements fixes, handles pre-commit hooks, commits changes
# 4. Optional verification
/pre-push-review
# 5. Push with confidence
git push origin feature-branch
Generate React Testing Library tests following OCP Console best practices
Audit all Claude Code skills for stale references, broken paths, and deprecated tool names
Expert package update assistant for OpenShift Console. Update packages safely with automated testing, building, and fixing.
Automated QA verification for OpenShift Console PRs. Builds and runs the console on both main and the PR branch, captures before/after screenshots and GIFs via Playwright MCP, then posts a side-by-side comparison as a GitHub PR comment. Use when the user asks to verify a PR, QA changes, capture visual proof, or show before/after evidence.
Debug and fix failing Playwright e2e tests with MCP-assisted diagnosis. Use when user says "playwright test failing", "fix e2e test", "debug spec", or provides a failing .spec.ts file, e2e directory, or Playwright tag.
Migrate a Cypress test file to Playwright following Console's architecture. Use when user says "migrate", "convert cypress", "port to playwright", or provides a .cy.ts or .feature file path.