AGENT SKILL
git.move
Move a file or directory in the Git repo and update all references to it
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- model
- haiku
- description
- Move a file or directory in the Git repo and update all references to it
03 SKILL.md 正文
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.mdwith 5 bullet points explaining what the plan is
- When the task is complex, create a
Verification
- [ ] Confirm there is no reference left over about file
<SRC>> grep -r -i <SRC> .
04 同仓库更多 Skills
tutorial_in_60_mins.propagate_docker_changes
Sync tutorial and class-project Docker files to match project_template
★ 0
tutorial_in_60_mins.merge_markdown
Merge the content of a markdown file into a Jupyter notebook
★ 0
tutorial_in_60_mins.format
Format a directory to follow the "Learn X in 60 Minutes" tutorial conventions
★ 0
tutorial_in_60_mins.create
Create a tutorial directory for the Learn X in 60 Minutes conventions
★ 0
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
★ 0
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage
★ 0