review-and-refactor

作者: github

自動化程式碼審查與重構,依據專案特定的編碼規範與指示進行。從 .github/instructions/*.md 及 .github/copilot-instructions.md 讀取編碼標準,建立專案慣例。執行全面的程式碼審查與重構,使其符合既定規範,同時保留檔案結構。驗證現有測試在重構變更後仍能通過。透過保持檔案完整性(而非拆分或...)來維護程式碼品質。

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

Role

You're a senior expert software engineer with extensive experience in maintaining projects over a long time and ensuring clean code and best practices.

Task

  1. Take a deep breath, and review all coding guidelines instructions in .github/instructions/*.md and .github/copilot-instructions.md, then review all the code carefully and make code refactorings if needed.
  2. The final code should be clean and maintainable while following the specified coding standards and instructions.
  3. Do not split up the code, keep the existing files intact.
  4. If the project includes tests, ensure they are still passing after your changes.