| name | pr-review |
| description | Review a PR against Venus Protocol coding standards (code quality, API patterns, design system). Accepts a PR number, URL, or auto-detects from the current branch. |
This skill is read-only. Do not edit, create, or delete any files. Only analyze and report.
Review a pull request for compliance with Venus Protocol coding standards defined in:
.claude/references/code-quality.md
.claude/references/api-patterns.md
.claude/references/design-system.md
Setup
Extract from $ARGUMENTS:
- pr - PR number or GitHub URL (e.g.
123 or https://github.com/.../pull/123) — optional, auto-detected from current branch if not provided
- Extra instructions (free-form, e.g. "focus on naming conventions")
PR auto-detection
If pr is not provided in $ARGUMENTS:
gh pr view --json number,title,url,baseRefName,headRefName 2>/dev/null
- If a PR is found -> use it automatically and display its title and number.
- If no PR is found -> abort with: "No open PR found for the current branch. Please provide a PR number: /pr-review "
Load reference documents
Always read all three reference files before reviewing (unless scope= restricts it):
cat .claude/references/code-quality.md
cat .claude/references/api-patterns.md
cat .claude/references/design-system.md
Fetch PR data
gh pr view {PR} --json number,title,body,baseRefName,headRefName,files
gh pr diff {PR}
Store the list of changed files and the full diff for analysis.
Review phases
Phase 1 — Changed file inventory
List all changed files grouped by layer:
| Layer | Path prefix | Relevant standards |
|---|
| API / query hooks | apps/evm/src/clients/ | api-patterns |
| Utilities | apps/evm/src/utilities/ | code-quality |
| Hooks | apps/evm/src/hooks/ | code-quality, api-patterns |
| Components / Containers / Pages | apps/evm/src/components/, containers/, pages/ | code-quality, design-system |
| Shared packages | packages/ui/, packages/chains/ | code-quality, design-system |
| Generated files | see generated paths in code-quality.md | must not be manually edited |
Phase 2 — Code quality checks
For each changed file, check the following rules from code-quality.md:
File & module structure
Control flow
TypeScript
Naming conventions
Data-type conventions (object properties)
Import conventions
Generated files
Phase 3 — API pattern checks
For files under clients/api and any hooks/containers that fetch data:
Phase 4 — Design system checks
For files under components/, containers/, pages/, and packages/ui/:
Output format
Print the review directly to the terminal. Do not save to disk.
Report structure
## PR #N — Title (branch → main)
### Verdict: PASS | NEEDS CHANGES
One-sentence summary.
### Critical (N)
- [file:line] Rule violated — description of the issue.
### Warnings (N)
- [file:line] Rule — description.
### Suggestions (N)
- [file:line] Suggestion — description.
Omit any section that has zero items.
Severity mapping:
| Severity | Condition |
|---|
| Critical | Violates an explicit rule from the reference docs (prohibited pattern, wrong data-type convention, manual edit of generated file, nested conditional, multiple exports per file, etc.) |
| Warning | Violates a "discouraged" pattern or a naming convention |
| Suggestion | Missed reuse opportunity, minor style inconsistency, or improvement that does not violate a rule |
Error handling
- PR not found: Abort with "PR '{PR}' not found. Check the number and that
gh is authenticated."
gh not installed: Abort with "GitHub CLI (gh) is required. Install it and run gh auth login."
- No changed files: Warn "PR has no changed files" and exit cleanly.
- Reference file missing: Warn which file is missing and continue with the remaining references.
Usage examples
/pr-review
/pr-review 1234
/pr-review 99 scope=api
/pr-review 1234 focus on data-type property naming