What problem does it solve? PyTorch training and inference code frequently fails with cryptic runtime errors such as tensor shape mismatches, CPU/GPU device conflicts, broken autograd graphs, and CUDA out-of-memory conditions. This Skill provides a structured diagnostic workflow to resolve these reported local errors with minimal, surgical code changes. ## Core Features & Use Cases - Error Pattern Resolution: Maps common PyTorch tracebacks (shape mismatches, device placement, in-place autograd violations, DataLoader collation errors) to concrete fixes. - Bounded Local Diagnostics: Uses existing environment checks like torch version queries, nvidia-smi, and targeted shape/memory print statements without installing packages or launching training jobs. - Use Case: A user reports RuntimeError: mat1 and mat2 shapes cannot be multiplied in train.py. The Skill traces tensor shapes, identifies the mismatched nn.Linear layer, corrects in_features, and verifies the fix with a bounded local reproducer. ## Quick Start Diagnose and fix the PyTorch RuntimeError reported in my train.py traceback using minimal changes.