code-refactoring-refactor-clean — скилл для Claude Code
Скилл code-refactoring-refactor-clean для Claude Code помогает очищать и перестраивать существующий код. Включается при работе со сложными модулями, дублированием и проблемами тестируемости.
MIT 154 установок ★ 2 070 обновлён 2026-10-14
npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a claude-codeЧто делает code-refactoring-refactor-clean
Скилл анализирует запахи кода, зависимости и рискованные участки, затем предлагает план рефакторинга по шагам. Изменения вносятся небольшими частями, а поведение сохраняется. Для подробных паттернов он использует resources/implementation-playbook.md.
После изменений скилл обновляет тесты и проверяет регрессии. В ответе он описывает проблемные участки, план и предложенные правки, а также заметки о проверках. Внешнее поведение не меняется без явного разрешения.
Какие задачи решает
- разобрать запутанный код и наметить порядок правок
- найти дублирование и сложные участки
- улучшить тестируемость модулей
- подготовить код к новым функциям без изменения поведения
Примеры запросов агенту
- Разбери этот модуль: найди дублирование и предложи план рефакторинга.
- Улучши тестируемость кода и обнови связанные тесты.
- Подготовь модуль к новой функции, сохранив его внешнее поведение.
Как установить code-refactoring-refactor-clean
1Через Skills CLI (Vercel)
npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a claude-code2Вручную: положить файлы
~/.claude/skills/code-refactoring-refactor-clean/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/code-refactoring-refactor-clean/
1Через Skills CLI (Vercel)
npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a codex2Вручную: положить файлы
.agents/skills/code-refactoring-refactor-clean/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a cursor2Вручную: положить файлы
.cursor/skills/code-refactoring-refactor-clean/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install rmyndharis/antigravity-skills skills/code-refactoring-refactor-clean2Вручную: положить файлы
.github/skills/code-refactoring-refactor-clean/SKILL.md1Через Skills CLI (Vercel)
npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a gemini-cli2Командой платформы
gemini skills install https://github.com/rmyndharis/antigravity-skills --path skills/code-refactoring-refactor-cleanВручную: положить файлы
.devin/skills/code-refactoring-refactor-clean/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о code-refactoring-refactor-clean
Как установить code-refactoring-refactor-clean в Claude Code?
Выполни npx skills add rmyndharis/antigravity-skills --skill code-refactoring-refactor-clean -a claude-code. Файл скилла находится по пути ~/.claude/skills/code-refactoring-refactor-clean/SKILL.md.
Что делает code-refactoring-refactor-clean?
Он анализирует проблемные участки кода, предлагает пошаговый план рефакторинга и вносит изменения небольшими частями. Затем обновляет тесты и проверяет регрессии.
Когда включается этот скилл?
Он подходит для очистки и перестройки существующего кода, устранения дублирования и улучшения тестируемости. Для исправления одной строки, документации или работы во время заморозки изменений он не предназначен.
Исходный текст
SKILL.md · MIT
--- name: code-refactoring-refactor-clean description: "Refactor code with clean code principles, SOLID design patterns, and modern software engineering practices to improve quality, maintainability, and performance. Use when cleaning up or restructuring existing code." --- # Refactor and Clean Code You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance. ## Use this skill when - Refactoring tangled or hard-to-maintain code - Reducing duplication, complexity, or code smells - Improving testability and design consistency - Preparing modules for new features safely ## Do not use this skill when - You only need a small one-line fix - Refactoring is prohibited due to change freeze - The request is for documentation only ## Context The user needs help refactoring code to make it cleaner, more maintainable, and aligned with best practices. Focus on practical improvements that enhance code quality without over-engineering. ## Requirements Take the requirements, target, and scope from the user's request. ## Instructions - Assess code smells, dependencies, and risky hotspots. - Propose a refactor plan with incremental steps. - Apply changes in small slices and keep behavior stable. - Update tests and verify regressions. - If detailed patterns are required, open `resources/implementation-playbook.md`. ## Safety - Avoid changing external behavior without explicit approval. - Keep diffs reviewable and ensure tests pass. ## Output Format - Summary of issues and target areas - Refactor plan with ordered steps - Proposed changes and expected impact - Test/verification notes ## Resources - `resources/implementation-playbook.md` for detailed patterns and examples.
© rmyndharis · MIT · rmyndharis/antigravity-skills