gogongxt/dotfiles/transfer
Claude Code and agent skill by gogongxt/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Transfer files between machines via SSH - supports direct transfer, jump host relay, and progress monitoring
Install
npx vskill@latest install gogongxt/dotfiles/transferSKILL.md
File Transfer via SSH
Transfer files/directories between machines through SSH. Supports direct transfer and jump host (bastion) relay scenarios. Handles large file monitoring, parallel transfers, and verification.
When to Use
- Transfer model weights, docker images, datasets, or scripts to a remote machine
- Need to go through a jump host / bastion to reach the target machine
- Transfer large files (10G+) that need progress monitoring
- User explicitly invokes
/transfer
Required User Inputs
Before starting, confirm with the user:
| Parameter | Description | Example | |
|---|---|---|---|
| Source files | File/directory paths to transfer (on local or jump host) | /path/to/<DIR_NAME> | |
| Target host | Destination machine address | <USER>@<HOST> | |
| Target port | SSH port (default: 22) | 22 | |
| Target path | Destination directory on target machine | /<TARGET_DIR> | |
| Jump host | (Optional) Bastion host for relay transfers | <JUMP_USER>@<JUMP_HOST> | |
| Jump port | (Optional) Jump host SSH port (default: 22) | 22 |
If the user does not specify a target path, ask — do not guess.
Transfer Scenarios
Scenario A: Direct Transfer (no jump host)
Local machine can reach target directly.
Scenario B: Jump Host Relay
Local machine → jump host → target machine. The jump host has access to both the source files (via NFS or local storage) and the target machine.
Key question: Does the jump host share the same NFS as the local machine?
- If YES: No need to transfer files from local to jump host. Just SCP from jump host to target directly.
- If NO: Need to first SCP from local to jump host, then SCP from jump host to target.
Common pattern: /nfs/gogongxt/ paths are shared between local and jump host machines. Verify this before starting.
Workflow
Step 1: Connectivity Check
Test SSH connectivity to each machine in the chain:
If connection fails, report to user — do not proceed.
Step 2: Verify Source Files
Check that all source files/directories exist and get their sizes:
Report total transfer size to the user.
Step 3: Check Target Disk Space
Verify the target machine has enough disk space:
If not enough space, report to user and stop.
Step 4: Create Target Directory
Step 5: Launch Transfers
Launch SCP for each file/directory. For multiple files, run them in parallel as background processes on the source machine.
Direct transfer:
Jump host relay (SCP from jump host to target):
Parallel launch pattern — launch multiple SCPs at once from the jump host:
Step 6: Monitor Progress
For large transfers, periodically check progress by querying file sizes on the target:
Also check if SCP processes are still running:
Monitoring cadence:
- For small files (<1G): no monitoring needed, just verify completion
- For medium files (1G-10G): check every 5 minutes
- For large files (10G+): check every 10 minutes
- For very large files (50G+): check every 10-20 minutes
Use background Bash tasks (run_in_background: true) with sleep for periodic monitoring to avoid blocking the conversation.
Present progress as a table each time:
| File | Total Size | Transferred | % | Status | |
|---|---|---|---|---|---|
| <FILE_NAME>.tar | 28G | 14G | 50% | Transferring | |
| <DIR_NAME>/ | 16G | 16G | 100% | Complete |
Step 7: Verify Completion
After all SCP processes have exited, compare source and target sizes to confirm transfer completeness.
Compare source and target sizes with `du -sh`:
Present comparison as a table:
| File | Source Size | Target Size | Match | Status | |
|---|---|---|---|---|---|
| <FILE_NAME>.tar | 28G | 28G | Yes | Complete | |
| <DIR_NAME>/ | 16G | 16G | Yes | Complete | |
| <FILE_NAME>.json | 642M | 640M | ~Yes | Complete |
_Note: Small differences (<1%) are normal due to filesystem block size differences. Large discrepancies indicate incomplete or failed transfer — report to user._
Also verify SCP processes have exited:
For directories, also check file count matches:
Report final status to the user with a summary table showing all files transferred, source vs target sizes, and whether they match.
Speed Estimation
Typical transfer speeds to help estimate completion time:
| Network Type | Speed per stream | Time for 100G | |
|---|---|---|---|
| Same datacenter | 50-100 MB/s | 15-30 min | |
| Cross datacenter | 10-30 MB/s | 1-3 hours | |
| WAN / VPN | 2-10 MB/s | 3-15 hours |
Multiple parallel streams share bandwidth. When one stream finishes, remaining streams may speed up.
Safety Rules
- Always verify disk space before transfer — do not fill up the target disk
- Always create target directory before SCP — SCP will fail if the directory doesn't exist
- Use `nohup` for all large transfers — ensures transfer survives SSH disconnects
- Redirect output to log files — capture stdout/stderr for debugging
- Never delete existing files on target — if a file already exists, report to user
- Verify completion — check file sizes match and SCP processes have exited before reporting success
- Report transfer speed estimate — help the user understand how long to wait
Error Handling — STOP and Report
When any of the following situations occur, immediately stop all operations and report to the user. Do NOT attempt to fix, retry, or work around the issue on your own:
- SSH connection fails — do not try alternative ports, users, or hosts without asking the user
- Source file not found — do not guess or search for similar paths; ask the user for the correct path
- Target disk space insufficient — do not delete files on target to make room; ask the user how to proceed
- Target file/directory already exists — do not overwrite; report the conflict and ask the user
- SCP transfer fails or gets stuck — do not retry automatically; check the log and report the error
- File size mismatch after transfer — do not re-transfer; report the discrepancy to the user
- Unexpected SCP process behavior (e.g., process disappeared, wrong file count) — stop and report
- Permission denied on target — do not use
sudoor change permissions; report to the user
Rule of thumb: When in doubt, stop and ask. Never take destructive or speculative actions. The user can always provide guidance, but cannot undo an unauthorized operation.
Common Patterns
Transfer model files through a jump host
Transfer multiple small files directly
Notes
- For SSH authentication issues, use
/ssh-tasksskill to get the full SSH access methods and guidance - NFS shared paths (
/nfs/) are typically identical between local and jump host — verify, then skip the local→jump transfer - Each Bash tool call is a new shell session — SSH connections are stateless per call
- For jump host scenarios, all SCP commands run ON the jump host (it has access to both source and target)
- Use
-o StrictHostKeyChecking=noto avoid interactive host key prompts - For
scp, note the capital-Pfor port (unlike ssh's lowercase-p)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaudecode/.claude/skills/transfer/SKILL.md
Popularity
- Repository stars
- 57
- Repository forks
- 6
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gogongxt/dotfiles/transfer)