Skip to content

Commit f3b5e53

Browse files
committed
more feedback from greptile
1 parent 52569c0 commit f3b5e53

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.claude/skills/review-code/SKILL.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ Run these commands in parallel using `gh`:
3636
2. **PR diff**: `gh pr diff <number>`
3737
3. **PR files**: `gh pr diff <number> --name-only`
3838
4. **PR commits**: `gh pr view <number> --json commits --jq '.commits[].messageHeadline'`
39-
5. **Existing inline review comments**: `gh api repos/{owner}/{repo}/pulls/<number>/comments --jq '.[].body'`
40-
5b. **Existing PR-level reviews** (top-level review bodies from "Review changes"): `gh api repos/{owner}/{repo}/pulls/<number>/reviews --jq '.[].body'`
39+
5. **Existing inline review comments**: `gh api repos/{owner}/{repo}/pulls/<number>/comments --paginate --jq '.[].body'`
40+
5b. **Existing PR-level reviews** (top-level review bodies from "Review changes"): `gh api repos/{owner}/{repo}/pulls/<number>/reviews --paginate --jq '.[].body'`
4141
6. **Repo info**: `gh repo view --json nameWithOwner -q '.nameWithOwner'`
4242

4343
Then get the PR branch locally for full file access. Prefer a **worktree** so your current branch and uncommitted work are untouched:
4444

4545
```bash
46-
git fetch origin pull/<number>/head:pr-<number>
47-
git worktree add checkouts/review-<number> pr-<number>
48-
# Run the rest of the review from checkouts/review-<number>; when done: git worktree remove checkouts/review-<number>
46+
git fetch origin pull/<number>/head:pr-<number> --force
47+
git worktree add /tmp/review-<number> pr-<number>
48+
# Cleanup when done: git worktree remove /tmp/review-<number> && git branch -D pr-<number>
4949
```
5050

51-
If worktrees aren't suitable, you can use `gh pr checkout <number>` (this switches your current branch — only if you have no uncommitted work).
51+
If worktrees aren't suitable, you can use `gh pr checkout <number>` (this switches your current branch — only if you have no uncommitted work). Run the rest of the review from `/tmp/review-<number>`.
5252

5353
If checkout isn't possible (e.g., external fork), use `gh api` to fetch file contents:
5454

@@ -64,7 +64,11 @@ gh api repos/{owner}/{repo}/contents/{path}?ref={head-branch} --jq '.content' |
6464

6565
### If Branch mode (no number)
6666

67-
Run these commands in parallel:
67+
First, fetch the base branch to ensure the remote ref is current:
68+
69+
0. **Fetch base**: `git fetch origin <base>`
70+
71+
Then run these commands in parallel:
6872

6973
1. **Current branch**: `git branch --show-current`
7074
2. **Commits on branch**: `git log origin/<base>..HEAD --oneline`
@@ -102,7 +106,7 @@ Before diving into details, build a mental model:
102106
3. **Group changed files** by module/package to identify which areas are affected
103107
4. **Identify the primary goal** (feature, refactor, bugfix, etc.)
104108
5. **Note cross-cutting concerns** (e.g., a rename that touches many files vs. substantive logic changes)
105-
6. **Check existing feedback** (PR mode): inspect both inline comments (step 1.5) and PR-level review bodies (step 1.5b) so you don't duplicate feedback already given
109+
6. **Check existing feedback** (PR mode): inspect both inline comments (Step 1, item 5) and PR-level review bodies (Step 1, item 5b) so you don't duplicate feedback already given
106110

107111
## Step 4: Review Each Changed File (Multi-Pass)
108112

@@ -190,7 +194,7 @@ If the branch isn't checked out locally (e.g., external fork in PR mode), skip t
190194

191195
Output a structured review using the format below. Use the **PR template** or **Branch template** for the overview depending on the mode.
192196

193-
Write the review to a **temporary markdown file** (e.g. `review-<pr-or-branch>.md` or `.review-output.md`) so other agents or tools can consume it. Do not commit this file; treat it as ephemeral.
197+
Write the review to a **temporary markdown file outside the repository** (e.g. `/tmp/review-<pr-or-branch>.md`) so other agents or tools can consume it without polluting `git status`. Do not commit this file; treat it as ephemeral.
194198

195199
---
196200

0 commit comments

Comments
 (0)