Official agent skill

Ut Refactor Review

by intel in intel/torch-xpu-ops

Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests.

OfficialApache-2.0Auto-check passedAI & LLM Engineering

Install Ut Refactor Review

skills CLI
$ npx skills add intel/torch-xpu-ops --skill ut-refactor-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install intel/torch-xpu-ops ut-refactor-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/intel/torch-xpu-ops.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/ut-refactor-review .claude/skills/ut-refactor-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ut-refactor-review
GitHub stars
115
Token cost
~917 tokens
SKILL.md length
319 words
Files
2 (incl. references)
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests.

  • Reviewing PRs under test/ that port device-generic tests to XPU
  • SKILL.md covers Scope: when this skill applies, Usage Modes, Review Philosophy and Files to Reference
  • Reaches github.com
  • Add allowxpu=True

What it does

Ut Refactor Review is an agent skill from intel/torch-xpu-ops, published by the product's own GitHub organization. Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests. Use when reviewing PRs under test/ that port device-generic tests to XPU, add allowxpu=True, generalize CUDA-hardcoded tests, or add XPU skips/xfails/tolerance overrides in OpInfo.

Its SKILL.md is about 920 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/xpu-ut-review-checklist.md`).

It sits in AI & LLM Engineering, covering Deep learning, Refactoring and Unit testing. It works with PyTorch and CUDA. The licence is Apache-2.0.

When your agent uses it

  • Reviewing PRs under test/ that port device-generic tests to XPU
  • Add allowxpu=True
  • Generalize CUDA-hardcoded tests
  • Add XPU skips/xfails/tolerance overrides in OpInfo

Example prompts

  • “/ut-refactor-review”

What it can do on your machine

Read from SKILL.md and the folder at commit 0187b3b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ut Refactor Review loads about 917 tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 319 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~917
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from intel/torch-xpu-ops at commit 0187b3b, republished under its Apache-2.0 licence (© intel). 319 words, ~917 tokens.

Download SKILL.mdSave it as .claude/skills/ut-refactor-review/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ut-refactor-review
description
Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests. Use when reviewing PRs under test/ that port device-generic tests to XPU, add allow_xpu=True, generalize CUDA-hardcoded tests, or add XPU skips/xfails/tolerance overrides in OpInfo.

XPU UT Refactor Review Skill

Review PyTorch (pytorch/pytorch) pull requests that enable XPU on existing upstream unit tests. These PRs almost never add new operator logic; they make existing tests device-agnostic and opt XPU into them. The review must focus on what CI cannot check: whether the generalization preserves the original test intent, whether device gating is precise, and whether every skip/xfail is justified and traceable.

Scope: when this skill applies

Use this skill (instead of the generic pr-review skill in pytorch/pytorch) when the diff is predominantly:

  • test/** changes that swap CUDA-hardcoded constructs for device-generic ones
  • instantiate_device_type_tests(..., allow_xpu=True) additions
  • onlyAccelerator / onlyNativeDeviceTypesAnd([...]) decorator migrations
  • XPU entries in OpInfo (common_methods_invocations.py, opinfo/definitions/*): DecorateInfo(... device_type='xpu' ...), toleranceOverride, skips, xfails
  • New TestXxxDevice classes split out from a device-agnostic TestXxx

If the PR also changes operator kernels or native_functions.yaml, hand those files to the pr-review skill and apply this skill only to the test files.

Usage Modes

No Argument

If invoked with no arguments, do not review. Ask:

What would you like me to review?

  • A PR number or URL (e.g., 159118 or the full PR URL)
  • A local branch
PR Mode
/ut-refactor-review 159118
/ut-refactor-review https://github.com/pytorch/pytorch/pull/159118
/ut-refactor-review 159118 detailed

Obtain the PR title, description, diff, changed-file list, and existing review comments before reviewing. If the command does not name a repo, default to fetching the PR from pytorch/pytorch.

Suggested fetch commands (CLI environments with gh):

gh pr view <PR_NUMBER> --repo pytorch/pytorch --json title,body,author,baseRefName,headRefName,files,additions,deletions,commits
gh pr diff <PR_NUMBER> --repo pytorch/pytorch
gh pr view <PR_NUMBER> --repo pytorch/pytorch --json comments,reviews
Local Branch Mode
/ut-refactor-review branch
/ut-refactor-review branch detailed

Review the current branch's changes relative to main (diff, commit log, and changed-file list). Use the branch name in the review header instead of a PR number.

Review Philosophy

Go through every changed line against references/xpu-ut-review-checklist.md. For anything this skill does not address, defer to the pr-review skill in pytorch/pytorch.

Files to Reference

  • references/xpu-ut-review-checklist.md — the line-by-line checklist
  • torch/testing/_internal/common_device_type.py — instantiate_device_type_tests, onlyAccelerator, allow_xpu, only_for
  • torch/testing/_internal/common_utils.py — TEST_XPU, TEST_CUDA, TEST_HPU, xfailIf, HardwareClassification
  • torch/testing/_internal/common_methods_invocations.py, torch/testing/_internal/opinfo/definitions/* — OpInfo DecorateInfo, toleranceOverride

© intel, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .claude/skills/ut-refactor-review of intel/torch-xpu-ops.

  • SKILL.md
  • references/xpu-ut-review-checklist.md

Open the folder on GitHubat commit 0187b3b

Compare with similar skills

Ut Refactor Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ut Refactor Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ut Refactor Review this skillintel/torch-xpu-ops115—~917Automated safety check: PassApache-2.0
Cuda Index Widthpytorch/pytorch104k—~1.6kAutomated safety check: PassCustom licence
Liger Kernel Devlinkedin/Liger-Kernel6.6k—~799Automated safety check: PassBSD-2-Clause
Graphsignalgraphsignal/graphsignal257—~6.2kAutomated safety check: PassApache-2.0
Metal Kernelpytorch/pytorch104k—~4.9kAutomated safety check: PassCustom licence
Validating Pytorch Custom Opsmeta-pytorch/attention-gym1.3k—~6.4kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Cuda Index Width

    pytorch/pytorch

    Choose 32-bit vs 64-bit index math in PyTorch CUDA kernels. An agent skill from pytorch/pytorch.

    104k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Liger Kernel Dev

    linkedin/Liger-Kernel

    Develops production-ready Triton kernels for Liger Kernel. An agent skill from linkedin/Liger-Kernel.

    6.6k GitHub stars~799 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Graphsignal

    graphsignal/graphsignal

    Profile AI inference workloads (vLLM, SGLang, TensorRT-LLM, PyTorch, any GPU application) with the Graphsignal profiler and read the results from its local /signals JSON endpoint.

    257 GitHub stars~6.2k tokensUpdated 9 days ago
    AI & LLM EngineeringAuto-check passed
  • Metal Kernel

    pytorch/pytorch

    Write Metal/MPS kernels for PyTorch operators. An agent skill from pytorch/pytorch.

    104k GitHub stars~4.9k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Validating Pytorch Custom Ops

    meta-pytorch/attention-gym

    Ensures new Attention Gym eager, Triton, CuTeDSL, and external-library implementations are torch.compile-friendly and correctly registered.

    1.3k GitHub stars~6.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Ako4all

    TongmingLAIC/AKO4ALL

    Drive an agentic loop that iteratively optimizes a GPU kernel for maximum speedup.

    369 GitHub stars~4k tokensUpdated 22 days ago
    AI & LLM EngineeringAuto-check passed

More from intel/torch-xpu-ops

All 29 skills in this repo
  • Intel GPU Device Selection

    intel/torch-xpu-ops

    Official

    Select the Intel GPU device to use when a system has multiple Intel GPU devices.

    115 GitHub stars~508 tokensUpdated yesterday
    Auto-check passed
  • Xpu CI Health Check

    intel/torch-xpu-ops

    Official

    Check PyTorch ciflow/xpu (xpu.yml) on the main branch, collect the failing XPU test cases from the most recent completed run(s), analyze the ROOT CAUSE of each failure with AI, and produce a list…

    115 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • At Dispatch V2

    intel/torch-xpu-ops

    Official

    Convert PyTorch ATDISPATCH macros to ATDISPATCHV2 format in ATen C++ code.

    115 GitHub starsUsed in 3 repos~2.2k tokens
    Auto-check passed
  • PR Review

    intel/torch-xpu-ops

    Official

    Review pull requests for XPU operator or backend code. An agent skill from intel/torch-xpu-ops.

    115 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • Skill Writer

    intel/torch-xpu-ops

    Official

    Guide users through creating Agent Skills for Claude Code. An agent skill from intel/torch-xpu-ops.

    115 GitHub starsUsed in 3 repos~2.4k tokens
    Auto-check passed
  • Ut Issue Authoring

    intel/torch-xpu-ops

    Official

    Read the evidence a nightly UT run produced, decide which failures share a root cause and which are machine breakage rather than product bugs, and write one issue draft per root cause to drafts.json.

    115 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Ut Refactor Review

What does Ut Refactor Review do?

Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests. Ut Refactor Review is an agent skill from intel/torch-xpu-ops, published by the product's own GitHub organization. Review PyTorch upstream unit-test (UT) PRs that enable Intel GPU (XPU) on existing tests.

When should I use Ut Refactor Review?

Ut Refactor Review fits situations like: reviewing PRs under test/ that port device-generic tests to XPU; add allowxpu=True; generalize CUDA-hardcoded tests; add XPU skips/xfails/tolerance overrides in OpInfo.

How do I install Ut Refactor Review in Claude Code?

Run `npx skills add intel/torch-xpu-ops --skill ut-refactor-review -a claude-code`. Or copy the skill folder (.claude/skills/ut-refactor-review in intel/torch-xpu-ops) into .claude/skills/ut-refactor-review in your project. Claude Code loads it when a task matches its description.

How do I install Ut Refactor Review in Codex?

Run `npx skills add intel/torch-xpu-ops --skill ut-refactor-review -a codex`. Or copy the skill folder (.claude/skills/ut-refactor-review in intel/torch-xpu-ops) into .agents/skills/ut-refactor-review in your project. Codex loads it when a task matches its description.

Can I use Ut Refactor Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add intel/torch-xpu-ops --skill ut-refactor-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ut-refactor-review, .gemini/skills/ut-refactor-review, .github/skills/ut-refactor-review and .opencode/skills/ut-refactor-review in your project.

What does Ut Refactor Review need to run?

SKILL.md names no scripts, command-line tools or credentials: Ut Refactor Review is instructions for the agent only.

Does Ut Refactor Review access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Ut Refactor Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ut Refactor Review use?

Ut Refactor Review is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ut Refactor Review use?

About 917 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.

What are the alternatives to Ut Refactor Review?

Skills that share tags, products or a category with Ut Refactor Review: Cuda Index Width (pytorch/pytorch, 104k stars), Liger Kernel Dev (linkedin/Liger-Kernel, 6.6k stars), Graphsignal (graphsignal/graphsignal, 257 stars) and Metal Kernel (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ut Refactor Review?

intel (a GitHub organization, an official publisher) maintains it in intel/torch-xpu-ops, which has 115 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 6, 2026.

Source: intel/torch-xpu-ops on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.