unzip
Files
SKILL.mdagentsreferencesscripts
Install
Install the containing plugin
/plugin install shared-skills@llm-skills
Invoke this skill after installation
/shared-skills:unzip
This skill is bundled inside shared-skills. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-shared-skills.
SKILL.md
name: unzip description: Extract and test ZIP archives safely with destination validation and path traversal protection. Use when the agent needs to list archive contents, test integrity, or extract files with explicit overwrite policies.
unzip
Extract and inspect ZIP archives with safety checks and destination control.
Quick Start
- Verify
unzipis available:unzip -horman unzip - Establish the command surface:
man unziporunzip -h - Start with list-only operation:
unzip -l archive.zip
Intent Router
Load only the reference file needed for the active request.
references/install-and-setup.md— Installing unzip on macOS, Linux, Windowsreferences/cheatsheet.md— Common operations, listing, testing, overwrite policiesreferences/advanced-usage.md— Encryption, path traversal, exclusion patternsreferences/troubleshooting.md— Corruption detection, permission issues, encoding
Core Workflow
- Verify unzip is available:
unzip -h - List archive contents first (safe, read-only):
unzip -l archive.zip - Validate no suspicious paths (../, absolute paths):
unzip -l archive.zip | grep -E '^\s*\.\.|^/' - Test integrity (without extracting):
unzip -t archive.zip - Extract to explicit directory with policy:
unzip archive.zip -d output/ -o
Quick Command Reference
unzip -h # Show help
unzip -l archive.zip # List contents (read-only)
unzip -lv archive.zip # List with details
unzip -t archive.zip # Test integrity (no extraction)
unzip archive.zip -d output/ # Extract to directory
unzip -n archive.zip # Never overwrite existing files
unzip -o archive.zip # Always overwrite
unzip -u archive.zip # Update (extract only newer)
man unzip # Full manual
Safety Notes
| Area | Guardrail |
|---|---|
| Path traversal | Always list before extracting. Reject archives with ../ or absolute paths. Use -d to extract to safe directory. |
| Overwrite policy | Use explicit policy: -n (never), -o (always), -u (update). Don't mix. |
| Encryption | Use interactive password (-P - or just -P). Never pass passwords as plain arguments. |
| Permissions | ZIP may have incorrect permissions. Verify after extraction. Use chmod if needed. |
| Large files | ZIP supports large files (>2GB). Verify disk space before extraction. |
| Symlinks | ZIP info-zip preserves symlinks. Be cautious with untrusted archives. |
Source Policy
- Treat the installed
unzipbehavior andman unzipas runtime truth. - Use upstream info-zip documentation for semantics.
Resource Index
scripts/install.sh— Install unzip on macOS or Linux.scripts/install.ps1— Install unzip on Windows or any platform via PowerShell.