Skip to content
Development
Skill

/refactor

Safe refactoring with dependency awareness. Use when restructuring, renaming, moving, extracting, or consolidating code.

From plugin
codemap
7057 skills1 MCP

Claude Code

$ npx -y skills add JordanCoin/codemap --skill refactor --agent claude-code

SKILL.md

refactor.SKILL.md
name: refactor
description: Safe refactoring with dependency awareness. Use when restructuring, renaming, moving, extracting, or consolidating code.

Safe Refactoring with Code Intelligence

Before refactoring

1. Run `codemap --deps .` to understand the dependency graph 2. Identify hub files in the refactoring scope: they need extra care 3. Run `codemap --diff` to see what's already changed on this branch

Refactoring checklist

  • [ ] All tests pass before starting
  • [ ] Hub files identified and dependents listed
  • [ ] Public API changes planned (additive preferred)
  • [ ] Import paths updated if moving files
  • [ ] No circular dependencies introduced

Safe rename pattern

1. Add the new name alongside the old (alias/wrapper) 2. Update all callers to use the new name 3. Remove the old name 4. Run full test suite

Safe move pattern

1. Create the new file with the same API 2. Re-export from the old location (temporary) 3. Update all importers to use the new path 4. Remove the old file and re-export

After refactoring

  • Run `codemap --deps .` again to verify the graph is clean
  • Run `codemap --importers <moved-file>` to check nothing is broken
  • Full test suite must pass
@jordancoin
Ships withcodemap

codemap — structural ground truth for coding agents. Resolves what your code actually imports, tells you what breaks if you change it, and is explicit about what it couldn't figure out.

7057 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
705
Star history of JordanCoin/codemap on GitHub, a chart by star-history.com

Other skills on codemap.

More skills from other plugins.

brainstorming
Skill
Popular
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
accessibility
Skill
Popular
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2d293k
@affaan-m@affaan-mInstall Skill
compiler-commit
Skill
Popular

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about refactor.

Which coding agents can use refactor?
refactor installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.