git.move
Relocate files or folders in your repository and fix all broken references automatically.
Install
mkdir -p .claude/skills/git-move && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11947" && unzip -o skill.zip -d .claude/skills/git-move && rm skill.zipInstalls to .claude/skills/git-move
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Move a file or directory in the Git repo and update all references to itKey capabilities
- →Validate source and destination paths
- →Move file or directory with Git history preservation
- →Update all references to moved item in repository
- →Search for occurrences of old path
- →Replace old path with new path in various file types
- →Summarize performed changes
How it works
The skill validates paths, moves the file or directory using `git mv` to preserve history, then searches and replaces all occurrences of the old path with the new path across the entire repository.
Inputs & outputs
When to use git.move
- →Rename a directory
- →Move a file to a new structure
- →Refactor project file locations
About this skill
Goal
- Given a source path
<SRC>and destination path<DST>move a file or directory in the Git repo and update all references to it
Workflow
Validate Inputs
- Confirm
<SRC>exists in the repository - Confirm
<DST>does not already exist (to prevent accidental overwrites) - Ensure the parent directory of
<DST>exists, creating it if necessary
Move the File or Directory
- Run
git mv <SRC> <DST>to preserve Git history - If the file is in a subrepo (e.g.,
helpers_root), descend in that dir to usegit mv- E.g.,
cd helpers_root && git mv <SRC> <DST>adjusting the paths accordingly
- E.g.,
Move the Corresponding Python Tests
- If
<SRC>is a Python file and it has a corresponding test file (e.g.,<DIR>/<FILE>.py-><DIR>/test/test_<FILE>.py), then move also the test file to the proper destination (e.g.,<DST>/test/test_<FILE>.py)
Update All References
- Search the entire repository for any occurrences of
<SRC>> grep -r -i <SRC> . - Replace each occurrence of
<SRC>with<DST> - This includes:
- Source code imports in Python
- Unit test code in Python
- Configuration files in YAML and JSON
- Documentation in markdown and text
- Any other plaintext files
- Skip binary files and the
.git/directory
Summarize Changes
- Report what changes were performed
- List every file that had references updated, with a count of replacements per file
- Flag any ambiguous matches that may need manual review
Ask for Help If Unsure How to Do
- If the task is not perfectly clear, you MUST not perform it, but ask for
clarifications
- When the task is complex, create a plan.md with 5 bullet points explaining what the plan is
Verify Results
- Make sure that there is no reference left over about file
<SRC>> grep -r -i <SRC> .
When not to use it
- →When the source path does not exist
- →When the destination path already exists
- →When the task is not perfectly clear
Limitations
- →Confirm `<SRC>` exists in the repository
- →Confirm `<DST>` does not already exist (to prevent accidental overwrites)
- →If the task is not perfectly clear, you MUST not perform it, but ask for clarifications
How it compares
This skill automates both the Git move operation and the repository-wide updating of references, ensuring consistency across the codebase, unlike manual file moves and search-and-replace.
Compared to similar skills
git.move side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| git.move (this skill) | 0 | 1mo | No flags | Intermediate |
| ast-grep-find | 3 | 7mo | Review | Intermediate |
| clean | 4 | 3mo | Review | Intermediate |
| code-transfer | 1 | 9mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ast-grep-find
parcadei
AST-based code search and refactoring via ast-grep MCP
clean
catlog22
Intelligent code cleanup with mainline detection, stale artifact discovery, and safe execution. Supports targeted cleanup and confirmation.
code-transfer
mhattingpete
Transfer code between files with line-based precision. Use when users request copying code from one location to another, moving functions or classes between files, extracting code blocks, or inserting code at specific line numbers.
framework-migration-code-migrate
sickn33
You are a code migration expert specializing in transitioning codebases between frameworks, languages, versions, and platforms. Generate comprehensive migration plans, automated migration scripts, and
tdd-migrate
parcadei
TDD workflow for migrations - orchestrate agents, zero main context growth
windsurf-multi-file-editing
jeremylongshore
Manage multi-file edits with Cascade coordination. Activate when users mention "multi-file edit", "edit multiple files", "cross-file changes", "refactor across files", or "batch modifications". Handles coordinated multi-file operations. Use when working with windsurf multi file editing functionality. Trigger with phrases like "windsurf multi file editing", "windsurf editing", "windsurf".