·refactor
</>

refactor

github/awesome-copilot

外科手術式代碼重構可在不改變行為的情況下提高可維護性。涵蓋提取函數、重命名變量、分解上帝函數、提高類型安全性、消除代碼異味以及應用設計模式。比 repo-rebuilder 不那麼劇烈;用於逐步改進。

710安裝·32熱度·@github

安裝

$npx skills add https://github.com/github/awesome-copilot --skill refactor

SKILL.md

Improve code structure and readability without changing external behavior. Refactoring is gradual evolution, not revolution. Use this for improving existing code, not rewriting from scratch.

| Extract Method | Turn code fragment into method | | Extract Class | Move behavior to new class | | Extract Interface | Create interface from implementation | | Inline Method | Move method body back to caller | | Inline Class | Move class behavior to caller | | Pull Up Method | Move method to superclass | | Push Down Method | Move method to subclass |

| Rename Method/Variable | Improve clarity | | Introduce Parameter Object | Group related parameters | | Replace Conditional with Polymorphism | Use polymorphism instead of switch/if | | Replace Magic Number with Constant | Named constants | | Decompose Conditional | Break complex conditions | | Consolidate Conditional | Combine duplicate conditions |

查看原文

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/github/awesome-copilot --skill refactor
分類
</>開發工具
認證
收錄時間
2026-02-01
更新時間
2026-02-18

快速解答

什麼是 refactor?

外科手術式代碼重構可在不改變行為的情況下提高可維護性。涵蓋提取函數、重命名變量、分解上帝函數、提高類型安全性、消除代碼異味以及應用設計模式。比 repo-rebuilder 不那麼劇烈;用於逐步改進。 來源:github/awesome-copilot。

如何安裝 refactor?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/github/awesome-copilot --skill refactor 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用

這個 Skill 的原始碼在哪?

https://github.com/github/awesome-copilot

詳情

分類
</>開發工具
來源
skills.sh
收錄時間
2026-02-01