$npx -y skills add dgk-dev/dgk-gpt --skill rr코드 리뷰. 작업 후 변경사항을 Z.AI 모델로 검토하고, Codex가 결과를 다시 검증해 유효한 이슈만 정리한다. /rr 또는 'GLM 리뷰' 요청 시 사용.
| 1 | # /rr |
| 2 | |
| 3 | Use `glm-review` as a second reviewer for the current change set, then validate the reported issues against the actual code before you trust or repeat them. |
| 4 | |
| 5 | ## Default Flow |
| 6 | |
| 7 | 1. Determine the exact change scope first. |
| 8 | - If the user points to a commit, prefer commit mode. |
| 9 | - If the user says `staged`, use staged mode. |
| 10 | - If the user says `pr`, use PR mode. |
| 11 | - If the workspace has mixed unrelated changes, build a focused diff file for only the intended files. |
| 12 | 2. Run a quick connectivity check only when the environment looks suspect: |
| 13 | |
| 14 | ```bash |
| 15 | glm-review --health |
| 16 | ``` |
| 17 | |
| 18 | 3. Run the review with the narrowest correct input: |
| 19 | |
| 20 | ```bash |
| 21 | glm-review |
| 22 | glm-review --mode staged |
| 23 | glm-review --mode pr |
| 24 | glm-review --mode commit --ref <COMMIT_HASH> |
| 25 | glm-review --diff-file /tmp/glm-review-diff.patch |
| 26 | ``` |
| 27 | |
| 28 | 4. Treat the output as a candidate issue list, not ground truth. |
| 29 | 5. Re-open the referenced code and verify each claim. |
| 30 | 6. Report only valid issues, ordered by severity. |
| 31 | 7. If fixing issues is in scope, fix them and rerun the closest relevant verification. |
| 32 | |
| 33 | ## Choosing Review Input |
| 34 | |
| 35 | Prefer the most specific path that isolates the current task: |
| 36 | |
| 37 | - committed single change: |
| 38 | |
| 39 | ```bash |
| 40 | glm-review --mode commit --ref <COMMIT_HASH> |
| 41 | ``` |
| 42 | |
| 43 | - committed subset of files: |
| 44 | |
| 45 | ```bash |
| 46 | glm-review --mode commit --ref <COMMIT_HASH> --files src/a.ts src/b.ts |
| 47 | ``` |
| 48 | |
| 49 | - custom focused diff for multi-session or mixed worktrees: |
| 50 | |
| 51 | ```bash |
| 52 | GIT_ROOT=$(git rev-parse --show-toplevel) |
| 53 | cd "$GIT_ROOT" && git diff HEAD -- <file1> <file2> ... > /tmp/glm-review-diff.patch |
| 54 | glm-review --diff-file /tmp/glm-review-diff.patch |
| 55 | ``` |
| 56 | |
| 57 | If the diff is empty, stop and say there is nothing to review. |
| 58 | |
| 59 | ## Validation Rules |
| 60 | |
| 61 | - Do not parrot `glm-review` output without checking the code. |
| 62 | - Drop false positives explicitly instead of forwarding them. |
| 63 | - Distinguish between confirmed bugs, arguable style comments, and already-fixed issues. |
| 64 | - If the review claims a regression, inspect the relevant file and the actual diff before accepting it. |
| 65 | |
| 66 | ## Error Handling |
| 67 | |
| 68 | Common fixes: |
| 69 | |
| 70 | - `command not found: glm-review` |
| 71 | Install it with `npm install -g glm-review` |
| 72 | - `ZAI_API_KEY not set` |
| 73 | Export `ZAI_API_KEY` in the shell or your normal secret-loading path before rerunning |
| 74 | - `401` or auth failure |
| 75 | Re-run `glm-review --health` after refreshing credentials |
| 76 | |
| 77 | ## Finish |
| 78 | |
| 79 | Return: |
| 80 | |
| 81 | - review scope used |
| 82 | - confirmed findings only |
| 83 | - what was rejected as false positive, if anything material |
| 84 | - what verification ran after fixes, if any |