file-to-markdown

file-to-markdown is a skill for Claude Code, Codex from apache/tika. It costs 147 tokens per session (4,030 once invoked), scanned A, original, Apache-2.0.

A guide for converting files into Markdown text and metadata with Apache Tika, a document-reading tool. It covers PDFs, Office files, web pages, email, archives, images, media, and many other formats.

In plain words
What is it for?
Use it to extract readable text and metadata from documents, inspect email attachments or archives, perform OCR, and handle uncommon file formats.
Why use it?
It gives an agent one approach for reading file types that may not be supported directly, while preserving metadata and embedded content when needed.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/apache/tika/file-to-markdown
Any agent
npx skills add apache/tika --skill file-to-markdown
Clone the repo
git clone --depth 1 https://github.com/apache/tika

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for file-to-markdown

README.md
[![agentmods](https://agentmods.dev/badge/skills/apache/tika/file-to-markdown.svg)](https://agentmods.dev/skills/apache/tika/file-to-markdown)
Your own site
<a href="https://agentmods.dev/skills/apache/tika/file-to-markdown"><img src="https://agentmods.dev/badge/skills/apache/tika/file-to-markdown.svg" alt="Measured on agentmods" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,030 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00147 $0.04030
Opus 5 $0.00073 $0.02015
Sonnet 5 $0.00029 $0.00806
Haiku 4.5 $0.00015 $0.00403

Measured 4d ago against content hash 5928ea1c123c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

file-to-markdown scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

the tika-app CLI (zero setup, one file) or a running tika-server (curl,
.skills/users/file-to-markdown/SKILL.md · 320 lines

How it starts

The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Local override: $TIKA_SKILLS_LOCAL/file-to-markdown/LOCAL.md (default ~/.tika-skills), read after this file, wins on conflict.

Using Apache Tika from an agent

Apache Tika turns almost any document into text you can read, and reports per-document content as Markdown by default (4.x) — the format you actually want, not raw XML or a wall of HTML tags. See below for why to reach for the structured rmeta view rather than a flat blob, even when the file looks simple.

This skill is for reading files, one at a time, inside your normal working loop. It is not a batch pipeline — see Batch processing, below, for why.

When NOT to reach for Tika: if your host can already read the file natively (many agent environments read PDFs and images directly) and you only need its visible text, use that — it's one step, not three. Tika earns its place for everything else: .docx/.xlsx/.pptx, email (.eml, .msg) and its attachments, archives, embedded content inside anything, metadata (authors, dates, edit history), OCR, and the long tail of ~1000 formats nothing else opens.

Requirements: Tika 4.x needs Java 17+ (java -version to check). No Java 17? In order of least pain:

  1. Docker installed? Use the Docker route — zero local Java (see the file-to-markdown-docker companion skill, or docker run apache/tika:latest-full).

  2. No Docker either? Offer to install a user-local Java — ask the user first; never install software silently. The least invasive option is a Temurin JRE unpacked into a directory the user owns: ~45 MB, no admin rights, no PATH changes, uninstall = delete the directory.

    mkdir -p ~/tika-jre && cd ~/tika-jre
    curl -L "https://api.adoptium.net/v3/binary/latest/21/ga/linux/x64/jre/hotspot/normal/eclipse" | tar xz
    ~/tika-jre/*/bin/java -jar tika-app.jar --version
    

    Swap linux/x64 in the URL for mac|windows and aarch64 as needed (Windows: fetch the .zip variant and unzip). If the user prefers a managed install, the system package works too (temurin-21-jre via apt, brew install --cask temurin@21, winget install EclipseAdoptium.Temurin.21.JRE) — that needs admin rights and touches system state, so it's their call, not the default. This skill describes Tika 4.x; on a 3.x install the defaults differ (3.x outputs XHTML, not Markdown, and some flags changed) — check java -jar tika-app.jar --version or curl localhost:9998/version if behavior doesn't match what's described here.

Read the full file on GitHub · 320 lines

Changes

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.

  1. 4d ago First seen · 320 lines · 147 tokens per session scan A 5928ea1c123c

Subscribe to this mod's changes

file-to-markdown is a skill published in the GitHub repository apache/tika (4,028 stars, last pushed yesterday), licensed Apache-2.0. It adds 147 tokens to every session and 4,030 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pdf-processing

Extract text from PDFs, fill forms, and merge documents.

PrefectHQ/fastmcp · 11 tokens

literature

Load when extracting GEO accessions, dataset metadata, and downloadable references from a scientific paper (PDF / URL / DOI / PubMed ID / raw text) for downstream omics analysis. Skip when the dataset is already in hand; only routing a query (use orchestrator).

TianGzlab/OmicsClaw · 58 tokens

sdrf:knowledge

Use when the user asks about the SDRF format, column naming rules, ontology mappings, modification format, reserved words, label types, or any SDRF specification question, wants a plain-language explanation of a column/error/concept, or needs to find/verify/compare ontology terms and accessions for a column. Also…

bigbio/sdrf-skills · 81 tokens

sdrf:review

Use when the user wants a comprehensive quality review of an SDRF file, a PR review of an SDRF submission, a quality score assessment, or to improve/score an existing SDRF strictly against templates and specification rules (specificity, completeness, consistency; no speculative additions).

bigbio/sdrf-skills · 62 tokens

agenthub

Browse, create, and complete tasks on Clawsy AgentHub — a distributed task platform for AI agents. Create tasks from GitHub repos, PDF/DOCX/PPTX/audio URLs, or plain text. Use custom LLM validation, earn karma. Categories: content, data, research, creative.

citedy/adclaw · 65 tokens

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…

zebbern/claude-code-guide · 92 tokens