pr-checks
Run comprehensive PR checks including reviewing CodeRabbit comments, ensuring PR description quality, running pre-commit hooks, tests, and validation. Use on an existing PR to address review feedback.
What this skill does
# PR Checks Skill
This skill runs comprehensive PR checks to ensure code quality and address review feedback on an existing pull request.
## When to Use
Run this skill when:
- A PR has been created and CodeRabbit has posted review comments
- You want to address existing review feedback systematically
- Before requesting final review/merge on a PR
## Usage
```
/pr-checks
```
## Workflow
### 1. Analyze Current State
First, understand what's being reviewed:
```bash
# Check current branch and status
git branch --show-current
git status --short
# Show diff summary vs main
git diff --stat main...HEAD
# Get the PR number for this branch
gh pr view --json number,title,state
```
### 2. Review and Fix PR Description
Ensure the PR has a proper description before addressing code comments:
```bash
# View current PR description
gh pr view --json body,title
```
**A good PR description should include:**
- **Summary**: 1-3 bullet points explaining what the PR does
- **Test plan**: How to verify the changes work
- **Related issues**: Links to Linear/GitHub issues (e.g., `Closes MAS-XXX`)
**If the description is missing or inadequate:**
```bash
# Update the PR description
gh pr edit --body "$(cat <<'EOF'
## Summary
<1-2 sentence overview of what this PR accomplishes>
### Changes
- <change 1: what was added/modified/removed>
- <change 2>
- <change 3>
- ...
### Technical details (if applicable)
<Brief explanation of implementation approach, architectural decisions, or non-obvious changes>
## Test plan
- [ ] <verification step 1>
- [ ] <verification step 2>
- [ ] <edge case or error scenario tested>
## Related issues
Closes MAS-XXX
## Screenshots/recordings (if applicable)
<Add screenshots for UI changes, terminal output for CLI changes>
๐ค Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
```
**Fix the title if needed** (should follow conventional commits format):
```bash
# Update PR title
gh pr edit --title "feat: descriptive title here"
```
### 3. Review Existing CodeRabbit Comments
**This is the primary workflow.** CodeRabbit automatically reviews PRs and posts comments. Use `/pr-comments` to fetch and process them:
```
/pr-comments
```
This fetches all review comments from the PR. For each CodeRabbit comment:
1. **Read the comment** - Understand what CodeRabbit is suggesting
2. **Evaluate relevance** - Is this a valid concern for this codebase?
3. **Decide action** - One of:
- โ
**Implement** - The suggestion is valid and worth fixing
- โ **Skip** - The suggestion doesn't apply or is too minor
- โ **Clarify** - Need more context from user before deciding
**Walk through comments one by one with the user:**
```
## CodeRabbit Comment #1 of 5
**File:** `massgen/backend/foo.py:45`
**Original code:**
```python
response = client.api_call(params)
return response.data
```
**CodeRabbit suggestion:**
> Consider adding error handling for the API call. The request could fail
> due to network issues or API errors, which would cause an unhandled
> exception. This is especially important since this is called from the
> main orchestration loop where failures could crash the entire run.
> [truncated - 8 more lines]
**Suggested change:**
```python
try:
response = client.api_call(params)
return response.data
except APIError as e:
logger.error(f"API call failed: {e}")
raise
```
**My assessment:** Valid concern - the API call could fail and there's no error handling.
**Recommendation:** โ
Implement
Do you want me to:
1. Implement this fix
2. Skip this comment
3. Need more information
```
**After user decides, resolve the comment on GitHub:**
```bash
# If implemented or intentionally skipped, resolve the comment thread
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "THREAD_ID"}) {
thread { isResolved }
}
}
'
```
Alternatively, reply to the comment explaining the action taken:
```bash
# Reply to the comment
gh pr comment <PR_NUMBER> --body "Addressed in <commit-sha>: <brief description of fix>"
```
When showing comments:
- Show the **original code** being discussed
- Show the **full suggestion text** (truncate if >15 lines with "[truncated - N more lines]")
- Show the **suggested change** if CodeRabbit provided one
- Include **line numbers** for context
Wait for user approval before implementing each fix. This ensures:
- User maintains control over what changes are made
- No unnecessary changes are introduced
- Context-specific decisions can be made
### 4. Run Pre-commit Hooks
After making fixes, run pre-commit to ensure code style:
```bash
uv run pre-commit run --all-files
```
If issues are found, fix them and commit.
### 5. Run Tests
```bash
# Run tests (skip expensive API tests)
uv run pytest massgen/tests/ -v -m "not expensive and not docker" -x --tb=short
```
### 6. Validate Configs (if modified)
```bash
uv run python scripts/validate_all_configs.py
```
### 7. Commit and Push Fixes
```bash
# Stage fixes
git add -u .
# Commit with descriptive message
git commit -m "fix: address CodeRabbit review comments
- Fix error handling in foo.py
- Add missing type hints in bar.py
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>"
# Push to trigger CodeRabbit re-review
git push
```
### 8. Run PR Review Toolkit (Optional)
For additional analysis beyond CodeRabbit:
```
/pr-review-toolkit:review-pr
```
This runs specialized agents for:
- Code review against project guidelines
- Silent failure detection
- Type design analysis
- Test coverage analysis
### 9. (Optional) Run Local CodeRabbit Review
If you want to run a fresh local review (separate from GitHub PR comments):
```bash
coderabbit --prompt-only --type committed
```
**Note:** This runs CodeRabbit's own analysis locally, which may differ from the automated PR review. The GitHub PR comments from step 3 are typically more thorough since they have full PR context.
### 10. Generate Summary
After all checks, output a summary:
```
## PR Checks Summary
### Branch: feature/my-feature
- PR #123: "feat: add new feature"
- Commits ahead of main: 3
- Files changed: 5
### PR Description
โ
Has summary, test plan, and issue links
### CodeRabbit Comments Addressed
| Comment | File | Action |
|---------|------|--------|
| Add error handling | foo.py:45 | โ
Implemented |
| Consider caching | bar.py:12 | โ Skipped (not applicable) |
| Missing type hint | baz.py:78 | โ
Implemented |
### Check Results
| Check | Status |
|-------|--------|
| Pre-commit | โ
Passed |
| Tests | โ
47 passed |
| Config Validation | โ
Valid |
### Ready for Merge?
โ
All critical issues addressed, ready for final review
```
## Reference
### PR Description Template
```markdown
## Summary
<1-2 sentence overview of what this PR accomplishes>
### Changes
- <change 1: what was added/modified/removed>
- <change 2>
- <change 3>
### Technical details (if applicable)
<Implementation approach, architectural decisions, or non-obvious changes>
## Test plan
- [ ] Step to verify functionality
- [ ] Edge cases tested
- [ ] Error scenarios handled
## Related issues
Closes MAS-XXX
## Screenshots/recordings (if applicable)
<For UI/CLI changes>
## Breaking changes (if applicable)
<What breaks and migration steps>
```
### PR Title Format
Use conventional commits format:
- `feat:` - New feature
- `fix:` - Bug fix
- `docs:` - Documentation only
- `refactor:` - Code change that neither fixes a bug nor adds a feature
- `perf:` - Performance improvement
- `test:` - Adding or updating tests
- `chore:` - Maintenance tasks
### Pre-commit Hooks
- **black** - Python formatter (200 char line)
- **isort** - Import sorter
- **flake8** - Style checker
- **autoflake** - Remove unused imports
### Test Markers
- `@pytest.mark.expensive` - Skip in quick checks
- `@pytest.mark.docker` - Docker-dependent
### CodeRabbit Config
See `.coderabbit.yaml` for path-specific review instructions and eRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.