Refactor Safe
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
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 RepositoryRelated Skills
Import Drawio
Redraw a draw.io file as an editorial diagram at a chosen format, size, and detail level
Code Quality Import Mermaid
Redraw Mermaid as an editorial diagram at a chosen format, size, and detail level
Code Quality Job Stories
- Create job stories with acceptance criteria in JTBD format
Code Quality Wwas
- Create backlog items in Why-What-Acceptance format
Code Quality Code Quality Review
Review code quality in: $ARGUMENTS
Code Quality Standards Skills
Engineering standards and compliance skills
Code Quality