Skill files that teach AI agents how to use MEGA CMD — MEGA's CLI for end-to-end encrypted cloud storage. No code, no scripts, no integration work.
One prompt: AI scans Gmail for invoices, organizes them in MEGA by vendor, creates a share link, and emails a summary to your accountant — AI runs on your hardware.
Your data deserves both AI automation and real privacy.
- MEGA provides zero-knowledge encryption — not even MEGA can read your files
- Skill files give the AI agent precise instructions — no code generation, no scripts, no surprises
- Works with any AI agent — local or cloud, your choice
A skill file is a markdown document that describes CLI commands, their syntax, and rules. The AI agent reads it and executes the commands directly.
skills/
├── megacmd.md ← Teaches any AI agent how to use MEGA CMD
└── gws-gmail.md ← Teaches any AI agent how to use Gmail via GWS CLI
Grab a skill file, drop it into your project, and your AI agent can work with MEGA.
git clone https://github.com/meganz/megacmd-ai.git
cd megacmd-aiRun your preferred AI agent and paste any prompt from the examples below.
| Example | What it does | Details |
|---|---|---|
| Gmail → MEGA | Search Gmail for invoices, download PDFs, organize in MEGA by vendor, share with accountant | gmail-invoices.md |
| Find PDF contracts | Search MEGA for PDF contracts, extract counterparties and banking details | find-pdf-contracts.md |
| Find images | Find JPEG images in MEGA matching a criteria, copy to local folder | find-images.md |
| Manage shares | Audit all shared files in MEGA, summarize public links, optionally unshare | manage-shares.md |
| Clean drive | Remove all file version history and report space freed | clean-drive.md |
Every example works by pasting one prompt. The AI reads the skill files and does the rest.
Commands are whitelisted via permission configs (.claude/settings.json, opencode.json):
| Auto-approved | Requires your approval |
|---|---|
mega-ls, mega-find, mega-get, mega-put, mega-export |
mega-rm (delete) |
gws gmail ... list, get, attachments |
mega-deleteversions (remove history) |
jq, base64, tr, cat, ls, mkdir |
gws gmail ... send (email) |
Two layers of protection:
- Soft guardrail — the skill says "only use these commands"
- Hard guardrail — the permissions config blocks everything else
