Use Google Magika for fast ML-based file-type detection from file bytes, not just extensions or MIME. Use when the user needs reliable file identification, suspicious upload triage, content-type validation, malware-prep filtering, or bulk file classification.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add Undermybelt/hermes-skills --skill magika-file-type-dtctn --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Magika File Type Dtctn?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/undermybelt-magika-file-type-dtctn)More formats (shields.io, HTML) on the badges page.
---
name: magika-file-type-dtctn
description: Use Google Magika for fast ML-based file-type detection from file bytes, not just extensions or MIME. Use when the user needs reliable file identification, suspicious upload triage, content-type validation, malware-prep filtering, or bulk file classification.
version: 1.0.0
author: Hermes Agent
license: Apache-2.0-or-similar-upstream
---
# Magika File Type Detection
用 Magika 判文件类型。
适用:
- 上传文件真类型校验
- 扩展名伪造排查
- 批量文件分类
- 安全前置检测
- 内容型路由
## 安装
优先低权限安装:
```bash
python3 -m pip install --user magika
```
若 PATH 未含用户 bin:
```bash
export PATH="$HOME/.local/bin:$PATH"
```
验证:
```bash
magika --version
magika somefile.bin
```
## 用法
单文件:
```bash
magika path/to/file
```
批量:
```bash
find path/to/dir -type f -print0 | xargs -0 magika
```
JSON 输出若上游版本支持,则优先 JSON;否则读标准文本输出。
## Hermes 用法
1. 先装并验证 CLI 可运行。
2. 对用户给的文件或目录跑检测。
3. 若结果与扩展名/MIME 不符,明确标“伪装”或“待审”。
4. 若用于上传链路,先以 Magika 结果作为内容真相,再决定解析器。
## 判定原则
- 扩展名只作提示,不作真相。
- MIME 头只作旁证,不作真相。
- 真正路由以 Magika 内容判定为主。
- 对低置信或未知类型,再回退到人工/额外检测。
## 适合集成到 Hermes 的场景
- 本地文档摄取前分类
- repo intake 时判断混入二进制/模型/媒体/文档
- 上传安全网关前置判断
- OCR、PDF、图像、代码文件分流
## 风险
- Magika 强,但非绝对;未知/混合/损坏文件仍可能需二次检查。
- 安全流程中,不可因识别成功就跳过沙箱或 AV。
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Playbook for creating and editing uCoz landing pages via MCP tools (`templates_tool`, `ftp_tool`, `modules_tool`). Use for tasks such as: "build a landing page", "update the homepage as a landing page", "create a promo page on the homepage", "add a lead form / menu / SEO to the homepage". Homepage: `page_list`, `page_get`; first publish — `page_update` with full `page_tmpl`; HTML edits after generation — `patch_template` (module_id=2, template_id=1), not `update_template`. Activate the mail f...
Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.
Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.
Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"