PluginBench
Skill
Official
Fail
Audit score 45

review-and-refactor

github/awesome-copilot

Review and refactor code against project guidelines and best practices.

What is review-and-refactor?

A senior code reviewer that analyzes your project against defined coding standards in `.github/instructions/` and `.github/copilot-instructions.md`, then refactors code to improve cleanliness and maintainability. Use it to enforce consistent style, best practices, and architectural patterns across your codebase.

  • Reads and applies coding guidelines from `.github/instructions/*.md` and `.github/copilot-instructions.md`
  • Reviews entire codebase for adherence to project standards
  • Refactors code to improve cleanliness and maintainability
  • Preserves existing file structure and organization
  • Validates that tests still pass after refactoring

How to install review-and-refactor

npx skills add https://github.com/github/awesome-copilot --skill review-and-refactor
Prerequisites
  • Project must have coding guidelines defined in `.github/instructions/*.md` or `.github/copilot-instructions.md`
  • Test suite should be present if you want validation after refactoring
Claude Code
Cursor
Windsurf
Cline

How to use review-and-refactor

  1. 1.Install the skill using the provided npx command
  2. 2.Define your coding guidelines in `.github/instructions/` directory or `.github/copilot-instructions.md`
  3. 3.Invoke the skill to review and refactor your codebase
  4. 4.Review the suggested changes before committing
  5. 5.Run your test suite to verify all tests pass

Use cases

Good for
  • Enforce consistent coding standards across a team project
  • Clean up legacy code to match current best practices
  • Prepare code for a major version release or refactor cycle
  • Ensure new contributions align with project guidelines
  • Improve code quality before code review or merge
Who it's for
  • Senior developers managing code quality
  • Project maintainers enforcing standards
  • Teams with established coding guidelines
  • Development teams using Copilot for automation

review-and-refactor FAQ

Will this skill modify my file structure?

No. The skill keeps existing files intact and only refactors code within them.

What if I don't have coding guidelines defined?

The skill will look for guidelines in `.github/instructions/*.md` and `.github/copilot-instructions.md`. Without these files, it cannot apply specific standards.

Does it run tests automatically?

The skill checks that tests still pass after changes, but you should review and commit the refactored code yourself.

Can I use this on a large codebase?

Yes, but review the changes carefully. The skill processes the entire project according to your guidelines.

Full instructions (SKILL.md)

Source of truth, from github/awesome-copilot.


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.