Pr ReviewCAUTION
Tensors and Dynamic neural networks in Python with strong GPU acceleration
Overview
Tensors and Dynamic neural networks in Python with strong GPU acceleration
beceef3c02daOBSERVED · 2026-10-26What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: pr-review description: Review PyTorch pull requests for code quality, test coverage, security, and backward compatibility. Use when reviewing PRs, when asked to review code changes, or when the user mentions "review PR", "code review", or "check this PR". --- # PyTorch PR Review Skill Review PyTorch pull requests focusing on what CI cannot check: code quality, test coverage adequacy, security vulnerabilities, and backward compatibility. ## Usage Modes ### No Argument If the user invokes `/pr-review` with no arguments, **do not perform a review**. Instead, ask the user what they would like to review: > What would you like me to review? > - A PR number or URL (e.g., `/pr-review 12345`) > - A local branch (e.g., `/pr-review branch`) ### Local CLI Mode The user provides a PR number or URL: ``` /pr-review 12345 /pr-review https://github.com/pytorch/pytorch/pull/12345 ``` For a detailed review with line-by-line specific comments: ``` /pr-review 12345 detailed ``` Use `gh` CLI to fetch PR data: ```bash # Get PR details gh pr view <PR_NUMBER> --json title,body,author,baseRefName,headRefName,files,additions,deletions,commits # Get the diff gh pr diff <PR_NUMBER> # Get PR comments gh pr view <PR_NUMBER> --json comments,reviews ``` ### Local Branch Mode Review changes in the current branch that are not in `main`: ``` /pr-review branch /pr-review branch detailed ``` Use git commands to get branch changes: ```bash # Get current branch name git branch --show-current # Get list of changed files compared to main git diff --name-only main...HEAD # Get full diff compared to main git diff main...HEAD # Get commit log for the branch git log main..HEAD --oneline # Get diff stats (files changed, insertions, deletions) git diff --stat main...HEAD ``` For local branch reviews: - The "Summary" should describe what the branch changes accomplish based on commit messages and diff - Use the current branch name in the review header instead of a PR number - All other review criteria apply the same as PR reviews ### GitHub Actions Mode When invoked via `@claude /pr-review` on a GitHub PR, the action pre-fetches PR metadata and injects it into the prompt. Detect this mode by the presence of `<formatted_context>`, `<pr_or_issue_body>`, and `<comments>` tags in the prompt. The prompt already contains: - PR metadata (title, author, branch names, additions/deletions, file count) - PR body/description - All comments and review comments (with file/line references) - List of changed files with paths and change types Use git commands to get the diff and commit history. The base branch name is in the prompt context (look for `PR Branch: <head> -> <base>` or the `baseBranch` field). ```bash # Get the full diff against the base branch git diff origin/<baseBranch>...HEAD # Get diff stats git diff --stat origin/<baseBranch>...HEAD # Get commit history for this PR git log origin/<baseBranch>..HEAD --oneline # If the base branch ref is not available, fetch it first git fetch origin <baseBranch> --depth=1 ``` Do NOT use `gh` CLI commands in this mode -- only git commands are available. All PR metadata, comments, and reviews are already in the prompt context; only the diff and commit log need to be fetched via git. ## Review Philosophy A single line of code can have deep cross-cutting implications: a missing device guard causes silent data corruption on multi-GPU, a missing `Composite` dispatch key breaks every out-of-tree backend, a manual dtype check instead of `TensorIterator` silently skips type promotion. **Treat every line as potentially load-bearing.** 1. **Only report problems** — The review output must contain only issues, concerns, and actionable suggestions. Do NOT mention things that are done correctly, do NOT praise good decisions, do NOT explain why something is fine. If a section has no problems, omit it entirely. The reader's time is precious — every sentence must point to something that needs fixing or further discussion. 2. **Investigate, don't guess** — When uncertain whether a checklist item applies, spawn a sub-agent to read the relevant code. A reviewer who guesses wrong provides negative value. 3. **Review the design, not just the implementation** — A PR can have perfectly correct implementation of a bad design. Question side-channel communication, on/off private flags, and demand concrete interface documentation for new contracts between components. 4. **Focus on what CI cannot check** — Don't comment on formatting, linting, type errors, or CI failures. Focus on design quality, interface correctness, thread safety, BC implications, test adequacy, and pattern adherence. 5. **Everything is a must-fix** — There are no "nits." If it's worth mentioning, it's worth fixing. Every inconsistency degrades the codebase over time. 6. **Be specific and actionable** — Reference file paths and line numbers. Name the function/class/file the author should use. 7. **Match the immediate context** — Read how similar features are already implemented in the same file. Pattern mismatches within a file are always wrong. 8. **Assume competence** — The author knows PyTorch; explain only non-obvious context. 9. **No repetition** — Each observation appears in exactly one section of the review output. ### Using sub-agents The review checklist is large. You cannot hold the full context of every infrastructure system in your head. **Spawn sub-agents** to investigate whether checklist items apply: read surrounding code, infrastructure the PR should be using, or tests that should exist. Spawn them in parallel for independent areas. A typical medium PR should spawn 3-8 sub-agents. Sub-agents overlap on purpose. Expect the same defect back from two or three of them in different words; that signals importance, not multiplicity. Reconcile in Step 4, before spending verification agents on it. ## Directory Review Guides (`REVIEW.md`) Any directory may contain a `REVIEW.md` with review rules for code
Trust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (5)
.claude/skills
.dockerignore
.github/ci_commit_pins/triton.txt
AGENTS.md
docs/requirements.txt
Gates applied: no_behavioural_pass.
beceef3c02dafull audit observations/trust-audit/skill/pytorch__pr-review.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-26 | beceef3c02da | CAUTION | B | 89 | first audit |
Questions
What does the pr-review — pytorch/pytorch skill do?
Tensors and Dynamic neural networks in Python with strong GPU acceleration
Is pr-review — pytorch/pytorch safe to install?
With care. The audit graded it B (89/100) and found 5 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can pr-review — pytorch/pytorch access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (beceef3c02da), read on 2026-10-26. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/pytorch/pr-review/)
Not your listing, or something out of date? Claim or update your listing.