gpsaggese/helpers / .claude/skills/git.move
git.move
VerifiedMove a file or directory in the Git repo and update all references to it
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 exist, to prevent accidental overwrites - Ensure the parent directory of
<DST>exists, creating it if needed
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), rungit mvfrom inside it- 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 with a test file (e.g.,<DIR>/<FILE>.py-><DIR>/test/test_<FILE>.py), also move the test file to the matching destination (e.g.,<DST>/test/test_<FILE>.py)
Update All References
- Search the entire repository for
<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 each file with updated references, and its replacement count
- 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
- For a complex task, create a
plan.mdwith 5 bullet points explaining the plan - Say in
plan.mdhow it was generated, with this line as the first bullet:- Generated by `.claude/skills/git.move/SKILL.md`
- For a complex task, create a
Verification
- Confirm no reference to
<SRC>is left> grep -r -i <SRC> . - The file
plan.mdsays that it was generated by.claude/skills/git.move/SKILL.md
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |