review-and-refactor — GitHub Copilot skill
Reviews project code against local instructions and refactors parts that need changes. Use it before review or when cleaning up an existing codebase.
npx skills add github/awesome-copilot --skill review-and-refactorWhat review-and-refactor does
The skill reads rules from .github/instructions/*.md and .github/copilot-instructions.md, then reviews code against them. When changes are needed, it refactors the code to follow the project standards and keep it maintainable.
It keeps the existing files intact rather than splitting code into new files. If the project has tests, they should still pass after the changes. Install it when your repository has written rules in .github; otherwise, its review has fewer project-specific constraints.
What it helps with
- review code against
.github/instructions/*.mdrules - apply requirements from
.github/copilot-instructions.md - refactor code without splitting existing files
- keep tests passing after code changes
Example prompts for the agent
- Review this code using the project instructions and refactor what needs changing.
- Read `.github/instructions/*.md` and `.github/copilot-instructions.md`, then bring this code in line with them.
- Refactor this module without creating or splitting files.
How to install review-and-refactor
1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill review-and-refactor2GitHub CLI
gh skill install github/awesome-copilot review-and-refactor3Manually: put the files in place
.github/skills/review-and-refactor/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill review-and-refactor -a claude-code2Manually: put the files in place
~/.claude/skills/review-and-refactor/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/review-and-refactor/
Manually: put the files in place
.agents/skills/review-and-refactor/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/review-and-refactor/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/review-and-refactorManually: put the files in place
.devin/skills/review-and-refactor/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about review-and-refactor
How do I install review-and-refactor in GitHub Copilot?
Run npx skills add github/awesome-copilot --skill review-and-refactor. You can also use gh skill install github/awesome-copilot review-and-refactor.
What does review-and-refactor do?
The skill reads project instructions, reviews code, and makes refactoring changes when needed. It keeps the existing files intact.
Which instruction files does review-and-refactor read?
It uses .github/instructions/*.md and .github/copilot-instructions.md. If the project includes tests, they should pass after the changes.
Source text
SKILL.md · MIT
--- name: review-and-refactor description: 'Review and refactor code in your project according to defined instructions' --- ## 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.
© github · MIT · github/awesome-copilot