Refactor skill: what it does and how to install it
Improves existing code structure and maintainability while preserving behaviour through small, tested changes.
Summary generated from the skill's documentation.
Install
$ npx skills add github/awesome-copilot --skill refactorRun it in a terminal. If your agent is already running, start a new session so it picks the skill up.
About this skill
What it does. Guides gradual refactoring by identifying code smells, applying focused transformations and running tests after each small change. It covers extracting functions and classes, improving type safety, replacing magic values, simplifying conditionals, removing dead code and applying design patterns.
When to use it. For existing code that is hard to understand, maintain or extend, including oversized functions, duplicated logic and weak types. It advises against refactoring untested critical code, stable code that will not change, or changes made without a clear purpose.
History
Repo stars
40k+229 since 5 Oct 2026
Stars are counted for the whole repository, which holds 30 skills.
Show as a table
| Date | Repo stars |
|---|---|
| 12 Oct 2026 | 39,948 |
| 11 Oct 2026 | 39,904 |
| 10 Oct 2026 | 39,881 |
| 9 Oct 2026 | 39,845 |
| 8 Oct 2026 | 39,804 |
| 7 Oct 2026 | 39,761 |
| 6 Oct 2026 | 39,731 |
| 5 Oct 2026 | 39,719 |
Installs
22.1k
Tracking since . A chart appears once there are 7 days of data.
Installs via skills.sh
Similar skills
- Safe RefactorRestructures code while preserving behaviour, with verification before and after each structural edit.
- Skill CreatorCreates new skills, improves existing ones and measures how well they perform with evals and benchmarks.
- Surgical PatchFixes a bug or small behaviour change at the narrowest responsible layer, with regression proof.