Refactor Safe banner
redhat-community-ai-tools redhat-community-ai-tools

Refactor Safe

Code Quality community

Description

--- description: "Refactor internals without changing public API. Fixes structural problems (long functions, duplication, poor naming) while keeping the external interface identical." --- # Safe Refactor At this point, you've reviewed the code, tested it, and documented it. If it still has flagged structural problems (like a 65-line handler doing validation, inference, logging, and response formatting in one block), this is the command to fix it. Refactoring with AI is risky because Claude te

Installation

Installs to ~/.claude/commands/redhat-community-ai-tools-claude-code-setup-evaluator-refactor-safe.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/redhat-community-ai-tools/claude-code-setup-evaluator/HEAD/.claude/commands/refactor-safe.md -o ~/.claude/commands/redhat-community-ai-tools-claude-code-setup-evaluator-refactor-safe.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository