# Refactor (agent skill)

> Refactor is an agent skill (a SKILL.md file) from github/awesome-copilot. Surgical code refactoring to improve maintainability without changing behavior. It works with Claude Code and GitHub Copilot and has 39,749 GitHub stars across a repository of 7 listed skills. Install it by copying the skill folder into your agent's skills directory.

Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements. Improve code structure and readability without changing external behavior. Refactoring is gradual evolution, not revolution. Use this for improving existing code, not rewriting from scratch.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/github/awesome-copilot |
| Skill path | skills/refactor/SKILL.md |
| Skill name | refactor |
| GitHub stars | 39,749 |
| Installs on skills.sh | 2 |
| License | MIT |
| Skills in repo | 7 |
| Plugin marketplace | no |
| Official | yes |
| Works with | Claude Code, GitHub Copilot |
| Category | Coding |
| Last commit | Oct 7, 2026 |

## When it triggers

- use for gradual improvements.

## Add this skill

### Claude Code

```sh
git clone --depth 1 https://github.com/github/awesome-copilot.git
cp -r awesome-copilot/skills/refactor ~/.claude/skills/refactor   # personal, or .claude/skills in a project
```

In the Claude apps, zip the skill folder and upload it under Customize > Skills > + > Upload a skill (code execution must be on).

### ChatGPT / Codex

```sh
git clone --depth 1 https://github.com/github/awesome-copilot.git
cp -r awesome-copilot/skills/refactor .agents/skills/refactor   # repo; ~/.agents/skills for all projects
```

### Cursor

```sh
git clone --depth 1 https://github.com/github/awesome-copilot.git
cp -r awesome-copilot/skills/refactor .cursor/skills/refactor   # project; ~/.cursor/skills for all projects
```

Sources (checked 2026-10-07): https://code.claude.com/docs/en/skills, https://support.claude.com/en/articles/12512180-using-skills-in-claude, https://learn.chatgpt.com/docs/build-skills, https://cursor.com/docs/context/skills

skills.sh listing: https://www.skills.sh/github/awesome-copilot/refactor

---

Canonical page: https://appsgit.com/skills/github-refactor
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
