redhat-community-ai-tools

Refactor Safe — Code Quality skill for Claude Code

Code Quality community

Refactor internals without changing public API.

How to install Refactor Safe

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.

What Refactor Safe does


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

Alternatives in Code Quality

  • Brooks Sweep — Run all Brooks-Lint analyses in one pass, auto-fix safe findings, confirm risky ones 1.5k ★
  • Anthropic Proxy — A proxy server that converts Anthropic API requests to OpenAI format and sends them to OpenRouter, used to use 405 ★
  • Auto Format Code — I'll format your code and fix TypeScript issues using the project's configured tools 77 ★

Full documentation available on GitHub

View Source Repository