← ClaudeAtlas

gitnexus-refactoringlisted

Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: "Rename this function", "Extract this into a module", "Refactor this class", "Move this to a separate file"
Apra-Labs/apra-fleet · ★ 93 · Code & Development · score 68
Install: claude install-skill Apra-Labs/apra-fleet
# Refactoring with GitNexus ## When to Use - "Rename this function safely" - "Extract this into a module" - "Split this service" - "Move this to a new file" - Any task involving renaming, extracting, splitting, or restructuring code ## Workflow ``` 1. impact({target: "X", direction: "upstream"}) -> Map all dependents 2. query({search_query: "X"}) -> Find execution flows involving X 3. context({name: "X"}) -> See all incoming/outgoing refs 4. Plan update order: interfaces -> implementations -> callers -> tests ``` > If "Index is stale" -> run `node .gitnexus/run.cjs analyze` in terminal. ## Checklists ### Rename Symbol ``` - [ ] rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) -- preview all edits - [ ] Review graph edits (high confidence) and text_search edits (review carefully) - [ ] If satisfied: rename({..., dry_run: false}) -- apply edits - [ ] detect_changes() -- verify only expected files changed - [ ] Run tests for affected processes ``` ### Extract Module ``` - [ ] context({name: target}) -- see all incoming/outgoing refs - [ ] impact({target, direction: "upstream"}) -- find all external callers - [ ] Define new module interface - [ ] Extract code, update imports - [ ] detect_changes() -- verify affected scope - [ ] Run tests for affected processes ``` ### Split Function/Service ``` - [ ] context({name: target}) -- understand all callees - [ ] Group callees by responsibility - [ ] im