move-files

Moves or renames git-tracked files and directories while preserving history and updating references.

2|Updated May 28, 2021
One-click install
npx skills add https://github.com/SpineEventEngine/validation --skill move-files
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: move-files
Source: https://github.com/SpineEventEngine/validation/tree/main/.agents/skills/move-files
Command: npx skills add https://github.com/SpineEventEngine/validation --skill move-files

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken imports, stale links, and build failures caused by renaming or relocating files and directories without updating every dependent reference.

Core Features & Use Cases

  • Preflight planning: Creates a source-to-destination mapping and classifies move scope (module/package/cross-module) to determine the right search radius.
  • Safe move execution: Uses git-preserving operations (prefers git mv) including handling case-only renames via a temporary name.
  • Comprehensive reference repair: Updates imports, build metadata, documentation links, resources, and script references so the repository remains consistent.
  • Post-move verification & guardrails: Re-runs targeted searches for stale tokens, checks git status deltas, and enforces a version bump requirement before running builds.

Quick Start

Tell the Skill which files or directories you want to move to where, and ask it to preserve history, update all references, and verify that no stale paths remain.

Frequently Asked Questions about move-files

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I move files in git without breaking imports and build metadata?

To move files without breaking imports, you need a preflight source-to-destination map and safe git mv operations, followed by comprehensive reference updates across code, build metadata, and docs to eliminate stale paths.

What is the best way to rename a directory across modules while preserving git history?

The best way to relocate directories across modules while preserving git history is using git mv operations, expanding the search radius for broader package relocations, and updating all dependent script and resource references.

How does a case-only rename work when migrating file paths in a repository?

Case-only renames during file path migration work by utilizing a temporary name intermediate step within the safe move execution, ensuring the filesystem correctly registers the new casing without losing git history.

Do I need a version bump before running builds after a path migration?

Yes, a version bump is a mandatory guardrail before running builds after a path migration, ensuring post-move verification catches stale tokens and validates git status deltas for repository hygiene.

Why does refactoring file locations cause stale documentation links?

Refactoring file locations causes stale documentation links because the physical paths change but the embedded references in docs, resources, and build metadata are not automatically updated without a comprehensive reference repair process.