gitnexus-refactoring

Map dependents and execution flows to plan safe code refactoring.

Updated Jul 5, 2025
One-click install
npx skills add https://github.com/nsuberi/ai-prototype-hub --skill gitnexus-refactoring-nsuberi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitnexus-refactoring
Source: https://github.com/nsuberi/ai-prototype-hub/tree/main/.claude/skills/gitnexus/gitnexus-refactoring
Command: npx skills add https://github.com/nsuberi/ai-prototype-hub --skill gitnexus-refactoring-nsuberi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents breaking changes during refactors by showing impacts, execution flows, and incoming/outgoing references before you rename, extract, split, move, or restructure code.

Core Features & Use Cases

  • Safe refactor planning: Discover dependents and execution flows for the target symbol to understand blast radius.
  • Graph-aware transformations: Rename/extract/split changes in an order that protects interfaces and calling sites.
  • Verification guardrails: Detect changes and validate the scope after applying edits.
  • Use Case: Rename a widely used validation function across handlers, middleware, and tests while minimizing dynamic/string reference regressions.

Quick Start

Use gitnexus-refactoring to rename a symbol safely by asking for a planned dry run first, then applying once you approve the change scope.

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 that is used across multiple files and tests?

Safe function renaming requires mapping dependents and execution flows to understand the blast radius before applying changes. You can plan a dry run first, then apply edits once the change scope is verified.

What is the best way to plan code refactoring without breaking dependencies?

Code refactoring without breaking dependencies uses a dependency graph to map incoming and outgoing references. This allows you to apply rename, extract, or split changes in an order that protects interfaces and calling sites.

How do you verify the impact scope after restructuring code?

Verifying the impact scope after restructuring code involves running change detection tools to validate the applied edits. This ensures the refactor stays within the planned boundaries and prevents regressions.

Can I refactor code that has dynamic or string references?

Refactoring code with dynamic or string references is handled by mapping execution flows and incoming references before editing. This minimizes dynamic reference regressions during tasks like renaming widely used validation functions.

How do I split a module while maintaining the correct dependency ordering?

Splitting a module while maintaining dependency ordering involves mapping the target symbol's dependents and execution flows first. You then plan interface-to-implementation-to-caller updates to protect calling sites during the split.