Unzip or extract a zip file in the project. Use when the user says "unzip", "extract zip", "unzip file", or asks to extract a .zip archive. Finds the most recently modified .zip file in the codebase and extracts it to the project root using `npx extract-zip`.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Unzip or extract a zip file in the project. Use when the user says "unzip", "extract zip", "unzip file", or asks to extract a .zip archive. Finds the most recently modified .zip file in the codebase and extracts it to the project root using `npx extract-zip`.
Unzip Skill
When the user asks to unzip (without specifying a file), find the most recently modified .zip file in the project and extract it to the project root.
Steps
Find the zip file: Use Bash (find . -name "*.zip") to locate zip files. Glob may miss files with spaces in the name. Pick the most recently modified one. If multiple are found, tell the user which one you're using.
Get the absolute path: Run pwd to get the project root absolute path (e.g. /root/app/code). Combine it with the filename to form the full path. Do NOT use command substitution ($(...)) — it is blocked by ACL. Instead, read the pwd output from the previous Bash call and construct the path manually as a string literal.
Check if base64-encoded: Run:
file "path/to/file.zip"
If the output says "ASCII text" instead of "Zip archive data", the file is base64-encoded and must be decoded first.
Decode if needed: If base64-encoded, decode it in-place using Node (never use base64 -d — it is blocked by ACL):
Always use absolute paths — npx extract-zip requires the destination to be absolute.
Check if package.json changed: After extraction, read package.json again and compare it to the snapshot from step 5. If the contents differ (or it didn't exist before), install dependencies:
pnpm install --no-frozen-lockfile
If pnpm install fails due to blocked builds, update pnpm-workspace.yaml to set allowBuilds entries to true and retry.
Restart the dev server: If dependencies were installed, use the DevServerRestart tool to restart the dev server.
Report: Tell the user what was extracted, whether deps were reinstalled, and whether the dev server was restarted.
If the user specifies a file or destination
If they give a specific zip path, use that instead of searching.
If they give a destination directory, use that instead of the project root.
Notes
tar is blocked by ACL in this environment — always use npx extract-zip instead.
base64 -d is blocked by ACL — always use the Node one-liner to decode base64-encoded zips.
npx extract-zip does not require a separate install step; npx handles it.
Command substitution ($(...)) is blocked by ACL — never use it. Always get pwd in a separate Bash call first, then hardcode the resulting path as a string literal in subsequent commands.
Glob tool may not find files with spaces in their names — prefer find . -name "*.zip" via Bash.
npx extract-zip requires an absolute path for the destination directory, not a relative ..