unzip
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
pwdto 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 thepwdoutput 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.