Update imports after moving files in Claude Code
Fix module imports, configuration strings, and documentation paths after a move or rename while preserving the project's import style.
中文Install in Claude Code
A Claude Code workspace with DiPeO, a verified old-to-new path mapping, and an existing import check.
- Review `.claude/skills/import-refactor/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.claude/skills/import-refactor/` in your project and save the reviewed file as `.claude/skills/import-refactor/SKILL.md`.
- Start Claude Code from that project's root, then select `/import-refactor` in the slash menu.
Example task
A fictional Python import, a setting, and documentation use the old path. The fixture is `{old:'preview.labels',new:'render.labels',symbol:'format_label'}`, and the new module exists.What to check
Update the import to `from render.labels import format_label` and check that the setting and documentation resolve to render.labels. Summarize the reference changes and verify the actual import.
Original SKILL.md on GitHub · Updated
Frequently asked question
Which references are easy to miss after moving a Python file?
Check module-loading strings, configuration, and documentation examples as well as imports. Confirm the new path exists and preserve established absolute or relative style.