refactor-safe
Small, tested refactors with minimal diff. Use when restructuring without changing behavior.
от HenriGrimm★ 25 звёзд на GitHub
Установить refactor-safe в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Safe refactor
When to use
- Rename, extract function, simplify control flow
- User wants cleaner code without behavior change
Rules
- Minimal diff — one concern per change set; no drive-by edits
- Behavior preserved — run existing tests before and after
- Read first —
read_file/search_in_fileto find all call sites - Mechanical steps — rename → fix imports → run tests → fix types/lint
- If tests are missing, add one characterization test before risky edits (user approval)
Steps
- State the refactor goal and files in scope.
- Run test command from
package.json(baseline). - Apply refactor in small commits mentally (even if one PR).
- Re-run tests; fix only failures caused by the refactor.
- Summarize what moved/renamed and what did not change (public API).
Avoid
- Changing logic "while you're there"
- New abstractions for one call site
- Large file rewrites without tests
Tools
read_file, search_in_file, replace_text_in_file, execute_command, git_diff
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл refactor-safe?
Small, tested refactors with minimal diff. Use when restructuring without changing behavior.
Как установить скилл refactor-safe?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл refactor-safe запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis 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…