| name | resolve |
| description | Resolve PR review comments by fetching unresolved feedback and making necessary code changes |
| disable-model-invocation | true |
| allowed-tools | Skill, Read, Edit, Write, Glob, Grep, Bash |
| argument-hint | [extra_context] |
Resolve PR Review Comments
Automatically fetch and address PR review comments. This command examines review feedback and makes necessary code changes to resolve the issues.
Usage
/resolve [extra_context]
Arguments
extra_context (optional): Additional instructions or filtering context (e.g., focus on specific files or issue types)
Examples
/resolve # Address all unresolved PR comments
/resolve Focus on type hint issues only # Filter specific comment types
/resolve Skip comments from automated bots # Apply custom filtering
/resolve Only resolve comments in mlflow/tracking/ # Focus on specific directories
Instructions
-
Auto-detect PR context:
- First check for environment variables:
- If
PR_NUMBER and GITHUB_REPOSITORY are set, read them and parse GITHUB_REPOSITORY as owner/repo and use PR_NUMBER directly
- Then use
gh pr view <PR_NUMBER> --repo <owner/repo> --json 'title,body' to retrieve the PR title and description
- Otherwise:
- Use
gh pr view --json 'title,body,url,number' to get PR info for the current branch
- Parse the output to extract owner, repo, PR number, title, and description
- If neither method works, inform the user that no PR was found and exit
-
Fetch unresolved review comments:
- Invoke the
fetch-unresolved-comments skill to get only unresolved review threads
- If no unresolved comments are found, inform the user and exit
-
Apply additional filtering from user instructions if provided (e.g., focus on specific files or issue types)
-
For each unresolved review comment:
- Read the file and surrounding code for context
- Make minimal, precise changes to address the feedback
-
After making all changes, run pre-commit on changed files:
- Run
pre-commit run --files <changed files> to lint and auto-fix formatting until it passes
- DO NOT commit or push changes