git-move — file ops that respect git
When moving, renaming, or deleting a file/directory that might be tracked by
git, never use bare mv / rm — that drops git's rename/delete tracking and
leaves the index inconsistent. Use the helper:
ROOT="${AI_AGENTS_SKILLS_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-}}}}"
"$ROOT"/skills/git-move/git-move.sh <src> <dst> # move / rename
"$ROOT"/skills/git-move/git-move.sh --rm <path> [path…] # delete
Behaviour:
- Tracked path inside a work tree →
git mv/git rm(history + index stay clean). - Untracked path, or not in a git repo → plain
mv/rm -rf(fallback). - Destination parent dirs are created automatically (
mkdir -p). - Staging only — it never commits. You commit separately when asked, following the git-flow core.
Examples:
"$ROOT"/skills/git-move/git-move.sh .claude/kanban/grooming/foo.md .claude/kanban/todo/foo.md
"$ROOT"/skills/git-move/git-move.sh --rm .claude/kanban/todo/old.md .claude/kanban/todo/dup.md