refactoring
БесплатноБез исполняемых скриптовНе проверенGuide code refactoring using Martin Fowler's catalog of behavior-preserving transformations. Use during TDD REFACTOR phase, when code smells are detected…
от atusy★ 26 звёзд на GitHubОб этом скилле
Refactoring Skill
Apply behavior-preserving transformations to improve quality of any codes, including tests.
Core Principle
"Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior." — Martin Fowler
Structural Changes Only
Allowed:
- Renaming for clarity
- Extracting functions/methods
- Removing duplication
- Simplifying expressions
- Moving files/modules between directories
- Reorganizing module boundaries
NOT allowed:
- Adding new functionality
- Fixing bugs (if you find one, write a failing test first)
- Changing observable behavior in any way
See library-application-criteria.md for public API constraints (libraries vs applications).
Refactoring Workflow
- Ensure tests pass (you need a safety net)
- Identify ONE smell to address
- Choose appropriate pattern from
patterns.md - Apply mechanically in small steps
- Run tests after each step
- Commit when green
Safety Rules
- Never refactor with failing tests
- One pattern at a time
- Commit after each successful refactor
- Revert immediately if tests fail
Установить refactoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл refactoring?
Guide code refactoring using Martin Fowler's catalog of behavior-preserving transformations. Use during TDD REFACTOR phase, when code smells are detected (duplication, long methods, feature envy), when discussing structural improvements, or before behavioral changes (Tidy First).
Как установить скилл refactoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл refactoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic