Download a file from a given URL and save it to a specified local path. Supports any file type accessible via HTTP/HTTPS.
✅ USE this skill when:
❌ DON'T use this skill when:
ParameterTypeRequiredDescriptionurlstringYesThe URL of the file to downloadsave_pathstringNoLocal path to save the file (defaults to current directory with original filename)
bash
python3 scripts/download.py --url 'https://example.com/file.png'
bash
python3 scripts/download.py --url 'https://example.com/file.png' --save_path './downloads/image.png'
"Help me download this image."
bash
python3 scripts/download.py --url 'https://example.com/photo.jpg'
"Download this PDF and save it to the reports folder."
bash
python3 scripts/download.py --url 'https://example.com/report.pdf' --save_path './reports/report.pdf'
Script outputs JSON to stdout:
code = 0 — success, data contains the local file path where the file was savedcode != 0 — error, show message to the user and suggest retryingjson
{
"code": 0,
"message": "success",
"data": "./downloads/file.png"
}
requests package: pip install requests