← 返回 Skills 市场
moony320

Download File

作者 moony320 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
445
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install download-file
功能描述
Download large files from HTTP/HTTPS URLs with resume support, progress monitoring, and timeout handling
使用说明 (SKILL.md)

📥 Large File Downloader

When to Use

Use this skill when downloading files from HTTP/HTTPS URLs, especially large files (>100MB).

Typical scenarios:

  • Downloading software installers (DMG, EXE, ZIP)
  • Downloading large datasets
  • Downloading video/audio files
  • Downloading documents/PDFs
  • Any file download from URL

Trigger keywords:

  • "download this file"
  • "save this DMG"
  • "download from this URL"
  • "get this file"
  • "帮我下载 xxx" (Chinese)

Core Principles

⚠️ Must-Follow Best Practices

  1. Always use background execution - Never run large downloads synchronously
  2. Always set timeout - Configure reasonable timeout based on file size
  3. Always support resume - Use curl -C - for resumable downloads
  4. Always show progress - Use --progress-bar flag
  5. Always verify results - Check file size after download completes

Standard Process

Step 1: Start Download (Background Mode)

exec(
  command="curl -L -C - --progress-bar -o \x3Cdestination_path> \x3CURL>",
  background=true,
  timeout=600
)

Parameter explanation:

  • -L - Follow redirects
  • -C - - Resume partial download
  • --progress-bar - Show progress bar
  • -o - Output file path
  • background=true - Critical! Run in background to avoid timeout
  • timeout=600 - 10 minutes timeout (adjust based on file size)

Step 2: Monitor Progress

process(action="poll", sessionId="\x3Csession_id>")

Poll periodically to check download progress until completion.

Step 3: Verify Result

exec(command="ls -lh \x3Cfile_path>")

Check:

  • File exists
  • File size is reasonable
  • File is complete (compare MD5/SHA if available)

Complete Examples

Example 1: Download DMG File (215MB)

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"
}

Example 2: Download Small File (\x3C50MB)

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.


Timeout Reference

File Size Recommended Timeout
\x3C 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

Error Handling

Common Errors & Solutions

1. Download interrupted

# Re-run same command, curl -C - will resume automatically
curl -L -C - --progress-bar -o file.zip \x3CURL>

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 \x3CURL>

4. Network timeout

# Increase timeout or use --retry
curl -L --retry 3 --connect-timeout 30 -o file.zip \x3CURL>

Advanced Options

Multi-threaded Download (aria2)

If aria2 is available, use multi-threading for faster downloads:

exec(
  command="aria2c -x 16 -s 16 -k 1M --continue -o ~/Downloads/file.zip \x3CURL>",
  background=true,
  timeout=600
)

Full Flow with Progress Monitoring

# 1. Start download
exec(command="curl -L -C - --progress-bar -o ~/Downloads/file.zip \x3CURL>", 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")

Security Considerations

  1. Download from trusted sources only - Verify URL origin
  2. Check file type - Use file command to verify
  3. Scan for viruses - If needed, scan after download
  4. Don't overwrite important files - Check if destination exists

Related Skills

  • feishu-send-file - Send downloaded file to Feishu
  • file-read - Read downloaded file content
  • video-frames - Extract frames if video file

Troubleshooting

If download fails, follow these steps:

  1. Check network connectivity

    curl -I \x3CURL>
    
  2. Check disk space

    df -h ~/Downloads
    
  3. View detailed error

    curl -v -o /dev/null \x3CURL>
    
  4. Try alternative tool

    wget --continue \x3CURL>
    

Remember: Always use background=true for large file downloads! 🎯

安全使用建议
This skill appears to do exactly what it says — run curl (or aria2) to download files with resume and progress. Before installing: ensure you trust the agent and the URLs it will be asked to fetch (downloading arbitrary URLs can introduce malware), confirm curl/aria2 and any sandboxing/policy for exec are acceptable, and be aware large downloads consume disk and bandwidth. If you want tighter controls, ask for domain whitelisting, size limits, or require explicit user confirmation before each download.
功能分析
Type: OpenClaw Skill Name: download-file Version: 1.0.1 The skill provides standard instructions for an AI agent to download files using 'curl' or 'aria2c', featuring support for background execution, resuming interrupted downloads, and progress monitoring. It includes appropriate security considerations such as verifying URL origins and checking file types, and shows no signs of malicious intent, data exfiltration, or prompt injection (Files: SKILL.md, _meta.json).
能力评估
Purpose & Capability
Name/description match the instructions: the SKILL.md describes using curl (and optionally aria2) to download files, resume, show progress, and verify results. The only required binary is curl, which is appropriate and proportional.
Instruction Scope
Runtime instructions are narrowly focused on download-related actions (curl/aria2, polling sessions, ls/file/md5sum) and error handling. The guide does not instruct reading unrelated files, environment variables, or sending data to external endpoints other than the download URLs themselves.
Install Mechanism
No install spec or external downloads are defined; this is an instruction-only skill that expects curl to be available. That is the lowest-risk install profile.
Credentials
The skill requests no environment variables, credentials, or config paths. All required resources (curl, optional aria2) are reasonable and directly related to the stated functionality.
Persistence & Privilege
always is false and there are no elevated privilege requests. The skill assumes the agent can execute shell commands and poll background sessions (normal for an exec-capable agent). If you are concerned about autonomous downloads, consider limiting agent invocation scope or monitoring background processes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install download-file
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /download-file 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- SKILL.md fully updated with English documentation; original Chinese instructions replaced and scenario descriptions are now in English. - Examples, best practices, and error handling rewritten for clarity and international audience. - File download command explanations and usage flows clarified; trigger keywords listed in both English and Chinese. - Security section, troubleshooting steps, and recommended timeouts all revised and reworded. - Recommended to always use `background=true` for large files emphasized for reliability.
v1.0.0
- Initial release of the "download-file" skill. - Enables downloading large files from HTTP/HTTPS URLs to local storage. - Supports resume (断点续传), progress monitoring, and configurable timeouts. - Implements best practices: always runs downloads in the background, uses curl with -C - and --progress-bar, and verifies the downloaded file. - Provides error handling guidance, advanced options (e.g. aria2 multi-threading), and troubleshooting steps. - Requires curl as a dependency.
元数据
Slug download-file
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Download File 是什么?

Download large files from HTTP/HTTPS URLs with resume support, progress monitoring, and timeout handling. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 445 次。

如何安装 Download File?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install download-file」即可一键安装,无需额外配置。

Download File 是免费的吗?

是的,Download File 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Download File 支持哪些平台?

Download File 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Download File?

由 moony320(@moony320)开发并维护,当前版本 v1.0.1。

💬 留言讨论