export

Writes deliverable files to persistent workspace storage and generates permanent download links for users.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/astralform-ai/skills --skill export-astralform-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: export
Source: https://github.com/astralform-ai/skills/tree/main/skills/export
Command: npx skills add https://github.com/astralform-ai/skills --skill export-astralform-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Files written directly to the sandbox's network-mounted workspace can appear complete in the shell yet be unreadable through the platform, causing exports to fail silently or links to die. This Skill ensures deliverables like reports, HTML pages, images, and archives are written correctly and handed to the user as permanent, working download links. ## Core Features & Use Cases - Correct File Writing: Enforces writing deliverables with capsule.fs.write_file instead of shell redirection or Python open(), avoiding the mount-incoherency failure where a file looks fine but exports as empty. - Permanent Link Delivery: Uses the export_file tool to produce a persistent, authenticated download link that appears in the conversation's files list and survives page refreshes. - Failure Diagnosis: Distinguishes between retryable "still saving" errors, terminal storage failures, and missing-file errors, with a specific recovery action for each. - Use Case: After generating a Q3 report as HTML, write it to /workspace/outputs/ with capsule.fs.write_file, call export_file with a display name, and hand the user the returned permanent link. ## Quick Start Write my report to /workspace/outputs/ using capsule.fs.write_file and then export it with the export_file tool so I get a permanent download link.

Frequently Asked Questions about export

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

FAQPage Schema
How do I export a file from the sandbox so the user can download it?

Write the file to /workspace/outputs/ using capsule.fs.write_file, then call the export_file tool with the path and a display name. It returns a permanent authenticated link that also appears in the conversation's files list.

Why does my exported file show as empty even though it exists in the shell?

This is the mount-incoherency signature: files written with shell redirection or Python open() can look complete to wc and md5sum but read as a few bytes through the platform. Rewrite the file with capsule.fs.write_file and export again.

What is the difference between export_file, capsule_download_url, and capsule_get_url?

export_file delivers files under /workspace/outputs/ with a display name, while capsule_download_url gives the same permanent link for files elsewhere. capsule_get_url maps a live sandbox port and dies when the VM is reclaimed, so never hand it to users.

Can I call capsule.export_file() from inside capsule_run_code?

No. export_file is a backend tool, not a capsule library function, so calling it from sandbox code raises AttributeError. Invoke export_file directly as a tool in its own response.

What should I do when export_file says the file could not be saved to storage?

That message is terminal for the file, so do not retry or substitute a capsule_get_url link. Tell the user the file could not be delivered, and if it is small, include the content directly in your reply.

Can I host a website using the export link?

No. The export link is an authenticated download link for the user, not public hosting. You can deliver the file and its link, but you cannot make a page live or publicly accessible.