Write Metal/MPS kernels for PyTorch operators. Use when adding MPS device support to operators, implementing Metal shaders, or porting CUDA kernels to Apple Silicon. Covers native_functions.yaml dispatch, host-side operators, and Metal kernel implementation.
Install
npx skills add pytorch/pytorch --skill metal-kernelnpx skills add pytorch/pytorch --skill metal-kernel -a claude-code -gnpx skills add pytorch/pytorch --skill metal-kernel -a codex -ggemini skills install https://github.com/pytorch/pytorch.git --path .claude/skills/metal-kernelgh skill install pytorch/pytorch metal-kernelgit clone --depth 1 https://github.com/pytorch/pytorch /tmp/pytorch__pytorch
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/pytorch__pytorch/.claude/skills/metal-kernel ~/.claude/skills/metal-kernel # Claude Code
cp -R /tmp/pytorch__pytorch/.claude/skills/metal-kernel ~/.agents/skills/metal-kernel # Codex, Cursor, Gemini CLI, Copilot, OpenCode