Skip to content
Back to skills

Refactor

ASecurity

Safely restructures code without changing behaviour — tests first, small steps, one kind of change at a time. Use when code is messy, duplicated or hard to change, or the user says "refactor", "clean up", "отрефактори", "приведи код в порядок".

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 13, 2026
ai-agentsgo

Security analysis

A100/100

Scanned October 13, 2026

npx -y skills add dmminga1983/minga --skill refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refactor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dmminga1983-refactor/badge)](https://www.skillsdirectory.com/skills/dmminga1983-refactor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: refactor
description: Safely restructures code without changing behaviour — tests first, small steps, one kind of change at a time. Use when code is messy, duplicated or hard to change, or the user says "refactor", "clean up", "отрефактори", "приведи код в порядок".
argument-hint: "[file, module or goal]"
---

# Refactor / Рефакторинг

Target: $ARGUMENTS

Reply in the user's language. For anything larger than one file, delegate to the `refactorer` agent.

1. **State the goal** in one line (e.g. "make adding a payment provider a one-file change").
2. **Pin behaviour.** Run the existing tests. If coverage is thin, add characterisation tests for the code you will touch.
3. **Plan small steps** — rename, extract, inline, move, delete dead code. Each step must leave the build green.
4. **Execute step by step,** running tests after each. Commit-sized steps make review easy.
5. **Do not mix in fixes or features.** Note bugs you find and report them separately.
6. **Finish** with the test results and a short before/after summary (files, functions, lines, complexity if a tool is available).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.