跳到正文
cccskills
免费在 GitHub 公开

export-download-debugging

Diagnose image export and download failures in browsers and Electron. Separate image data preparation from file saving, investigate empty files and blocked writes, and choose a suitable fallback save method.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • Investigating exported images saved as 0 KB files
  • Fixing failures in Save As dialogs and file writes
  • Troubleshooting image downloads in Electron
  • Testing fallback save methods and export error states

包含的文件(1)

  • SKILL.md2.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Create a three-scene video composition in a retro pixel style using a Hyperframes HTML template. Customize titles, labels, and colors while preserving scene transitions, short scene durations, and repeatable animation timing.

中文简介正在准备中。当前显示英语简介。

  • Create a retro pixel presentation video
  • Customize a three-scene video template
  • Preview scene transitions and motion in HTML
nexu-io/open-design10.2万2026年10月19日 更新

Create and revise headlines, descriptions, and main text for paid social and search ads. Use it to develop ad copy options and refine wording through repeated rounds of revision.

中文简介正在准备中。当前显示英语简介。

  • Drafting headlines for paid social ads
  • Creating descriptions for search ads
  • Revising the main text of an ad
nexu-io/open-design10.2万2026年10月19日 更新

Create a three-page editorial motion sequence with dark backgrounds, serif typography, staged text reveals, and chapter transitions. The result is a single HTML file suited to fashion-inspired storytelling and short visual presentations.

中文简介正在准备中。当前显示英语简介。

  • Creating a fashion-inspired motion presentation
  • Presenting a short story across three pages
  • Applying existing brand rules to a dark editorial sequence
nexu-io/open-design10.2万2026年10月19日 更新

Inspect and test web pages through a browser automation command-line tool. Navigate, click, enter text, capture screenshots, and extract page details, with a focus on checking local OpenDesign previews and reviewing web app quality.

中文简介正在准备中。当前显示英语简介。

  • Checking local OpenDesign previews
  • Testing clicks and text entry in web apps
  • Capturing page or element screenshots
nexu-io/open-design10.2万2026年10月19日 更新

Plan an AI music album from its concept through lyric drafts, track order, and export. Intended for independent album experiments and brand soundtracks, with the full production workflow provided through a separately installed upstream bundle.

中文简介正在准备中。当前显示英语简介。

  • Planning an experimental independent album
  • Drafting lyrics around an album concept
  • Deciding the running order of tracks
nexu-io/open-design10.2万2026年10月19日 更新

Create generative art, or images made with programmed rules, using p5.js. Fixed random seeds make each rendering reproducible, supporting procedural posters, still images that suggest motion, and studies of artistic frame composition.

中文简介正在准备中。当前显示英语简介。

  • Posters generated with programmed rules
  • Still images that suggest motion
  • Studies of artistic frame composition
nexu-io/open-design10.2万2026年10月19日 更新

查看 nexu-io 的全部技能

报告此技能的问题