Skip to content
Back to skills

Git.Move

ASecurity

Move a file or directory in the Git repo and update all references to it

  • 158 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 7, 2026
documentationpythongobashgitdocumentation

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add gpsaggese/helpers --skill git.move --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git.Move?

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

Security grade badge for Git.Move
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gpsaggese-git-move/badge)](https://www.skillsdirectory.com/skills/gpsaggese-git-move)

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
---
description: Move a file or directory in the Git repo and update all references to it
model: haiku
---

# 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`), run `git mv` from inside it
  - E.g., `cd helpers_root && git mv <SRC> <DST>` adjusting the paths accordingly

## 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>`:
  ```bash
  > 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.md` with 5 bullet points explaining the plan
  - Say in `plan.md` how it was generated, with this line as the first bullet:
    ```markdown
    - Generated by `.claude/skills/git.move/SKILL.md`
    ```

# Verification
- [ ] Confirm no reference to `<SRC>` is left
  ```bash
  > grep -r -i <SRC> .
  ```
- [ ] The file `plan.md` says that it was generated by
      `.claude/skills/git.move/SKILL.md`

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 documentation →

Comments

Loading comments…

Newsletter

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