From idea-to-code
Guides file moving, renaming, and reorganization using git mv or bash mv over write/delete patterns to preserve git history, metadata, and reduce errors during code refactoring.
npx claudepluginhub humansintheloop-dev/humansintheloop-dev-workflow-and-tools --plugin idea-to-codeThis skill uses the workspace's default tool permissions.
When reorganizing files, moving files, or renaming files, follow these guidelines:
Moves or renames files in a codebase while searching for and updating references in source code, docs, configs using ripgrep and git mv.
Safely scans, previews, and reorganizes project structure with read-only analysis, dry-runs, user confirmations, and protections for git, node_modules, secrets, and builds.
Share bugs, ideas, or general feedback.
When reorganizing files, moving files, or renaming files, follow these guidelines:
Use git mv or mv via Bash instead of Write + delete:
git mv old/path/File.java new/path/File.java
Then use Edit to update any necessary content (e.g., package declarations).
IMPORTANT: Never recreate files from scratch when the original exists. Move the file first, then edit its contents.
When reorganizing Java packages:
# 1. Create new directory structure
mkdir -p src/main/java/com/example/newpackage
# 2. Move the file
mv src/main/java/com/example/oldpackage/MyClass.java src/main/java/com/example/newpackage/
# 3. Update the package declaration
# Use Edit tool to change: package com.example.oldpackage;
# To: package com.example.newpackage;
When moving files during refactoring:
Before moving source files in a refactoring:
src/main/java, src/test/java, AND custom source setssrc/integrationTest, src/integration-test, src/componentTest, src/component-testIMPORTANT: This is one situation where ./gradlew build passing is insufficient. You must verify that each test class has a corresponding TEST-*.xml file in the correct build directory. Tests may compile but not run if source sets are misconfigured.
When converting single-module to multi-module:
git show HEAD:path/to/build.gradle to capture original configurationReserve the Write tool for:
Do NOT use Write for:
Use the right tool for file discovery and inspection:
| Task | Use | Instead of |
|---|---|---|
| List/find files | Glob | ls, find |
| Search file contents | Grep | grep, rg |
| Read file contents | Read | cat, head, tail |
| Edit files | Edit | sed, awk |
The dedicated tools:
command 2>/dev/null || echo "fallback"