Magika is Google's AI-powered file type detector for fast, content-based identification of binary and text files. It is useful when an agent needs safer routing, validation, triage, or downstream policy decisions based on the real file contents instead of just filenames or MIME headers.
Scanned 6/8/2026
Install via CLI
openskills install agentskillexchange/skills---
name: "Magika AI File Type Detection and Content Classification"
slug: "magika-ai-file-type-detection-and-content-classification"
description: "Magika is Google's AI-powered file type detector for fast, content-based identification of binary and text files. It is useful when an agent needs safer routing, validation, triage, or downstream policy decisions based on the real file contents instead of just filenames or MIME headers."
github_stars: 10199
verification: "security_reviewed"
source: "https://github.com/google/magika"
category: "Security & Verification"
framework: "Multi-Framework"
tool_ecosystem:
github_repo: "google/magika"
github_stars: 10199
npm_package: "magika"
npm_weekly_downloads: 4630
---
# Magika AI File Type Detection and Content Classification
Magika is Google's AI-powered file type detector for fast, content-based identification of binary and text files. It is useful when an agent needs safer routing, validation, triage, or downstream policy decisions based on the real file contents instead of just filenames or MIME headers.
## Installation
Use the upstream install or setup path that matches your environment:
- pipx install magika
- brew install magika
- cargo install --locked magika-cli
- pip install magika
Requirements and caveats from upstream:
- [](https://pypi.python.org/pypi/magika)
- [](https://pypi.python.org/pypi/magika)
- [](https://pypi.python.org/pypi/magika)
Basic usage or getting-started notes:
- Here is an example of what Magika command line output looks like:
- Magika is used at scale to help improve Google users' safety by routing Gmail, Drive, and Safe Browsing files to the proper security and content policy scanners, processing hundreds billions samples on a weekly basis....
- After the model is loaded (which is a one-off overhead), the inference time is about 5ms per file, even when run on a single CPU.
- Source: https://github.com/google/magika
- Extracted from upstream docs: https://raw.githubusercontent.com/google/magika/HEAD/README.md
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/magika-ai-file-type-detection-and-content-classification/)
No comments yet. Be the first to comment!