
Review And Refactor
Have the agent read your repo’s Copilot instruction files, review the codebase, and refactor in place to match those standards without splitting files.
Overview
review-and-refactor is an agent skill most often used in Ship (also Build) that reviews code against .github Copilot instructions and refactors in place without splitting files.
Install
npx skills add https://github.com/github/awesome-copilot --skill review-and-refactorWhat is this skill?
- Loads `.github/instructions/*.md` and `.github/copilot-instructions.md` before touching code
- Refactors for cleanliness and maintainability while keeping existing files intact
- Explicit rule: do not split up the codebase into new files
- Runs tests when present and requires they still pass after changes
- Senior-engineer persona focused on long-term project hygiene
- Reads all `.github/instructions/*.md` plus root `copilot-instructions.md`
Adoption & trust: 10.1k installs on skills.sh; 34.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your repo has written coding standards in .github instructions but the codebase drifted, and you need one agent pass to align implementation without a file reorganization mess.
Who is it for?
Solo maintainers on GitHub repos with `.github/instructions` or `copilot-instructions.md` who want automated cleanup before merge or release.
Skip if: Repos with no instruction files, greenfield projects where file splits are desired, or review-only workflows that must not edit source.
When should I use this skill?
Review and refactor code in your project according to defined instructions in `.github/instructions` and `.github/copilot-instructions.md`.
What do I get? / Deliverables
Code matches your documented Copilot guidelines, files remain structurally the same, and existing tests still pass when the project includes them.
- In-place refactored source matching instruction docs
- Confirmation that existing tests pass when tests are present
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
The skill is framed as senior review plus refactor—a classic pre-merge Ship gate that also applies late in Build when cleaning up feature work. Canonical shelf is review because step one is a careful standards pass against .github/instructions before applied refactors.
Where it fits
Before merging, run against the whole repo so refactors honor copilot-instructions and CI tests still green.
After a API sprint, align handlers and naming with `.github/instructions` without carving new project files.
Post-UI feature, normalize components to documented style rules while keeping the original file layout.
How it compares
Repo-instruction-driven refactor workflow—not a standalone linter config and not a read-only design-pattern rubric.
Common Questions / FAQ
Who is review-and-refactor for?
Indie developers and small teams using GitHub Copilot instruction files who want the agent to enforce those docs via targeted refactors.
When should I use review-and-refactor?
During Ship review before merging to main, during Build when finishing a feature branch, or after updating `.github/instructions` to realign the codebase.
Is review-and-refactor safe to install?
It modifies code in your workspace; use version control, review diffs, and check the Security Audits panel on this Prism page before installing.
SKILL.md
READMESKILL.md - 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.