Install
openclaw skills install @moony320/download-fileDownload large files from HTTP/HTTPS URLs with resume support, progress monitoring, and timeout handling
openclaw skills install @moony320/download-fileUse this skill when downloading files from HTTP/HTTPS URLs, especially large files (>100MB).
Typical scenarios:
Trigger keywords:
curl -C - for resumable downloads--progress-bar flagexec(
command="curl -L -C - --progress-bar -o <destination_path> <URL>",
background=true,
timeout=600
)
Parameter explanation:
-L - Follow redirects-C - - Resume partial download--progress-bar - Show progress bar-o - Output file pathbackground=true - Critical! Run in background to avoid timeouttimeout=600 - 10 minutes timeout (adjust based on file size)process(action="poll", sessionId="<session_id>")
Poll periodically to check download progress until completion.
exec(command="ls -lh <file_path>")
Check:
User: "Download https://github.com/example/app/releases/download/v1.0/app.dmg"
Agent action:
{
"tool": "exec",
"command": "curl -L -C - --progress-bar -o ~/Downloads/app.dmg https://github.com/example/app/releases/download/v1.0/app.dmg",
"background": true,
"timeout": 600
}
Returns: {status: "running", sessionId: "xxx"}
Then poll periodically:
{
"tool": "process",
"action": "poll",
"sessionId": "xxx"
}
After download completes, verify:
{
"tool": "exec",
"command": "ls -lh ~/Downloads/app.dmg && file ~/Downloads/app.dmg"
}
For small files, simplified handling is acceptable:
exec(command="curl -L -o ~/Downloads/small.pdf https://example.com/small.pdf", timeout=120)
Small files can run synchronously, but still set timeout.
| File Size | Recommended Timeout |
|---|---|
| < 50MB | 120 seconds (2 min) |
| 50-200MB | 300 seconds (5 min) |
| 200-500MB | 600 seconds (10 min) |
| 500MB-1GB | 1200 seconds (20 min) |
| > 1GB | 1800 seconds (30 min) or more |
1. Download interrupted
# Re-run same command, curl -C - will resume automatically
curl -L -C - --progress-bar -o file.zip <URL>
2. Permission denied
# Ensure destination directory is writable
mkdir -p ~/Downloads
3. Redirect failed
# Use -L flag to follow redirects
curl -L -o file.zip <URL>
4. Network timeout
# Increase timeout or use --retry
curl -L --retry 3 --connect-timeout 30 -o file.zip <URL>
If aria2 is available, use multi-threading for faster downloads:
exec(
command="aria2c -x 16 -s 16 -k 1M --continue -o ~/Downloads/file.zip <URL>",
background=true,
timeout=600
)
# 1. Start download
exec(command="curl -L -C - --progress-bar -o ~/Downloads/file.zip <URL>", background=true, timeout=600)
# 2. Poll every 30 seconds
process(action="poll", sessionId="xxx")
# 3. Verify after completion
exec(command="ls -lh ~/Downloads/file.zip")
# 4. Optional: Calculate checksum
exec(command="md5sum ~/Downloads/file.zip")
file command to verifyfeishu-send-file - Send downloaded file to Feishufile-read - Read downloaded file contentvideo-frames - Extract frames if video fileIf download fails, follow these steps:
Check network connectivity
curl -I <URL>
Check disk space
df -h ~/Downloads
View detailed error
curl -v -o /dev/null <URL>
Try alternative tool
wget --continue <URL>
Remember: Always use background=true for large file downloads! 🎯