download
Use when external HTTP or HTTPS files must be downloaded reliably into the workspace, especially for multiple files, large videos or archives, resumable transfers, custom Referer or Origin headers, or downloads that may take a long time.
git clone --depth 1 https://github.com/dtyq/magic /tmp/download && cp -r /tmp/download/backend/super-magic/agents/skills/download ~/.claude/skills/downloadSKILL.md
# Download
Use `download_from_urls` through Code Mode with `run_sdk_snippet`. Use the same tool for one or multiple files. It handles batch concurrency, progress, retries, transfer timeouts, partial files, and HTTP Range internally.
## Normal Call
Usually pass only `url` and `file_path`:
```python
from sdk.tool import tool
result = tool.call("download_from_urls", {
"downloads": [
{
"url": "https://example.com/media/video.mp4",
"file_path": "media/video.mp4",
},
{
"url": "https://example.com/data/archive.zip",
"file_path": "data/archive.zip",
},
],
})
print(result.content)
```
Always check `result.ok` and read `result.content`. A batch may contain both successful and failed items, so keep the full summary.
## Request Headers
Omit `headers` by default. The download engine automatically sends browser-compatible headers and a same-origin `Referer`. If a first request receives a likely source-validation rejection, it retries once with a same-origin `Origin`.
Provide headers only when the task already supplies a more accurate access context:
```python
result = tool.call("download_from_urls", {
"downloads": [{
"url": "https://cdn.example.com/assets/report.pdf",
"file_path": "reports/report.pdf",
"headers": {
"Referer": "https://www.example.com/reports/latest",
"Origin": "https://www.example.com",
},
}],
})
print(result.content)
```
- Use a full page URL for `Referer` and only its scheme plus host for `Origin`.
- Pass `Cookie` or `Authorization` only when the user explicitly provided the value for this download.
- Never invent credentials or attempt to bypass login, CAPTCHA, WAF, DRM, or access controls.
## Existing Files
`overwrite` defaults to `true` and is normally omitted. Set it to `false` only when the user wants to keep an existing complete target file.
If the requested destination may contain user-authored content and overwrite intent is unclear, call `ask_user` before starting Code Mode. `ask_user` cannot be called from inside a `run_sdk_snippet` script. Do not ask again when the user explicitly requested that destination or requested a replacement download.
## Resume Behavior
On a recoverable failure, repeat the same `url`, `file_path`, and headers. The engine finds the preserved partial state and resumes automatically when the server supports HTTP Range. If the server does not safely support the saved range, the engine restarts that file without appending incompatible bytes.
Do not:
- read or pass internal `.part` or `.part.meta` paths;
- calculate offsets or send `Range` or `If-Range`;
- create resume tokens;
- pass download timeout, retry, concurrency, or chunk-size controls;
- change the destination path when the intent is to resume the same file.
When a failed item reports `next action: retry_same_request`, retry the unchanged item. If it reports `review_request`, inspect the URL, destination, or required access context before retrying.Core canvas design skill covering project management, multimedia principles, AI image generation, web image search, and design marker processing. Load for any canvas design task. CRITICAL - When user message contains [@design_canvas_project:...] or [@design_marker:...] mentions, or when the user wants to generate video/animation/clip on a canvas project, you MUST load this skill first before any operations.
Summarize and compress the current conversation history into a structured context snapshot, then call compact_chat_history to save it. Read this skill only when the user explicitly asks to compact/summarize — system-triggered compaction injects the instructions directly without requiring a skill read.
Slide/PPT creation skill that provides complete slide creation, editing, and management capabilities. Use when users need to create slides, make presentations, edit slide content, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.
|
|
Data analysis dashboard (instrument panel) development skill. Use when users need to develop data dashboards, create/edit Dashboard projects, build large-screen data boards, or perform dashboard data cleaning. Includes dashboard project creation, card plan, data cleaning (data_cleaning.py), card management tools (create_dashboard_cards, update_dashboard_cards, delete_dashboard_cards, query_dashboard_cards), map download tool (download_dashboard_maps), dashboard development, and validation.
Use when the user wants to interact with DingTalk in any way — including but not limited to: reading, querying, searching, sending, replying to, forwarding, or recalling DingTalk chat messages and chat history; managing group chats and conversations; sending DING alerts; querying contacts, org structure, AI search, or coworkers; reading, searching, creating, or editing DingTalk docs, drive files, sheets, AI tables, wiki, mail, calendar events, meeting rooms, AI meeting minutes, attendance, OA approvals, todos, reports/logs, live sessions, AI apps, permissions, or open-platform docs.