gitnexus-refactoring

Renames, extracts, splits, and restructures code symbols using GitNexus graph analysis.

1|Updated Jul 27, 2023
One-click install
npx skills add https://github.com/AlexTheGuitarGuy/.dotfiles --skill gitnexus-refactoring-alextheguitarguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gitnexus-refactoring
Source: https://github.com/AlexTheGuitarGuy/.dotfiles/tree/main/claude/.claude/skills/gitnexus-refactoring
Command: npx skills add https://github.com/AlexTheGuitarGuy/.dotfiles --skill gitnexus-refactoring-alextheguitarguy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Refactoring code across a large codebase is risky: renaming a function or extracting a module can silently break callers, dynamic references, and tests scattered across many files. This Skill uses the GitNexus code graph to map every dependent before editing, preview changes safely, and verify the affected scope afterward. ## Core Features & Use Cases - Safe Multi-File Rename: Preview all edits with dry-run mode, distinguishing high-confidence graph edits from text-search matches that need manual review, then apply across files. - Impact Analysis Before Changes: Map all upstream dependents and affected execution flows before extracting modules or splitting services. - Post-Refactor Verification: Run change detection to confirm only expected files changed and get a risk rating for affected processes. - Use Case: You need to rename validateUser to authenticateUser across a monorepo. The Skill binds the correct repository, previews 12 edits across 8 files, flags a dynamic reference in config.json for review, applies the rename, and verifies that only the LoginFlow and TokenRefresh processes are affected. ## Quick Start Ask the AI to safely rename a function across the repository, previewing all affected files before applying any changes.

Frequently Asked Questions about gitnexus-refactoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely rename a function across multiple files?▼

Use the rename tool with dry_run set to true first to preview all edits across files, distinguishing high-confidence graph edits from text-search matches. After reviewing the previewed file paths, run rename again with dry_run false to apply the changes.

How to find all callers of a function before refactoring?▼

Run the impact tool with the target symbol and direction set to upstream to map all dependents by depth. It also lists affected execution processes, so you know which flows and tests to check after the change.

Does this work with monorepos containing multiple indexed repositories?▼

Yes, but you must call list_repos first and pass the repo parameter explicitly on every call when more than one repository is indexed. If the intended repository is ambiguous, the workflow stops and asks rather than risking edits to the wrong checkout.

Why does detect_changes report nothing changed after my refactor?▼

A zero-change result usually means git diff ran in the wrong checkout. Pass the worktree parameter when editing a linked worktree the MCP server was not launched from, since a wrong-worktree zero looks identical to a clean verification.

What are the limitations of automated symbol renaming?▼

Automated rename handles static references well but flags string and dynamic references as lower-confidence text_search edits requiring manual review. External public APIs should be versioned and deprecated properly instead of renamed directly.