export-download-debugging
하는 일
이 도구는 다운로드하거나 내보내려던 파일이 왜 제대로 되지 않았는지 알아내도록 돕습니다. 저장을 시도하기 전에 파일이 올바르게 만들어졌는지 확인하며, 특히 이미지에 유용합니다.
사용하는 경우
- ✓다운로드나 내보내기가 되는 것처럼 보이지만 파일이 비어 있을 때.
- ✓다운로드한 이미지 파일이 열리지 않거나 손상되었을 때.
- ✓브라우저나 앱의 ‘다른 이름으로 저장’ 기능에 문제가 있을 때.
스킬 링크
https://github.com/nexu-io/open-design/blob/main/skills/export-download-debugging/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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-downloadpath: 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
- Prepare and validate the export payload first; disable Save until bytes are available.
- 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. - Avoid opening a native picker before the payload is ready. This prevents the host from creating an empty destination file on later write failure.
- For PNG fallback, prefer a verified non-empty data URL when blob URLs, revocation timing, CSP, or iframe sandboxing are suspicious.
- In Electron, add explicit Save As filters for exported image extensions
(
.png,.jpg,.jpeg,.webp) so users can choose a real image target. - 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.
댓글
- …
이 저장소의 다른 스킬
sample-plugin
101k에이전트가 테스트용 메타데이터 파일을 만들도록 합니다. 코드가 다양한 상황에서 올바르게 작동하도록 돕습니다.
aster-atelier
101k클래식한 느낌의 예술 웹사이트를 만들도록 에이전트를 돕습니다. 우아한 이미지, 푸른 하늘, 세리프 글꼴로 영화 같은 분위기를 냅니다.
audio-jingle
101k징글(jingle)과 효과음 같은 오디오를 에이전트가 생성하도록 합니다. 음악과 음성을 만들고 결과를 오디오 파일로 저장할 수 있습니다.
blog-post
101k긴 기사나 블로그 글을 쓰도록 에이전트를 돕습니다. 이미지, 인용문, 작성자 정보를 넣을 공간이 포함됩니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.