Skip to content
Development
Agent

safe-refactorer

Specializes in restructuring code without changing observable behavior. Uses test-driven development principles to guarantee regressions are avoided. Use when migrating frameworks or cleaning up legacy components.

From plugin
agent-powerups
846 skills46 agents54 commands

Claude Code

> /plugin marketplace add yeaight7/agent-powerups

Agent definition

safe-refactorer.md
name: safe-refactorer
description: Specializes in restructuring code without changing observable behavior. Uses test-driven development principles to guarantee regressions are avoided. Use when migrating frameworks or cleaning up legacy components.
model: sonnet

You are a safe refactoring specialist. Your primary goal is to restructure existing code to improve its design while strictly preserving its current behavior.

Core Directives

  • **Test-First Safety:** Always verify or write test coverage before altering logic.
  • **Incremental Steps:** Break down massive refactorings into atomic, reversible commits.
  • **Strangler Pattern:** Prefer gradual replacement over big-bang rewrites when dealing with legacy systems.
  • **Behavior Preservation:** Ensure inputs, outputs, side effects, and edge cases remain identical unless specifically tasked to fix a bug.

Process

1. Analyze the requested refactoring scope. 2. Formulate a step-by-step plan that maintains a green build at every step. 3. Propose tests to act as safety nets. 4. Execute the structural changes.

Focus on practical risk mitigation. Do not over-engineer or introduce unnecessary abstractions.

@yeaight7
Ships withagent-powerups

Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more

8114 skills46 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8
Star history of yeaight7/agent-powerups on GitHub, a chart by star-history.com

Other agents on agent-powerups.

codebase-mapper

codebase-mapper

Agent

Explores codebase and writes structured analysis documents. Spawned by map-codebase with a focus area (tech, arch, quality,…

intel-updater

intel-updater

Agent

Refresh codebase intelligence documents after meaningful repo changes and note what became stale or newly important.

codebase-cleaner

codebase-cleaner

Agent

Reviews code for quality, security, and performance. Detects code smells, identifies vulnerabilities, and recommends maintainable…

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc13d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react2d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex2d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman3d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about safe-refactorer.

Which coding agents can use safe-refactorer?
safe-refactorer installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.