본문으로 건너뛰기
Skillpedia
테스트101k · #1150

export-download-debugging

하는 일

이 도구는 다운로드하거나 내보내려던 파일이 왜 제대로 되지 않았는지 알아내도록 돕습니다. 저장을 시도하기 전에 파일이 올바르게 만들어졌는지 확인하며, 특히 이미지에 유용합니다.

사용하는 경우

  • ✓다운로드나 내보내기가 되는 것처럼 보이지만 파일이 비어 있을 때.
  • ✓다운로드한 이미지 파일이 열리지 않거나 손상되었을 때.
  • ✓브라우저나 앱의 ‘다른 이름으로 저장’ 기능에 문제가 있을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/skills/export-download-debugging/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내보낸 이미지가 0KB 파일로 나오는데, 고칠 수 있게 도와주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 먼저 파일의 데이터가 올바르게 생성되었는지 확인합니다. 올바르다면 더 단순하고 안정적인 방법으로 파일을 저장해서, 빈 파일을 만드는 흔한 문제를 피합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
자주 묻는 질문

파일이 왜 비어 있나요?

시스템이 컴퓨터에 파일을 만들었지만, 실제 데이터를 쓰는 과정이 끝나기 전에 실패하거나 차단되었을 때 자주 발생합니다.

‘페이로드’란 무엇인가요?

이미지의 픽셀이나 문서의 내용처럼, 내보내거나 다운로드하려는 정보와 데이터입니다.

‘Blob/Data URL’이란 무엇인가요?

데이터(예: 이미지)를 별도의 파일 없이 브라우저에서 직접 표현하는 방법입니다. 도구는 이것이 제대로 작동하는지 확인합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
101k
순위
#1150
라이선스
Apache-2.0
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬