Skip to content

fix: install skills without curl/unzip for Windows compatibility#599

Open
gewenyu99 wants to merge 1 commit into
mainfrom
fix/windows-skill-unzip
Open

fix: install skills without curl/unzip for Windows compatibility#599
gewenyu99 wants to merge 1 commit into
mainfrom
fix/windows-skill-unzip

Conversation

@gewenyu99

@gewenyu99 gewenyu99 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

Skill installation does not work on Windows. downloadSkill shells out to two external binaries:

execFileSync('curl', ['-sL', url, '-o', tmpFile])
execFileSync('unzip', ['-o', tmpFile, '-d', skillDir])

Windows ships curl.exe, but it has no unzip binary, so extraction throws and the skill never lands.

This is the same Windows breakage discussed on #410 (Matt's review). #417 fixed where the temp zip is written (os.tmpdir() instead of a hardcoded /tmp), but that only addressed the path — the unzip call one line later still fails on Windows, so skills still don't install there.

Changes

Drop both external-binary dependencies in downloadSkill (src/lib/wizard-tools.ts):

  • Download the zip into memory with axios (already a dependency, used in api.ts / posthog-doctor) instead of curl.
  • Extract in-process with fflate (pure-JS, no native deps) via a new extractZipTo helper, with a zip-slip guard that rejects archive entries escaping the destination before any write.
  • No temp file anymore → removed the now-dead skillTmpPath from paths.ts. This also moots the temp-file collision/cleanup concern raised on feat: messages to the heavens #410.
  • downloadSkill is now async; updated all three call sites (installSkillById, the install_skill MCP handler, and HealthCheckScreen).

Net effect: one 8KB pure-JS dependency added, two process spawns (curl + unzip) removed.

Test plan

  • New unit tests in wizard-tools.test.ts for extractZipTo: nested-file extraction and zip-slip rejection.
  • pnpm build, pnpm typecheck, and pnpm lint pass (0 errors).
  • Full wizard-tools suite green (20 tests).

downloadSkill shelled out to `curl` and `unzip`. `unzip` is not available
on Windows, so skill installation failed there even after #417 fixed the
temp-file path. Download the zip in-memory via axios and extract it
in-process with fflate, guarding against zip-slip. Removes the temp file
entirely (no skillTmpPath) and makes downloadSkill async.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gewenyu99 gewenyu99 requested a review from a team June 8, 2026 14:43
@gewenyu99 gewenyu99 marked this pull request as ready for review June 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants