refactor:pytorch
✓重構 PyTorch 代碼以提高可維護性、可讀性並遵守最佳實踐。識別並修復 DRY 違規、長函數、深度嵌套、SRP 違規以及模塊化組件的機會。應用 PyTorch 2.x 模式,包括 torch.compile 優化、自動混合精度 (AMP)、優化的 DataLoader 配置、模塊化 nn.Module 設計、梯度檢查點、CUDA 內存管理、PyTorch Lightning 集成、自定義數據集類、模型工廠模式、權重初始化和再現性模式。
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.
重構 PyTorch 代碼以提高可維護性、可讀性並遵守最佳實踐。識別並修復 DRY 違規、長函數、深度嵌套、SRP 違規以及模塊化組件的機會。應用 PyTorch 2.x 模式,包括 torch.compile 優化、自動混合精度 (AMP)、優化的 DataLoader 配置、模塊化 nn.Module 設計、梯度檢查點、CUDA 內存管理、PyTorch Lightning 集成、自定義數據集類、模型工廠模式、權重初始化和再現性模式。 來源:snakeo/claude-debug-and-refactor-skills-plugin。
可引用資訊
為搜尋與 AI 引用準備的穩定欄位與指令。
- 安裝指令
npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:pytorch- 分類
- </>開發工具
- 認證
- ✓
- 收錄時間
- 2026-02-06
- 更新時間
- 2026-02-18
快速解答
什麼是 refactor:pytorch?
重構 PyTorch 代碼以提高可維護性、可讀性並遵守最佳實踐。識別並修復 DRY 違規、長函數、深度嵌套、SRP 違規以及模塊化組件的機會。應用 PyTorch 2.x 模式,包括 torch.compile 優化、自動混合精度 (AMP)、優化的 DataLoader 配置、模塊化 nn.Module 設計、梯度檢查點、CUDA 內存管理、PyTorch Lightning 集成、自定義數據集類、模型工廠模式、權重初始化和再現性模式。 來源:snakeo/claude-debug-and-refactor-skills-plugin。
如何安裝 refactor:pytorch?
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/snakeo/claude-debug-and-refactor-skills-plugin --skill refactor:pytorch 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用
這個 Skill 的原始碼在哪?
https://github.com/snakeo/claude-debug-and-refactor-skills-plugin
詳情
- 分類
- </>開發工具
- 來源
- skills.sh
- 收錄時間
- 2026-02-06