| name | pr-review |
| description | Workflow for reviewing pull requests via GitHub MCP or GitHub CLI (gh) and team coding standards. Use when reviewing PRs, checking code quality, or providing structured review feedback. |
PR Review Workflow
Workflow
- [ ] Step 1: Fetch PR details (MCP or gh — see below)
- [ ] Step 2: Review diff by area
- [ ] Step 3: Check cross-cutting concerns
- [ ] Step 4: Provide structured feedback
Step 1: Fetch PR Details
Use one of the following. Prefer MCP when it is connected and healthy; otherwise use GitHub CLI in the project repo (or any cwd) with a logged-in user.
Option A: GitHub MCP (when available)
Read the MCP tool schemas in the Cursor mcps folder, then call the documented tools. Typical names:
get_pull_request — title, description, author, base/head branches
get_pull_request_files — list of changed files
get_pull_request_diff — full diff
Option B: GitHub CLI (gh)
Requires GitHub CLI installed and authenticated (gh auth status succeeds).
One-time login (interactive):
gh auth login
Follow the prompts: GitHub.com vs Enterprise, HTTPS vs SSH, then either “Login with a web browser” or “Paste an authentication token.”
Credentials you need:
| Method | What you use |
|---|
| Web browser | Your normal GitHub account sign-in (SSO/org access if the org requires it). No manual token copy if you use the browser flow. |
| Personal Access Token (HTTPS) | A classic PAT with at least repo (private repos), or a fine-grained token with Repository access to the target repo and permissions: Contents Read, Metadata Read, Pull requests Read. |
Verify:
gh auth status
Fetch PR metadata and changed files (replace OWNER, REPO, N):
gh pr view N --repo OWNER/REPO --json title,body,author,baseRefName,headRefName,state,commits,files
Full diff (patch):
gh pr diff N --repo OWNER/REPO
List file names only:
gh pr view N --repo OWNER/REPO --json files --jq '.files[].path'
Checkout the PR branch locally (optional, for git inspection):
gh pr checkout N --repo OWNER/REPO
If gh prints 401 or 403, complete gh auth login or refresh SSO (gh auth refresh -h github.com with -s scopes if needed).
After fetching, proceed to Step 2 using the same review checklists whether data came from MCP or gh.
Step 2: Review by Area
Backend Changes (backend/)
Frontend Changes (pulse-ui/)
AI Agent Changes (pulse_ai/)
Deploy Changes (deploy/)
Step 3: Cross-Cutting
- Alert metric changes → all 5 layers updated?
- New env vars → added to
.env.example?
- New API endpoints → DTO + service + DAO + mapper + tests?
- Security: no secrets, keys, or credentials in code?
Step 4: Feedback Format
## Review Summary
### Critical (must fix)
- ...
### Suggestions (should improve)
- ...
### Nice to Have (optional)
- ...
Include specific file:line references and code examples for fixes.