gitnexus-refactoring

Map and apply safe code refactorings that rename, extract, split, or move symbols and modules.

31|18|Updated Oct 15, 2024
One-click install
npx skills add https://github.com/grafana/metrics-drilldown --skill gitnexus-refactoring-grafana
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitnexus-refactoring
Source: https://github.com/grafana/metrics-drilldown/tree/main/.claude/skills/gitnexus/gitnexus-refactoring
Command: npx skills add https://github.com/grafana/metrics-drilldown --skill gitnexus-refactoring-grafana

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely renaming, extracting, splitting, or moving code across a project while preserving dependencies, references, and behavior.

Core Features & Use Cases

  • Safe symbol renames with dependency mapping to minimize breakages
  • Module extraction and service splitting with updated imports and tests
  • Refactoring planning and impact analysis to guide large-scale changes
  • Guidance for updating callers and tests during multi-file refactors

Quick Start

Rename a function, class, or module across the codebase while preserving imports and references.

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 or class across a large multi-file codebase?

Safe symbol renames require dependency mapping to minimize breakages. Map references across imports and callers, then apply staged updates to cascade the new name through the codebase while preserving behavior and traceability.

What is the best way to extract a module or split a service without breaking imports?

The best way to extract modules or split services is through context-aware planning. Map dependencies, update imports and tests, and apply staged updates to ensure callers and references remain correct throughout the restructure.

Can I use this refactoring workflow for large-scale code restructuring?

Yes, this refactoring workflow suits large codebases and multi-file projects. It enforces dependency mapping, context-aware planning, and impact analysis to guide large-scale changes like splitting or moving modules safely.

How does dependency mapping work during multi-file code refactoring?

Dependency mapping tracks references and imports across the project before applying changes. This context-aware planning ensures that moving or splitting symbols updates all callers and tests, preventing breakages during multi-file refactors.

When do I need impact analysis for code restructuring tasks?

You need impact analysis for code restructuring when changes cascade through imports, tests, and callers. It guides large-scale refactors by mapping dependencies and planning staged updates to preserve behavior and ensure traceability.

How do I update tests and callers when moving code between modules?

When moving code between modules, use dependency mapping to identify affected callers and tests. Apply staged updates to update imports and references, ensuring the multi-file restructure preserves behavior and correctness.