From cloud-storage-tools
Use this skill for MEGA cloud storage, encrypted file management, and workflows involving file organization, sharing, search, sync, backup, bulk transfer to/from MEGA, or MEGA automation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cloud-storage-tools:mega-cmdThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
MEGA CMD is a CLI for [MEGA cloud storage](https://mega.io/cmd).
MEGA CMD is a CLI for MEGA cloud storage.
All mega-* commands operate on cloud paths rooted at /, not local files.
-f flag skips confirmations. Only mega-export and mega-rm accept -f. No other command does../), not /tmp. The working directory persists; /tmp may not be accessible.mega-whoami # Check logged-in account
mega-df -h # Show storage usage (human-readable)
Exit codes: 0 = logged in, 57 = not logged in
mega-find /path --pattern="*.pdf" # Find by pattern
mega-find / --pattern="*.pdf" --mtime=-30d -l # Recent files with timestamps
mega-find / --pattern="*.jpg" -l # List with details
Multi-extension searches: When searching for a file category (e.g., "JPEG images"), search all relevant extensions:
mega-find / --pattern="*.jpg" # Find JPEGs
mega-find / --pattern="*.jpeg" # AND JPEGs with alternate extension
mega-ls /path # List files in folder
mega-ls -l /path # Long format (name, size, date)
mega-ls -l / # List root folder with details
mega-mkdir -p /path/to/folder # Create folder with parents (like mkdir -p)
mega-mkdir /Invoices/2025 # Create specific folder structure
mega-mv /source/file.pdf /destination/ # Move file
mega-mv /Old\ Folder /New\ Folder # Rename folder (escape spaces)
mega-cp /source/file.pdf /destination/ # Copy file
mega-put ./local-file.pdf /remote/path/ # Upload single file
mega-put -c ./local-folder/ /remote/destination/ # Upload folder recursively
Best practice for bulk uploads: Organize files locally first, then upload the folder once with mega-put -c; this is faster and cleaner than per-file uploads.
Example workflow:
# 1. Organize locally
mkdir ./invoices-to-upload
cp ~/Downloads/invoice*.pdf ./invoices-to-upload/
# 2. Upload entire folder
mega-put -c ./invoices-to-upload/ /Invoices/2025/
# Creates: /Invoices/2025/invoices-to-upload/invoice1.pdf, invoice2.pdf, ...
mega-get /remote/file.pdf ./local/destination/ # Download file
mega-get /remote/folder ./local/ # Download folder recursively
mega-export -a -f /path/to/file.pdf # Create public link (no expiry)
mega-export -a -f /path/to/folder/ # Create link to folder
mega-export -d /path/to/file # Remove public link
Output: A https://mega.nz/file/... link anyone can access.
Pro account features (not available on free accounts):
mega-share -a [email protected] /path/folder # Share folder (read-only)
mega-share /path # List current shares
mega-export /path # Check if path has public link
mega-rm -r -f /path/to/file # Delete file (no prompt)
mega-rm -r -f /path/to/folder/ # Delete folder recursively
⚠️ Warning: Deletion is permanent. No trash/recycle bin. Use with caution.
mega-deleteversions -f --all # Remove all file versions
MEGA keeps version history automatically. This command reclaims space.
mega-thumbnail /remote/photo.jpg ./thumb.jpg # Get thumbnail (~50KB)
mega-get /remote/photo.jpg ./full-size/ # Get full original
Strategy for image workflows: Check thumbnails first, then download only the originals you need to save bandwidth and time.
mega-sync /local/path /remote/path/ # One-way sync (local → remote)
mega-sync /remote/path/ /local/path/ # One-way sync (remote → local)
Sync is one-way: local path first pushes to remote; remote path first pulls locally.
mega-transfers # Show active uploads/downloads
# 1. Find invoices
mega-find / --pattern="*.pdf" --pattern="invoice*"
# 2. Create vendor folders
mega-mkdir /Invoices/2025/Vendor-A
mega-mkdir /Invoices/2025/Vendor-B
# 3. Organize & move
mega-mv /Invoices/scattered/invoice_vendor_a_1.pdf /Invoices/2025/Vendor-A/
mega-mv /Invoices/scattered/invoice_vendor_b_2.pdf /Invoices/2025/Vendor-B/
# 4. Share
mega-export -a -f /Invoices/2025/
# Share the link with accountant
# 1. Organize local folder
cd ~/important-files/
ls
# 2. Upload to MEGA
mega-put -c ./ /Backups/important-files-2025/
# 3. Verify
mega-ls -l /Backups/important-files-2025/
# 1. List files
mega-find /Contracts --pattern="*.pdf" -l
# 2. Download small batch
mega-get /Contracts/2024/ ./contracts-local/
# 3. Process locally
# (e.g., extract text, archive, etc.)
# 4. Clean up if done
mega-rm -r -f /Contracts/2024/
| Exit Code | Meaning | Action |
|---|---|---|
| 0 | Success | Continue |
| 1 | Generic error | Check path/syntax |
| 2 | File not found | Verify path with mega-ls |
| 3 | Access denied | Check permissions |
| 57 | Not logged in | Run mega-login <email> |
mega-ls before destructive operations like mega-rm.mega-ls -l to see timestamps when finding recent files (e.g., --mtime=-7d for last 7 days)./My\ Folder/My\ File.pdfmega-transfers to monitor progress.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub alex-kopylov/zweihander