safe-refactor
About this skill
Execute a behavior-preserving refactor with a proof of preservation — establishes a safety net first (existing tests or new characterization tests over every touched path), locks a baseline green run, then moves in small always-green steps where each step is one mechanical transformation, and treats any needed assertion change as a smuggled behavior change to surface, not fix. Use this skill whenever the user says "refactor this", "clean this up without changing behavior", "extract this into", "restructure this module", "rename this across the codebase", "inline this", "split this function/class", or "/safe-refactor" — even if they don't explicitly say "refactoring skill". Do not use for choosing WHAT to refactor (use improve-codebase-architecture) or for changes that are supposed to alter behavior (use task-executor).
Security
This skill was reviewed and published through ClawHub's own moderation and security scanning pipeline before being listed on their registry. ClawHub checks for malicious code, dependency vulnerabilities, and policy violations.
When you run npx @agentpowers/cli install safe-refactor, AgentPowers downloads the package to a sandbox and runs a full security scan (ClamAV, Snyk, GuardDog, VirusTotal) before allowing installation. If the scan fails, installation is blocked.
Powered by ClawHub
This skill is sourced from ClawHub, a large open registry of community-built AI tools. By integrating ClawHub into AgentPowers, you get access to hundreds of additional skills while still benefiting from our security scanning, one-command install, and unified management through the AgentPowers CLI.
Getting started
New to AgentPowers? Learn how to install and use skills from the community.