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.Query the list of all agents (employees) available to the current user. Use when generating code that requires a real agentId, or when the user asks "which agents/employees do I have".
|
Migrate existing antd-style CSS-in-JS (createStyles) components to Tailwind CSS utility classes with full dark mode support, following the project's style system transition strategy. Use when the user asks to migrate, convert, or rewrite antd-style components to Tailwind, or when working on new components in files that already use antd-style.
Open and operate webpages in a real browser: navigate, read rendered content, inspect interactive elements, click, type, submit forms, press keys, select options, check boxes, hover, scroll, upload files, wait for page changes, manage pages, take and save screenshots, analyze visual layout, and inspect page errors and network activity.
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.
Use when details may have been lost after context compaction, or when the Agent needs to inspect earlier compacted messages or previously created sub-agents.
Manage persistence for user-installed third-party CLI tools in the Super Magic sandbox. Use when the user wants to install, configure, adopt, restore, inspect, or remove a CLI, or when an external skill, webpage, or installer asks to run CLI install commands such as curl|sh, npm install -g, pipx install, uv tool install, go install, cargo install, or brew install. Do not persist runtime-provided CLIs.
Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, and proposes actionable improvements.