gitnexus-refactoring

Automates safe code renaming, extraction, and restructuring using GitNexus dependency graph analysis.

1|Updated Oct 11, 2025
One-click install
npx skills add https://github.com/ibytechaos/claude --skill gitnexus-refactoring-ibytechaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitnexus-refactoring
Source: https://github.com/ibytechaos/claude/tree/main/plugins/gitnexus/skills/gitnexus-refactoring
Command: npx skills add https://github.com/ibytechaos/claude --skill gitnexus-refactoring-ibytechaos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gitnexus.

What problem does it solve? Refactoring code across a large codebase is risky because renaming a symbol or moving a module can silently break callers, tests, and dynamic references scattered across many files. This Skill uses the GitNexus code graph to map every dependency before making changes, so refactors are applied with full visibility into their impact. ## Core Features & Use Cases - Automated Multi-File Rename: Preview and apply symbol renames across all files with confidence-scored edits, distinguishing graph-based edits from text-search matches that need review. - Impact Analysis Before Changes: Map all upstream dependents and affected execution flows before extracting modules, splitting services, or moving code. - Post-Refactor Verification: Detect which files, symbols, and processes changed after refactoring and assess the risk level to know which tests to run. - Use Case: You need to rename validateUser to authenticateUser across a TypeScript project. The Skill previews 12 edits across 8 files, flags a dynamic reference in a config file for manual review, applies the changes, and tells you which login flows to retest. ## Quick Start Ask the assistant to rename a function safely across the entire codebase using GitNexus impact analysis and dry-run preview.

Frequently Asked Questions about gitnexus-refactoring

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

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

Use gitnexus_rename with dry_run set to true to preview all edits across files, review the confidence-scored changes, then run it again with dry_run false to apply. Graph-based edits are high confidence while text-search matches need manual review.

How to check what breaks before refactoring code?

Run gitnexus_impact with direction upstream to map all dependents of the target symbol, then use gitnexus_query to find execution flows involving it. This reveals callers, affected processes, and cross-area references before you change anything.

Does GitNexus refactoring require any setup?

Yes, the codebase must be indexed first by running npx gitnexus analyze in the terminal, and the GitNexus MCP server must be configured. If the index is stale, the tools will report it and you need to re-run the analysis.

Why does a rename miss some references in my code?

Dynamic or string-based references are not resolved through the code graph and appear as lower-confidence ast_search edits instead. Use gitnexus_query or custom Cypher queries to locate these dynamic references and update them manually.

When should I not use automated graph-based refactoring?

Avoid it for public or external APIs where consumers are outside the indexed codebase, since those callers cannot be detected. In those cases, version and deprecate the API properly instead of renaming in place.