Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kreuzberg-dev/kreuzberg-lts --skill mime-detection-routinggit clone --depth 1 https://github.com/kreuzberg-dev/kreuzberg-ltsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/mime-detection-routing)<a href="https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/mime-detection-routing"><img src="https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/mime-detection-routing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/mime-detection-routing"><img src="https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/mime-detection-routing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00003 | $0.00490 |
| Opus 5.5 | $0.00001 | $0.00196 |
| Sonnet 5.5 | $0.00001 | $0.00098 |
| Haiku 4.5 | $0.00000 | $0.00049 |
Grade A, and why
mime-detection-routing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
priority: high
MIME Detection & Routing
Detection Flow
Extension → EXT_TO_MIME map → validate → Registry lookup → Extractor
Key Functions
| Function | Location | Purpose |
|---|---|---|
detect_mime_type(path, inspect) |
core/mime.rs |
Extension + optional content inspection |
detect_mime_type_from_bytes(bytes) |
core/mime.rs |
Magic number detection (infer crate) |
validate_mime_type(mime) |
core/mime.rs |
Check if any extractor supports it |
Extension Mapping
118+ extensions mapped in EXT_TO_MIME (core/mime.rs). Case-insensitive.
Key mappings: .pdf → application/pdf, .docx → application/vnd.openxmlformats-officedocument.wordprocessingml.document, .xlsx → spreadsheet variant, .png/.jpg → image/*
Registry Selection
// In core/extractor/bytes.rs
fn select_extractor_for_mime(mime_type: &str) -> Result<Arc<dyn DocumentExtractor>> {
let registry = get_document_extractor_registry();
let registry_guard = registry.read()?;
registry_guard.get_for_mime_type(mime_type)
.ok_or_else(|| KreuzbergError::UnsupportedFormat(mime_type.into()))
}
Selects highest-priority extractor registered for that MIME type.
Adding New MIME Types
- Add extension mapping:
m.insert("ext", "application/x-new");incore/mime.rs - Implement
DocumentExtractorwithsupported_mime_types()returning the MIME - Register in
register_default_extractors()
Wildcard Support
Extractors can register for MIME type families: "image/*" matches image/png, image/jpeg, etc.
Critical Rules
- Always
validate_mime_type()before extraction - Extension mapping is case-insensitive
- Content inspection (infer crate) is fallback for extension-less files
- Registry validation is final authority on supported types
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +6 lines ef645a1076e8
- 3mo ago First seen · 60 lines · 3 tokens per session scan A f3f973503b79
mime-detection-routing is a skill published in the GitHub repository kreuzberg-dev/kreuzberg-lts (22 stars, last pushed 1mo ago), licensed MIT. It adds 3 tokens to every session and 490 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
mime-detection-routing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mime-detection-routingkreuzberg-dev/kreuzberg-lts | Skill | 22 | 1mo ago | MIT | A | 3 | Claude Code, Codex |
| doc-readerJansenAnalytics/claudex | Skill | 5 | 5mo ago | MIT | B | 51 | Claude Code, Codex |
| paddleocr-doc-parsingPaddlePaddle/PaddleOCR | Skill | 93k | 2mo ago | Apache-2.0 | A | 140 | Claude Code, Codex |
| paddleocr-text-recognitionPaddlePaddle/PaddleOCR | Skill | 93k | 2mo ago | Apache-2.0 | A | 125 | Claude Code, Codex |
| adelanding-ai/ade-cli | Skill | 2.4k | 1mo ago | Apache-2.0 | A | 65 | Claude Code, Codex |
| document-processingericrisco/rsc-harness | Skill | 682 | 4d ago | MIT | A | 84 | Claude Code, Codex |
| document-processing-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 102 | Claude Code |