detect-file-type-local
SKILL.md
Detect File Type - Local
Local-only, offline file type detection. Uses an embedded ML model (Google Magika) to identify 214 file types by content — no network calls, no API keys, no data leaves the machine. All inference runs on-device via ONNX Runtime.
When to Use
- Identify unknown files by their content (not just extension) — locally, without sending data anywhere
- Verify that a file's extension matches its actual content
- Check MIME types before processing uploads or downloads
- Triage files in a directory by type
- Detect extension mismatches and masquerading (e.g.,
.pdf.exe,.xlsx.lnk) - Flag suspicious polyglot-style payloads (for example PDF/ZIP or PDF/HTA-style chains)
- When privacy matters — file bytes never leave the local machine
Installation
pip install detect-file-type-local