| name | pr-review |
| description | Review pull requests for the Kafka IntelliJ plugin. Checks for IntelliJ Platform best practices, threading safety, proper service usage, localization, and project-specific patterns. Use when reviewing PRs, doing self-review before sharing with the team, or when user mentions "review PR", "help with PR", "review changes", "self-review", "review local changes", or "check my PR". |
| allowed-tools | ["Bash","Read","Grep","Glob"] |
Pull Request Review
Review pull requests for the Kafka IntelliJ Plugin following project conventions and IntelliJ
Platform best practices.
Invocation
/pr-review [PR number or URL]
If no PR number is provided, review the current branch's changes against the main branch.
Process
1. Gather PR Information
If PR number/URL provided:
gh pr view <PR_NUMBER> --json number,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,state,reviewDecision
gh pr view --json number,title,body,author,baseRefName,headRefName,additions,deletions,changedFiles,state,reviewDecision
gh pr diff <number>
gh pr view <PR_NUMBER> --json reviews,comments
gh issue view <ISSUE_NUMBER> --json body,comments
If reviewing local changes or current branch:
git diff --name-only HEAD~1
git diff main --name-only
git diff main --stat
git diff main
2. Identify Changed Files
Categorize the changes:
3. Review Checkpoints
IMPORTANT: Only review lines that were actually changed in the PR diff. Do not flag issues in
surrounding unchanged code. The review must be scoped strictly to the lines added or modified by
the PR. Context lines from the diff are for understanding only — they are not subject to review.
For each changed file, verify compliance with project standards:
Threading Model
IDE Infrastructure
Services & Extensions
Localization
Data Models
Testing
Code Quality
4. Security Considerations
Flag any changes that:
- Handle user credentials or authentication tokens
- Process external input (network, files)
- Execute system commands
- Access file system outside project scope
5. Generate Review Summary
## PR Review: [Title]
### Overview
[Brief summary of what the PR does]
### Findings
#### Issues (Must Fix)
- [ ] **[Category]**: [Description] — [File:Line]
#### Suggestions (Consider)
- [ ] **[Category]**: [Description] — [File:Line]
#### Positive Notes
- [What's done well]
### Checklist Compliance
- Threading: [Pass/Issues found]
- Localization: [Pass/Issues found]
- Testing: [Pass/Issues found]
- Documentation: [Pass/Issues found]
### Recommendation
[Approve / Request Changes / Needs Discussion]
Review Categories
Use these category labels in findings:
| Category | Description |
|---|
threading | EDT blocking, wrong dispatcher, scope issues |
psi-safety | Missing read/write actions, stale references |
memory | Leaks, missing disposable registration |
l10n | Missing localization, hardcoded strings |
testing | Missing tests, wrong annotations |
style | Naming, patterns, project conventions |
security | Credential handling, input validation |
performance | Inefficient code, blocking operations |
api | Using internal APIs, deprecated methods |
Example Output
## PR Review: Add topic deletion confirmation dialog
### Overview
Adds a confirmation dialog before deleting Kafka topics, with an option to remember the choice.
### Findings
#### Issues (Must Fix)
- [ ] **threading**: Dialog shown from background thread without `withContext(Dispatchers.EDT)`
— `src/io/confluent/intellijplugin/topic/DeleteTopicAction.kt:42`
- [ ] **l10n**: Hardcoded string "Are you sure?" should use `KafkaMessagesBundle.message()`
— `src/io/confluent/intellijplugin/topic/DeleteTopicAction.kt:45`
#### Suggestions (Consider)
- [ ] **style**: Consider extracting dialog logic to a separate `ConfirmationDialogHelper` class
— `src/io/confluent/intellijplugin/topic/DeleteTopicAction.kt:40-60`
#### Positive Notes
- Good use of `PersistentStateComponent` for remembering user preference
- Test coverage for both confirmation paths
### Checklist Compliance
- Threading: Issues found (1)
- Localization: Issues found (1)
- Testing: Pass
- Documentation: Pass
### Recommendation
Request Changes — Fix threading and localization issues before merging.