with one click
pr-review-navigator
// Generate AI-assisted navigation aids to help humans start reviewing a pull request more efficiently. Use when starting a PR review to get oriented on large or unfamiliar changes.
// Generate AI-assisted navigation aids to help humans start reviewing a pull request more efficiently. Use when starting a PR review to get oriented on large or unfamiliar changes.
Set up the restore-context hook so skills can resume workflows after /clear and /compact. Use when setting up a new project or after cloning a repo that uses restore-context skills.
Manage restore context files so skills can survive /clear and /compact. Use to write, delete, check, or list .agent-restore-context-* files.
Fetch Jira ticket, create branch, implement changes, commit, push, open PR.
Persist guidelines, conventions, and architectural decisions into the repository's knowledge base. Use when told to remember something for future sessions.
Perform migrations for Renovate dependency upgrades based on breaking changes identified in a review. Use after running /renovate-review.
Review Renovate dependency upgrade PRs to assess safety and effort. Use when reviewing PRs from Renovate bot that update NPM dependencies.
| name | pr-review-navigator |
| description | Generate AI-assisted navigation aids to help humans start reviewing a pull request more efficiently. Use when starting a PR review to get oriented on large or unfamiliar changes. |
| disable-model-invocation | false |
| argument-hint | [pr-number] [--comment] |
| allowed-tools | Bash, Grep, Glob, Read |
| scope | ["github","review"] |
Generate navigation aids to help humans review pull requests more efficiently. Provides orientation and structure, not pre-review or judgment.
Important constraints:
pr-number (required): The PR number to review--comment (optional): Post the navigator output as a PR comment. If omitted, write to a local markdown file.gh pr view $ARGUMENTS --json title,body,files,additions,deletions,url
Extract: changed files, additions/deletions count, PR URL for link construction.
For commits/branches without a PR, use git show --name-status and git diff.
gh pr diff <pr-number>
Understand file contents and relationships from the diff.
Read imports/references in the diff to determine which files depend on which.
Based on dependency flow, use outside-in ordering:
Create a flowchart TB showing:
fill:#e8f5e9), integration tests blue (fill:#e3f2fd, dashed border)Node format: ["โ filename.ext<br/><i>one-liner</i>"]
Cornichon test styling:
subgraph "๐งช Integration Tests (Cornichon)"
style IntegrationTests fill:#e3f2fd,stroke:#1976d2,stroke-width:2px,stroke-dasharray: 5 5
...
end
A numbered table with columns:
# - Review order numberFile - Filename (short, without full path)What it does - One factual sentence about what the file contains/doesLink - Anchor link to the file in the PRGitHub uses SHA256 hashes of file paths for PR file anchors:
hash=$(echo -n "<filepath>" | shasum -a 256 | cut -d' ' -f1)
# Link: https://github.com/{owner}/{repo}/pull/{number}/files#diff-{hash}
Use the file path exactly as returned by gh pr view --json files. Compute the hash for each file.
For commits/branches without a PR, omit the Link column.
If --comment flag is provided, post as a PR comment:
gh pr comment <pr-number> --body "<content>"
If --comment is NOT provided, write to pr-review-navigator.md in the workspace root and inform the user of the file path.
The output (whether file or comment) should be valid markdown structured as:
## AI Review Navigator
**Summary:** <one factual sentence about what was added/changed/removed>
---
### File Relationships & Review Order
\`\`\`mermaid
flowchart TB
subgraph "1๏ธโฃ API Layer"
A["โ FeatureXController.scala<br/><i>HTTP endpoints</i>"]
end
subgraph "2๏ธโฃ Service Layer"
B["โก FeatureXService.scala<br/><i>Business logic</i>"]
end
subgraph "3๏ธโฃ Unit Tests"
C["โข FeatureXServiceSpec.scala"]
end
subgraph IntegrationTests ["๐งช Integration Tests (Cornichon)"]
D["โฃ FeatureXFeature.scala"]
end
A --> B
B -.->|tested by| C
A -.->|tested by| D
style C fill:#e8f5e9
style IntegrationTests fill:#e3f2fd,stroke:#1976d2,stroke-width:2px,stroke-dasharray: 5 5
\`\`\`
---
### Suggested Review Order
| # | File | What it does | Link |
| --- | --------------------------- | ---------------------------- | ------------ |
| 1 | `FeatureXController.scala` | HTTP endpoints for FeatureX | [View](link) |
| 2 | `FeatureXService.scala` | Business logic | [View](link) |
| 3 | `FeatureXServiceSpec.scala` | Unit tests for service layer | [View](link) |
| 4 | `FeatureXFeature.scala` | Cornichon integration tests | [View](link) |
Summary rules:
mermaid language identifier so GitHub renders it as a diagram.