home / skills / aidotnet / moyucode / file-archiver
This skill creates and extracts ZIP, TAR, and GZIP archives with optional password protection to manage compressed files efficiently.
npx playbooks add skill aidotnet/moyucode --skill file-archiverReview the files below or copy the command above to add this skill to your agents.
---
name: file-archiver
description: 创建和解压ZIP、TAR和GZIP压缩包,支持密码保护。
metadata:
short-description: 创建和解压压缩包
source:
repository: https://docs.python.org/3/library/zipfile.html
license: PSF
---
# File Archiver Tool
## Description
Create and extract compressed archives (ZIP, TAR, GZIP) with optional password protection.
## Trigger
- `/archive` command
- User requests file compression
- User needs to extract archives
## Usage
```bash
# Create ZIP archive
python scripts/file_archiver.py create --input folder/ --output archive.zip
# Extract archive
python scripts/file_archiver.py extract --input archive.zip --output extracted/
# Create with password
python scripts/file_archiver.py create --input folder/ --output secure.zip --password secret123
# List archive contents
python scripts/file_archiver.py list --input archive.zip
```
## Tags
`zip`, `archive`, `compress`, `extract`, `tar`
## Compatibility
- Codex: ✅
- Claude Code: ✅
This skill creates and extracts ZIP, TAR, and GZIP archives with optional password protection. It provides command-style operations to compress folders and files, list archive contents, and securely produce encrypted ZIP files for transport or backup. The implementation is concise and suitable for automation or integration into workflows.
You invoke commands to create, extract, or list archives. The tool reads files and directories, selects the requested archive format (ZIP, TAR, or GZIP), applies optional password-based encryption for ZIP outputs, and writes the resulting archive to the target path. For extraction it detects the format, validates passwords when required, and restores files to the specified output folder.
Which formats support password protection?
Password protection is supported for ZIP archives. TAR and GZIP do not provide built-in password encryption.
Can I preserve file permissions and ownership?
Yes. Use TAR or TAR.GZ to preserve Unix permissions, ownership, and symbolic links. ZIP preserves basic attributes but may not retain all metadata across platforms.
How do I handle large archives in automation?
Stream creation and extraction where possible, split large archives if needed, and verify available disk space before extracting to avoid failures.