Skip to content
Back to skills

Move Code

ASecurity

Move or rename TypeScript files, folders, or top-level declarations and leave every reference to them correct. Use when a change moves or renames source files, moves a function, type, class or const from one file to another, or renames one, such as gathering code into a context folder.

  • 1,055 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 10, 2026
ai-agentstypescriptgit

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add rome-os/rome --skill move-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Move Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Move Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rome-os-move-code/badge)](https://www.skillsdirectory.com/skills/rome-os-move-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: move-code
description: Move or rename TypeScript files, folders, or top-level declarations and leave every reference to them correct. Use when a change moves or renames source files, moves a function, type, class or const from one file to another, or renames one, such as gathering code into a context folder.
---

# Move code

Run every move through `pnpm move-files <from>:<to> ...` ([`scripts/move-files.ts`](../../../scripts/move-files.ts)), never through `git mv` and hand edits. Give all the moves of one change in one call, and list only the source files: their tests follow them. The tool rewrites imports, mock paths, Markdown links, and paths in docs and comments that name a moved file, then formats what it touched.

Move a top-level declaration between files with `pnpm move-symbol <from> <to> <name> ...`, and rename one with `pnpm rename-symbol <file> <old> <new>`, never by hand. Both drive TypeScript's own refactors ([`scripts/ts-service.ts`](../../../scripts/ts-service.ts)), so they reach the files the package's tsconfig includes. `rename-symbol` refuses a new name that already means something where the old one is written. `move-symbol` ends with a list to check by hand: mocks of the old file, namespace re-exports of it, and an import cycle between the two files. Clear unused imports with Biome: `biome lint --only=correctness/noUnusedImports --write --unsafe <paths>`.

You own what `move-files` lists at the end: lines that still name an old path, which are paths built by hand in code, configs and bundler inputs. Fix each one or confirm it names something else. A path assembled from folder names, such as `join(dir, "actions")`, is not listed, so search for the old folder names yourself.

The move is done when `pnpm typecheck` and `pnpm lint:imports` pass, every line `move-symbol` listed is fixed or confirmed, the tests of every moved file pass, and git shows each moved file as a rename whose only edits are paths. When the tool rewrites a reference wrongly, or misses one it could find mechanically, fix the tool as well as the output.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.