extract-archive

Detect archive extensions and run the correct extraction command.

1|Updated Jan 27, 2015
One-click install
npx skills add https://github.com/Numkil/dotfiles --skill extract-archive
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-archive
Source: https://github.com/Numkil/dotfiles/tree/main/pi/agent/skills/extract-archive
Command: npx skills add https://github.com/Numkil/dotfiles --skill extract-archive

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates extracting archive files by detecting their extension and invoking the correct extraction command.

Core Features & Use Cases

  • Detects common archive formats (tar.gz, gz, tar, zip, rar, 7z, etc.) and runs the appropriate extraction command.
  • Supports extracting to a specific directory with -C for tar commands, -d for unzip, or by changing directory before execution.
  • Use Case: Unpack a downloaded archive.zip into your projects folder to begin development.

Quick Start

Provide an archive file path and let the skill extract it using the proper command.

Frequently Asked Questions about extract-archive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract tar.gz, zip, and 7z archives automatically without remembering the exact bash commands?

To extract archives automatically, this tool detects the file extension case-insensitively and invokes the correct extraction command for formats like tar.gz, zip, and 7z. It checks file existence and applies proper flags like -C for tar or -d for unzip to unpack files safely.

Can I extract a downloaded zip file into a specific directory during my build workflow?

Yes, you can extract archives into a specific directory during build workflows. The tool applies the appropriate directory flag, such as -d for unzip or -C for tar, or changes the execution directory before running the extraction command to place files correctly.

What happens if I try to extract an unsupported archive format?

When extracting an unsupported archive format, the tool provides proper messaging indicating the format is not supported. It performs case-insensitive extension matching to identify known formats and safely handles unknown extensions without executing arbitrary commands.

What is the best way to automate unpacking various archive files across download and build environments?

The best way to automate unpacking archives across download and build environments is using a detection script that matches file extensions case-insensitively. This approach safely identifies formats like rar, tar, and gz, then executes the correct extraction command without manual intervention.

Does this archive extraction tool require any external dependencies to handle formats like rar and 7z?

This archive extraction tool requires no explicit dependencies to function. However, the underlying system environment must have the standard command-line utilities installed for the specific formats you intend to extract, such as unrar for rar files or 7z for 7z archives.