Skip to content

Commit 929f97a

Browse files
author
Amaury
committed
add pr-review skill to global agents for others llm
1 parent 9fbe635 commit 929f97a

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: review-changes
3+
description: Reviews the current branch diff against this project's architecture, conventions, and code review checklist. Use when the user asks to "review my changes", "review the diff", "check my code", "run a code review", or "review this branch".
4+
allowed-tools: Bash(git:*), Read
5+
---
6+
7+
# Review Changes
8+
9+
## Purpose
10+
11+
Perform a code review of the current branch diff against the project's architecture rules, coding conventions, and the REVIEW.md checklist. Report findings grouped by category, with file and line references where possible.
12+
13+
## Workflow
14+
15+
1. Read the project rules:
16+
- `AGENTS.md` — critical constraints and glossary
17+
- `REVIEW.md` — the review checklist; this is the primary source of truth for what to flag
18+
- `agent_docs/architecture.md` — layer diagram, routing conventions, dual auth system
19+
- `agent_docs/conventions.md` — API hooks, styling, forms, i18n, anti-patterns
20+
21+
2. Inspect the branch diff:
22+
- Run `git fetch origin master`.
23+
- Run `git log origin/master..HEAD --oneline` to understand the commit scope.
24+
- Run `git diff origin/master...HEAD --stat` to see which files changed.
25+
- Run `git diff origin/master...HEAD` to read the full diff.
26+
27+
3. If a changed file needs more context to review correctly (e.g. to check imports, types, or hook usage), use Read to open it.
28+
29+
4. Review the diff against every category in REVIEW.md:
30+
- API & Query layer
31+
- Auth & security
32+
- Type safety
33+
- i18n
34+
- Styling
35+
- Testing
36+
- Performance
37+
38+
5. Also check for violations of the critical constraints in `AGENTS.md`:
39+
- Package manager (`pnpm` only)
40+
- Env values via `Env` from `@/lib/env`
41+
- No auth logic in screen components
42+
- No manual camelCase↔snake_case conversion
43+
- No direct MMKV access in components
44+
- All strings through `useTranslation()`
45+
- `createMutation` / `createQuery` from `react-query-kit`
46+
- `createQueryKeys` in `src/api/query-factory.ts`
47+
- `@shopify/flash-list` for growable lists
48+
- `expo-crypto` for random IDs
49+
- `react-hook-form` + `zod` for forms
50+
- `moti` or `react-native-reanimated` for animations (no `Animated` from RN directly)
51+
52+
6. Check layer boundaries from `agent_docs/architecture.md`:
53+
- Data flows down: `app/ → components/ → api/ → lib/`
54+
- Route guards belong only in `src/app/_layout.tsx`, never in screen files
55+
- Auth state management belongs only in `src/components/providers/auth.tsx` and `src/lib/auth/index.tsx`
56+
57+
## Output Format
58+
59+
Group findings by REVIEW.md category. For each finding:
60+
61+
```
62+
**[Category]** `path/to/file.ts` — short description of the issue and what the correct approach is.
63+
```
64+
65+
If a category has no issues, skip it.
66+
67+
End the report with one of:
68+
- **No issues found** — if the diff is clean across all categories.
69+
- **X issue(s) found** — a one-line summary count.
70+
71+
Do not suggest stylistic preferences not grounded in REVIEW.md, AGENTS.md, or agent_docs/. Do not flag things that are already handled automatically by the interceptors or tooling (e.g. case conversion, token injection).

0 commit comments

Comments
 (0)