Review a PR or branch using a specific reviewer's technical preferences. Use when the user says "/review-as <name> <pr-number-or-branch>", "review this as matt", "what would matt say about this PR", or needs code reviewed against a particular person's standards.
Review PRs or branch changes using a specific reviewer's documented technical preferences and code standards.
/review-as <reviewer> <target>
Where:
<reviewer> - Name of reviewer (must have a file in reviewers/ directory)<target> - One of:
4698)https://github.com/Trunk-Tools/trunk-tools/pull/4698)HEAD or omitted (reviews current uncommitted changes)/review-as tt 4698
/review-as tt https://github.com/org/repo/pull/4698
/review-as tt feature-branch
/review-as tt HEAD
/review-as tt # reviews current changes
Read the reviewer's preferences file from skills/review-as/reviewers/<name>.md.
If the reviewer file doesn't exist, inform the user and list available reviewers.
Based on the target:
For PR number or URL:
gh pr diff <number> --repo <owner>/<repo>
For branch name:
git diff main...<branch>
# or
git diff master...<branch>
For HEAD or current changes:
git diff HEAD
Also fetch PR metadata if applicable:
gh pr view <number> --repo <owner>/<repo> --json title,body,files
Review the diff against each category in the reviewer's preferences file:
Output a structured review in this format:
## Review as [Reviewer Name]
### Summary
[1-2 sentence overall assessment]
### Issues Found
#### [Category Name] (from preferences)
**[File Path]:[Line Number]**
- Issue: [What's wrong]
- Suggestion: [How to fix it]
[Continue for each issue...]
### Approved Patterns
[Note any code that follows the reviewer's preferred patterns well]
### Questions for Author
[Any clarifying questions the reviewer would likely ask]
Reviewer preferences are stored in skills/review-as/reviewers/<name>.md:
# [Name]'s Code Review Preferences
## Overview
[Brief description of this reviewer's general philosophy]
## Priority Areas
[What this reviewer cares most about, in order]
## [Category 1]
### Prefers
- [Pattern they like]
### Flags
- [Pattern they would call out]
## [Category 2]
...
To add a new reviewer:
skills/review-as/reviewers/<name>.mdFocus on technical patterns and preferences, not verbal style.
Check the skills/review-as/reviewers/ directory for available reviewer profiles.