gitnexus-refactoring
Skill1 starsChanged 51 days agoMITView on GitHub
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\"
Files
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
Workflow
1. impact({target: "X", direction: "upstream"}) → Map all dependents
2. query({search_query: "X"}) → Find execution flows involving X
3. context({name: "X"}) → See all incoming/outgoing refs
4. Plan update order: interfaces → implementations → callers → testsIf "Index is stale" → run
node .gitnexus/run.cjs analyzein terminal.
Checklists
Rename Symbol
- [ ] rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits
- [ ] Review graph edits (high confidence) and text_search edits (review carefully)
- [ ] If satisfied: rename({..., dry_run: false}) — apply edits
- [ ] detect_changes() — verify only expected files changed
- [ ] Run tests for affected processesExtract Module
- [ ] context({name: target}) — see all incoming/outgoing refs
- [ ] impact({target, direction: "upstream"}) — find all external callers
- [ ] Define new module interface
- [ ] Extract code, update imports
- [ ] detect_changes() — verify affected scope
- [ ] Run tests for affected processesSplit Function/Service
- [ ] context({name: target}) — understand all callees
- [ ] Group callees by responsibility
- [ ] impact({target, direction: "upstream"}) — map callers to update
- [ ] Create new functions/services
- [ ] Update callers
- [ ] detect_changes() — verify affected scope
- [ ] Run tests for affected processesTools
rename — automated multi-file rename:
rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 edits across 8 files
→ 10 graph edits (high confidence), 2 text_search edits (review)
→ Changes: [{file_path, edits: [{line, old_text, new_text, confidence}]}]impact — map all dependents first:
impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware, testUtils
→ Affected Processes: LoginFlow, TokenRefreshdetect_changes — verify your changes after refactoring:
detect_changes({scope: "all"})
→ Changed: 8 files, 12 symbols
→ Affected processes: LoginFlow, TokenRefresh
→ Risk: MEDIUMpartial: 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.
cypher — custom reference queries:
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
RETURN caller.name, caller.filePath ORDER BY caller.filePathRisk Rules
| Risk Factor | Mitigation |
| Many callers (>5) | Use rename for automated updates |
| Cross-area refs | Use detect_changes after to verify scope |
| String/dynamic refs | query to find them |
| External/public API | Version and deprecate properly |
Example: Rename validateUser to authenticateUser
1. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 edits: 10 graph (safe), 2 text_search (review)
→ Files: validator.ts, login.ts, middleware.ts, config.json...
2. Review text_search edits (config.json: dynamic reference!)
3. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
→ Applied 12 edits across 8 files
4. detect_changes({scope: "all"})
→ Affected: LoginFlow, TokenRefresh
→ Risk: MEDIUM — run tests for these flowsOther versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 10
- abhigyanpatwari/GitNexus★ 48k21% same
- doobidoo/mcp-memory-service★ 2.1k63% same
- ucsandman/DashClaw★ 31055% same
- kunwarVivek/mcp-github-project-manager★ 10455% same
- haoxiang-xu/PuPu★ 3655% same
- pandich93/youtube-niche-finder★ 2355% same
- metagit-ai/metagit-cli★ 454% same
- MarkChu-git/typesafe-mcp★ 255% same
- AlexHercules/skills★ 068% same
- ErrorNotFound808/claude-skills★ 093% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository115 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/backend.mdcCursor rule
- .cursor/rules/commit.mdcCursor rule
- .cursor/rules/database.mdcCursor rule
- .cursor/rules/debug.mdcCursor rule
- .cursor/rules/design.mdcCursor rule
- .cursor/rules/dev-workflow.mdcCursor rule
- .cursor/rules/frontend.mdcCursor rule
- .cursor/rules/i18n-arb.mdcCursor rule
- .cursor/rules/i18n-guide.mdcCursor rule
- .cursor/rules/infrastructure.mdcCursor rule
- .cursor/rules/market.mdcCursor rule
- .cursor/rules/mobile.mdcCursor rule
- .cursor/rules/quality.mdcCursor rule
- beadsSkill
- gitnexus-area-adaptersSkill
- gitnexus-area-cliSkill
- gitnexus-area-contextSkill
- gitnexus-area-dashboardSkill
- gitnexus-area-detectorsSkill
- gitnexus-area-engineSkill
- gitnexus-area-enrichmentSkill
- gitnexus-area-hooksSkill
- gitnexus-area-installerSkill
- gitnexus-area-integrationSkill
- gitnexus-area-lintSkill
- gitnexus-area-payloadsSkill
- gitnexus-area-project-indexSkill
- gitnexus-area-resourcesSkill
- gitnexus-area-rules-2Skill
- gitnexus-area-rulesSkill
- gitnexus-area-scriptsSkill
- gitnexus-area-test-smellsSkill
- gitnexus-area-testsSkill
- gitnexus-area-uiSkill
- gitnexus-cliSkill
- gitnexus-debuggingSkill
- gitnexus-exploringSkill
- gitnexus-guideSkill
- gitnexus-impact-analysisSkill
- impeccableSkill
- oma-academic-writingSkill
- oma-architectureSkill
- oma-backendSkill
- oma-brainstormSkill
- oma-coordinationSkill
- oma-dbSkill
- oma-debugSkill
- oma-deepsecSkill
- oma-designSkill
- oma-dev-workflowSkill
- oma-docsSkill
- oma-explanationSkill
- oma-frontendSkill
- oma-hwpSkill
- oma-imageSkill
- oma-marketSkill
- oma-mobileSkill
- oma-observabilitySkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

