Saltar al contenido
Skillpedia
Pruebas101 mil · #1150

export-download-debugging

Qué hace

Esta herramienta te ayuda a averiguar por qué no funcionó un archivo que intentaste descargar o exportar. Comprueba si el archivo se creó correctamente antes de intentar guardarlo, especialmente en el caso de las imágenes.

Cuándo usarla

  • ✓Cuando una descarga o exportación parece funcionar, pero el archivo queda vacío.
  • ✓Si un archivo de imagen descargado no se abre o está dañado.
  • ✓Cuando tienes problemas con la función 'Guardar como' de un navegador o una app.

Link de la skill

https://github.com/nexu-io/open-design/blob/main/skills/export-download-debugging/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/nexu-io/open-design/blob/main/skills/export-download-debugging/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Mi imagen exportada sale como un archivo de 0 KB, ¿me ayudas a solucionarlo?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Primero comprueba si los datos del archivo se generaron correctamente. Si es así, intenta usar un método más sencillo y fiable para guardar el archivo, evitando los problemas habituales que generan archivos vacíos.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

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.
Preguntas frecuentes

¿Por qué queda vacío el archivo?

Suele pasar porque el sistema creó el archivo en tu ordenador, pero la escritura de los datos falló o se bloqueó antes de terminar.

¿Qué es un 'payload'?

Un 'payload' es la información o los datos que intentas exportar o descargar, como los píxeles de una imagen o el contenido de un documento.

¿Qué son las 'URL de Blob/Data'?

Son formas de representar datos (como imágenes) directamente en el navegador sin necesidad de un archivo aparte. La herramienta comprueba que funcionen correctamente.

Detalles

Descripción original del autor

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.

repo: nexu-io/open-design

Popularidad

Estrellas en GitHub
101 mil
Posición en el ranking
#1150
Licencia
Apache-2.0
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas