File Download

Trigger browser downloads from app filesystem paths, in-memory content, or external URLs.

1.4k|316|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/agent0ai/space-agent --skill file-download-agent0ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: File Download
Source: https://github.com/agent0ai/space-agent/tree/main/app/L0/_all/mod/_core/admin/ext/skills/file-download
Command: npx skills add https://github.com/agent0ai/space-agent --skill file-download-agent0ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of reliably triggering browser downloads for files coming from your app, dynamically generated content, or external URLs, without running into filesystem access issues or CORS limitations.

Core Features & Use Cases

  • Authenticated app filesystem downloads: Serves user- and permission-scoped files via layer paths (including the ~/ home mapping).
  • Runtime-generated downloads: Converts in-memory text, JSON, CSV, and binary data into downloadable files using Blob + object URLs.
  • External URL downloads (CORS-safe option): Uses the server proxy to fetch remote files and then downloads them in the browser.

Quick Start

Ask the AI to download the file from the authenticated app layer path "/L2/<username>/exports/summary.csv" as "summary.csv".

Frequently Asked Questions about File Download

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trigger a browser download for a dynamically generated CSV file?

Trigger a CSV file download by converting in-memory text or JSON data into a Blob, generating an object URL, and prompting the browser to save it. This method bypasses filesystem access issues for runtime-generated content.

Can I download files from authenticated app filesystem paths without exposing them publicly?

Yes, you can download files from authenticated app filesystem paths securely. The Skill builds a cookie-authenticated URL to serve user- and permission-scoped files, including layer paths like the ~/ home mapping, without public exposure.

What's the best way to download external files when facing CORS limitations?

To download external files despite CORS limitations, route the remote fetch through a server proxy. The proxy retrieves the remote document safely, and then the browser downloads the file from the proxied response.

Does this file download method work for admin workflows like exporting reports?

Yes, this file download method is built for admin workflows like exporting reports, downloading generated datasets, and retrieving remote documents. It respects permissions and handles authenticated app paths, in-memory Blobs, and external URLs.

Why do my in-memory binary file downloads fail in the browser?

In-memory binary file downloads fail when not properly converted into a Blob. You must convert the binary data into a Blob and create an object URL to reliably trigger the browser download without filesystem access errors.

Do I need a server proxy to download files from external URLs?

You only need a server proxy to download files from external URLs if you encounter CORS constraints. The proxy provides a CORS-safe option by fetching the remote file server-side before triggering the browser download.