Données & RechercheSûr100100/100
Fix PR (PyTorch)
Address CI failures and unresolved review comments on a Helion pull request. Auto-activate when the user mentions a URL like https://github.com/pytorch/helion/pull/<number>.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs fix-pr__pytorch-helion__claude-skills-4d61fee9d480PyTorch
pytorch/helion
Contenu à copier
---
name: fix-pr
description: Address CI failures and unresolved review comments on a Helion pull request. Auto-activate when the user mentions a URL like https://github.com/pytorch/helion/pull/<number>.
metadata:
origin: PyTorch
---
# Fix a Helion pull request
Goal: bring a PR green by fixing CI failures and addressing unresolved review comments. Leave the fixes **uncommitted and unstaged** — the user handles committing and updating the PR.
This skill fixes the single PR for the HEAD commit. To fix every PR in a stack-pr stack, use the fix-pr-stack skill instead.
## 1. Identify the target PR
Run `git log -n1` to see the current commit. The local commit must correspond to the PR being fixed.
Resolve the PR number using whichever sources are available:
- **User-provided URL** (e.g. `https://github.com/pytorch/helion/pull/1234`): extract the PR number directly.
- **Commit message stack-info line**: look for a line of the form
```
stack-info: PR: https://github.com/pytorch/helion/pull/<number>, branch: ...
```
Use the URL on that line. Ignore the `branch:` value — do **not** run any `checkout`, `branch`, or `switch` commands.
- **Both present**: if the user-provided URL and the stack-info URL disagree, abort with an error.
- **Neither present**: abort with an error explaining that the PR could not be identified.
Then fetch the PR metadata with `gh pr view <number> --repo pytorch/helion --json title,body,...`. **Verify the PR title matches the local commit's subject line.** If they differ, abort with an error — the local commit does not match the PR.
## 2. Fix CI failures
Use `gh` to list the PR's check runs and pull failure logs:
```
gh pr checks <number> --repo pytorch/helion
gh run view <run-id> --log-failed --repo pytorch/helion
```
For each failing check:
- **Infra failures** (most commonly `CUDA Compute Check`, runner provisioning errors, transient network issues): do not attempt to fix. Note them and report at the end.
- **Real failures** (lint, type-check, test failures, build errors): read the logs, locate the root cause, and fix it in the working tree. Re-run the relevant check locally when feasible (e.g. `./lint.sh`, `pytest <file>::<test>`) to confirm the fix.
## 3. Address unresolved review comments
Fetch inline review threads with GraphQL — the REST endpoints don't report whether a thread is resolved:
```
gh api graphql -F n=<number> -f query='query($n:Int!){repository(owner:"pytorch",name:"helion"){pullRequest(number:$n){reviewThreads(first:100){nodes{isResolved isOutdated path comments(first:20){nodes{author{login} body diffHunk}}}}}}}'
```
Review summaries and the top-level conversation come from:
```
gh api repos/pytorch/helion/pulls/<number>/reviews
gh pr view <number> --repo pytorch/helion --comments
```
For each thread with `isResolved: false`, and each unaddressed review summary or top-level comment, apply the requested change in the working tree. If `isOutdated` is true, the code changed after the comment: find the spot via `path` + `diffHunk` and check whether it's already addressed. Skip comments that are non-actionable (praise, questions answered in thread) or that the author explicitly waved off.
## 4. Wrap up
- Leave all fixes **uncommitted and unstaged**. Do not run `git add`, `git commit`, `git push`, or any rebase/checkout commands.
- Report a short summary covering:
- PR identified (number + title)
- CI failures fixed (with file:line where useful)
- Review comments addressed
- Any infra failures skipped (so the user knows to retry them)
- Anything that could not be fixed and whyColle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Fix PR (PyTorch)
**User-provided URL** (e.g. `https://github.com/pytorch/helion/pull/1234`): extract the PR number directly.
**Commit message stack-info line**: look for a line of the form
**Both present**: if the user-provided URL and the stack-info URL disagree, abort with an error.
**Neither present**: abort with an error explaining that the PR could not be identified.
Comment utiliser Fix PR (PyTorch)
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Fix PR (PyTorch)
Dis simplement à ton agent quelque chose comme :
Applique le skill fix-pr__pytorch-helion__claude-skills-4d61fee9d480 à cette tâche
Utilise fix-pr__pytorch-helion__claude-skills-4d61fee9d480 pour améliorer cette implémentation
Passe en revue ce sujet avec fix-pr__pytorch-helion__claude-skills-4d61fee9d480