refactoring-codelisted
Install: claude install-skill alexei-led/cc-thingz
# Batch Refactoring
Use this when many edits must preserve externally observable behavior. Stop if you
cannot name the maintenance value and the behavior that must stay unchanged.
## Role-gated action
Detect capability from tools:
- Write-capable role: map scope, apply one batch, run verification.
- Read-only role: map scope and emit the refactor in the Proposed Changes contract. Apply nothing; run nothing.
## Route elsewhere
Do not use this for:
- one small edit that normal coding tools can handle
- behavior changes, bug fixes, or failing checks → `fixing-code`
- test-only cleanup, coverage, or TDD → `improving-tests`
- review findings without edits → `reviewing-code`
- target architecture design or repo-wide structural audit → architecture skills
- cosmetic churn with no maintenance value
## Evidence first
Before editing:
1. Define goal, non-goals, preservation target, and safety gate.
2. Map every affected site with text search and language-aware tools.
3. For renames, moves, extracts, splits, or broad restructures, use graph tools when available:
- GitNexus dry-run rename for renames; GitNexus context, impact, and query for callers, callees, execution flows, and string/dynamic refs.
- codegraph status first; if fresh, use codegraph context or affected to size dependency/call blast radius.
4. Treat stale graph indexes as no evidence. Refresh if allowed; otherwise fall back to search/LSP and report the gap.
5. Check non-code references when names or paths ch