nexu-io/open-design

export-download-debugging

Diagnose and fix browser, preview, or Electron export/download failures, especially image export issues involving Save As, Blob/Data URLs, the File System Access API, createWritable failures, and 0 KB files.

75CollectingNetwork access
See how to use itView GitHub source
npx skills add https://github.com/nexu-io/open-design --skill "skills/export-download-debugging"
Automated source guideDevelopmentStandard source

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Source-grounded implementation guide: export-download-debugging

Use this when an export or download appears to run but produces an empty, missing, or unusable file. It is tuned for browser previews, iframe capture, and Electron shells.

npx skills add https://github.com/nexu-io/open-design --skill "skills/export-download-debugging"
Check the pinned source

The pinned source supports a structured brief, but not an expanded tutorial. Only detected inputs, outputs, and sections are shown.

354 source words · 4 usable sections

Implementation workflow

Read export-download-debugging through these 4 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

Core rule

Separate capture from save. Prove the export payload has non-zero bytes before debugging the destination path. A 0 KB file often means the native picker or host created the target file, then the write failed or was blocked.

SKILL.md · Core rule
Separate capture from save. Prove the export payload has non-zero bytes before debugging the destination path. A 0 KB file often means the native picker or host created the target file, then the write failed or was bloc…
02

Evidence

Record the payload type, MIME type, byte length, object URL or data URL path,

SKILL.md · Evidence
Record the payload type, MIME type, byte length, object URL or data URL path,Check browser console output and app logs around showSaveFilePicker,In Electron, inspect the will-download path: filename, MIME, file extension,
03

Fix order

1. Prepare and validate the export payload first; disable Save until bytes are available. 2. Prefer the simplest stable save channel for the host. If showSaveFilePicker().createWritable() fails, is sandboxed, or creates empty files, route to or Electron's download manager instea…

SKILL.md · Fix order
Prepare and validate the export payload first; disable Save until bytes arePrefer the simplest stable save channel for the host. IfAvoid opening a native picker before the payload is ready. This prevents the
04

Validation

Add or update tests for non-empty payload preparation, fallback save behavior,

SKILL.md · Validation
Add or update tests for non-empty payload preparation, fallback save behavior,Run focused export tests, then pnpm --filter @open-design/web typecheck.If Electron download handling changed, also run

Development checklist

Verify each item before delivery

The source section “Core rule” has been checked.

The source section “Evidence” has been checked.

The source section “Fix order” has been checked.

The source section “Validation” has been checked.

Static permission evidence

Inspect the exact source lines that triggered a signal

These are source excerpts matched by deterministic rules, not findings of malicious behavior, safety, or actual execution.

Choose a different workflow

When another Skill is the better fit

FAQ

What does the export-download-debugging source document cover?

Use this when an export or download appears to run but produces an empty, missing, or unusable file. It is tuned for browser previews, iframe capture, and Electron shells.

How do I install export-download-debugging?

The source record exposes this install command: npx skills add https://github.com/nexu-io/open-design --skill "skills/export-download-debugging". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged network in the source; the page lists the matching lines and excerpts.

Repository stars
82,073
Repository forks
9,485
Quality
75/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

75/100
Documentation20/30
Specificity19/25
Maintenance20/20
Trust signals16/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 2 min

Export Download Debugging

Use this when an export or download appears to run but produces an empty, missing, or unusable file. It is tuned for browser previews, iframe capture, and Electron shells.

Core rule

Separate capture from save. Prove the export payload has non-zero bytes before debugging the destination path. A 0 KB file often means the native picker or host created the target file, then the write failed or was blocked.

Evidence

  • Record the payload type, MIME type, byte length, object URL or data URL path, and thrown error name/message.
  • Check browser console output and app logs around showSaveFilePicker, createWritable, <a download>, URL.createObjectURL, and URL revocation.
  • In Electron, inspect the will-download path: filename, MIME, file extension, save dialog filters, cancellation, and final file size.
  • Confirm the actual downloaded file size on disk and whether it opens in a normal image viewer.

Fix order

  1. Prepare and validate the export payload first; disable Save until bytes are available.
  2. Prefer the simplest stable save channel for the host. If showSaveFilePicker().createWritable() fails, is sandboxed, or creates empty files, route to <a download> or Electron's download manager instead.
  3. Avoid opening a native picker before the payload is ready. This prevents the host from creating an empty destination file on later write failure.
  4. For PNG fallback, prefer a verified non-empty data URL when blob URLs, revocation timing, CSP, or iframe sandboxing are suspicious.
  5. In Electron, add explicit Save As filters for exported image extensions (.png, .jpg, .jpeg, .webp) so users can choose a real image target.
  6. Keep the UI restrained: format selection, filename/path hint, clear pending and error states, and one primary save action.

Validation

  • Add or update tests for non-empty payload preparation, fallback save behavior, file extension/MIME mapping, and UI disabled/error states.
  • Run focused export tests, then pnpm --filter @open-design/web typecheck.
  • If Electron download handling changed, also run pnpm --filter @open-design/desktop typecheck.
  • Before landing, run pnpm guard, inspect the staged diff for unrelated files, generated artifacts, and accidental secrets, then use the repository's PR quality-gate workflow if the fix is being prepared for review.
Skill path
skills/export-download-debugging/SKILL.md
Commit SHA
89d6d4ef21ba
Repository license
Apache-2.0
Data collected