Review-And-Refactor
Review-And-Refactor是一款code方向的AI技能,核心价值是Review and refactor code in your project according to defined instructions,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。
Review and refactor code in your project according to defined instructions
mkdir -p ./skills/review-and-refactor && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/review-and-refactor/SKILL.md -o ./skills/review-and-refactor/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
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.
🎯 Best For
- Engineering teams doing code reviews
- Open source maintainers
- Tech leads planning refactors
- Developers modernizing legacy code
- Claude users
💡 Use Cases
- Reviewing pull requests for security vulnerabilities
- Checking code style consistency
- Migrating from class components to hooks
- Breaking apart monolithic functions
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Review-And-Refactor to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Does this skill check for OWASP Top 10?
Security-focused review skills often include OWASP checks. Check the skill content for specific vulnerability categories covered.
Does this handle breaking changes?
Refactoring skills identify breaking changes but always run your test suite after applying suggestions.
Is Review-And-Refactor compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Review-And-Refactor?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Review-And-Refactor?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/review-and-refactor/SKILL.md, ready to use.
⚠️ Common Mistakes to Avoid
Blindly accepting AI suggestions
Always verify AI-generated review comments. Some suggestions may not apply to your specific codebase conventions.
Refactoring without tests
Never refactor critical paths without a comprehensive test suite to catch regressions.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.