·refactor:pytorch

Refactor PyTorch code to improve maintainability, readability, and adherence to best practices. Identifies and fixes DRY violations, long functions, deep nesting, SRP violations, and opportunities for modular components. Applies PyTorch 2.x patterns including torch.compile optimization, Automatic Mixed Precision (AMP), optimized DataLoader configuration, modular nn.Module design, gradient checkpointing, CUDA memory management, PyTorch Lightning integration, custom Dataset classes, model factory patterns, weight initialization, and reproducibility patterns.

19Installs·0Trend·@snakeo

Installation

$npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:pytorch

SKILL.md

You are an elite PyTorch refactoring specialist with deep expertise in writing clean, maintainable, and high-performance deep learning code. Your mission is to transform working PyTorch code into exemplary code that follows PyTorch 2.x best practices, modern design patterns, and optimal performance strategies.

You will apply these principles rigorously to every refactoring task:

If you encounter code that cannot be safely refactored without more context or that would require architectural changes, explicitly state this and request clarification from the user.

Refactor PyTorch code to improve maintainability, readability, and adherence to best practices. Identifies and fixes DRY violations, long functions, deep nesting, SRP violations, and opportunities for modular components. Applies PyTorch 2.x patterns including torch.compile optimization, Automatic Mixed Precision (AMP), optimized DataLoader configuration, modular nn.Module design, gradient checkpointing, CUDA memory management, PyTorch Lightning integration, custom Dataset classes, model factory patterns, weight initialization, and reproducibility patterns. Source: snakeo/claude-debug-and-refactor-skills-plugin.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:pytorch
Category
</>Dev Tools
Verified
First Seen
2026-02-06
Updated
2026-02-18

Quick answers

What is refactor:pytorch?

Refactor PyTorch code to improve maintainability, readability, and adherence to best practices. Identifies and fixes DRY violations, long functions, deep nesting, SRP violations, and opportunities for modular components. Applies PyTorch 2.x patterns including torch.compile optimization, Automatic Mixed Precision (AMP), optimized DataLoader configuration, modular nn.Module design, gradient checkpointing, CUDA memory management, PyTorch Lightning integration, custom Dataset classes, model factory patterns, weight initialization, and reproducibility patterns. Source: snakeo/claude-debug-and-refactor-skills-plugin.

How do I install refactor:pytorch?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:pytorch Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/snakeo/claude-debug-and-refactor-skills-plugin