Agent skill · software engineering · abhigyanpatwari
gitnexus-refactoring
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\
Why this skill is useful
Adds executable scripts for safe refactoring processes using GitNexus that automate dependency mapping and impact analysis.
What it needs
Requires gitnexus installed locally. About 4k tokens when loaded. Last updated 2026-08-06. 45,147 stars on the source repository.
What this skill does
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 Bind the repository first Refactoring writes to disk. rename with dryrun: false edits files in whichever repository was resolved, so binding identity here is a safety gate, not bookkeeping. Call listrepos {} before the first tool call. With one indexed repository, use the examples below as written. With more than one, pass repo on every call: an omitted repo normally errors, but under an MCP policy with a configured default it resolves to that default silently. If you cannot tell which repository is meant, stop and ask. Never run rename with dryrun: false until the preview in the same bound repository has been reviewed — its returned filepath values show which checkout is about to be written, so read them as a confirmation of identity. listrepos is paginated, so page with offset: pagination.nextOffset until hasMore is false before concluding a repository is absent. detectchanges takes worktree when you are editing a linked worktree the MCP server was not launched from; otherwise git diff runs in the wrong checkout and reports nothing changed, which reads as a verified refactor. Workflow If "Index is stale" → run node .gitnexus/run.cjs analyze in terminal. Checklists Rename Symbol Extract Module Split Function/Service Tools rename — automated multi-file rename: impact — map all dependents first: detectchanges — verify your changes after refactoring: partial: true (a graph query failed) or truncated: true (the changed-symbol listing was capped) means the result is short of the truth: a short or empty list is not proof that only the expected files changed. Re-run it rather than treat the refactor as verified. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills abhigyanpatwari/gitnexus-refactoring--e2ed8e