Apply PR Comments Skill
Read review comments on the current branch's PR, analyze them, and plan fixes — entering plan mode so the user approves before any code changes are made.
Context
Current branch: !git branch --show-current
Open PRs for this branch: !gh pr list --head "$(git branch --show-current)" --json number,title,url --jq '.[] | "#\(.number) \(.title) \(.url)"' 2>/dev/null || echo "(none found)"
Instructions
Follow these steps precisely:
Step 1 — Find the PR
- Extract the PR from the context above. If multiple PRs exist, use the most recent one.
- If no PR is found, try:
gh pr view --json number,title,url (uses current branch).
- If still no PR, tell the user and stop.
Step 2 — Fetch all review comments
Get PR review comments (inline code comments from reviewers):
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments --paginate --jq '.[] | {id, user: .user.login, path: .path, line: .line, body: .body, created_at: .created_at}'
Get PR issue comments (general discussion comments):
gh api repos/{owner}/{repo}/issues/{pr_number}/comments --paginate --jq '.[] | {id, user: .user.login, body: .body, created_at: .created_at}'
Get PR reviews (review-level comments with verdict):
gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews --paginate --jq '.[] | {id, user: .user.login, state: .state, body: .body}'
Filter out your own comments (from the PR author). Focus on comments from reviewers — typically:
gemini-code-assist[bot] or similar Gemini bots
openai-codex[bot] or similar Codex bots
dotllm-claude-code-bot[bot] (our own bot — skip these)
- Human reviewers (any other user)
If there are NO review comments, tell the user and stop.
Step 3 — Read referenced files
For each inline comment that references a specific file/line, read that file to understand the context. Use the Read tool to view the relevant code sections.
Step 4 — Enter plan mode
Use EnterPlanMode to enter planning mode. Then:
Summarize each comment — group by reviewer, show:
- Reviewer name
- Comment location (file:line if inline)
- What they're asking for
- Your assessment: agree / disagree / needs discussion
For each actionable comment, propose a fix:
- What file(s) to change
- What the change looks like (brief description, not full code)
- Any concerns or trade-offs
Flag comments to skip with reasoning:
- Nitpicks that don't apply to project conventions
- Suggestions that would hurt performance (critical for dotLLM)
- Incorrect suggestions (explain why)
Present the plan and wait for user approval via ExitPlanMode.
Step 5 — Apply approved fixes
After the user approves (exits plan mode):
- Implement each approved fix.
- Tell the user the fixes are applied and stop here — do NOT commit, push, or reply to comments.
The user will manually test and benchmark, then use /create-pr to commit+push and a separate skill to reply to comments when ready.
Additional arguments
If $ARGUMENTS is provided, use it as additional guidance (e.g., "focus only on Gemini comments", "skip style nits").
1---2name: apply-pr-comments3description: Read PR review comments from Gemini/Codex/humans, plan fixes, then apply after approval4---56# Apply PR Comments Skill78Read review comments on the current branch's PR, analyze them, and plan fixes — entering plan mode so the user approves before any code changes are made.910## Context1112Current branch: !`git branch --show-current`13Open PRs for this branch: !`gh pr list --head "$(git branch --show-current)" --json number,title,url --jq '.[] | "#\(.number) \(.title) \(.url)"' 2>/dev/null || echo "(none found)"`1415## Instructions1617Follow these steps precisely:1819### Step 1 — Find the PR20211. Extract the PR from the context above. If multiple PRs exist, use the most recent one.222. If no PR is found, try: `gh pr view --json number,title,url` (uses current branch).233. If still no PR, tell the user and stop.2425### Step 2 — Fetch all review comments26271. Get PR review comments (inline code comments from reviewers):28 `gh api repos/{owner}/{repo}/pulls/{pr_number}/comments --paginate --jq '.[] | {id, user: .user.login, path: .path, line: .line, body: .body, created_at: .created_at}'`29302. Get PR issue comments (general discussion comments):31 `gh api repos/{owner}/{repo}/issues/{pr_number}/comments --paginate --jq '.[] | {id, user: .user.login, body: .body, created_at: .created_at}'`32333. Get PR reviews (review-level comments with verdict):34 `gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews --paginate --jq '.[] | {id, user: .user.login, state: .state, body: .body}'`35364. Filter out your own comments (from the PR author). Focus on comments from reviewers — typically:37 - `gemini-code-assist[bot]` or similar Gemini bots38 - `openai-codex[bot]` or similar Codex bots39 - `dotllm-claude-code-bot[bot]` (our own bot — skip these)40 - Human reviewers (any other user)41425. If there are NO review comments, tell the user and stop.4344### Step 3 — Read referenced files4546For each inline comment that references a specific file/line, read that file to understand the context. Use the Read tool to view the relevant code sections.4748### Step 4 — Enter plan mode4950Use `EnterPlanMode` to enter planning mode. Then:51521. **Summarize each comment** — group by reviewer, show:53 - Reviewer name54 - Comment location (file:line if inline)55 - What they're asking for56 - Your assessment: agree / disagree / needs discussion57582. **For each actionable comment, propose a fix**:59 - What file(s) to change60 - What the change looks like (brief description, not full code)61 - Any concerns or trade-offs62633. **Flag comments to skip** with reasoning:64 - Nitpicks that don't apply to project conventions65 - Suggestions that would hurt performance (critical for dotLLM)66 - Incorrect suggestions (explain why)67684. Present the plan and wait for user approval via `ExitPlanMode`.6970### Step 5 — Apply approved fixes7172After the user approves (exits plan mode):73741. Implement each approved fix.752. Tell the user the fixes are applied and **stop here** — do NOT commit, push, or reply to comments.7677The user will manually test and benchmark, then use `/create-pr` to commit+push and a separate skill to reply to comments when ready.7879### Additional arguments8081If `$ARGUMENTS` is provided, use it as additional guidance (e.g., "focus only on Gemini comments", "skip style nits").