# File To Markdown

Turn almost any file into Markdown plus metadata, PDF, Office, HTML, email, archives...

- Repository: https://github.com/apache/tika (4119 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add apache/tika --skill file-to-markdown -g -a claude-code -y`
Codex: `npx skills add apache/tika --skill file-to-markdown -g -a codex -y`
Cursor: `npx skills add apache/tika --skill file-to-markdown -g -a cursor -y`
Gemini CLI: `npx skills add apache/tika --skill file-to-markdown -g -a gemini-cli -y`

## Description

Turn almost any file into Markdown plus metadata, PDF, Office, HTML, email, archives, images, audio/video, 1000+ formats, powered by Apache Tika, either via the tika-app CLI (zero setup, one file) or a running tika-server (curl, warm process, many calls). Leads with rmeta (structured, embedded-item-aware output) as the default operation rather than flat concatenated text, since you can't tell whether a file has embedded content from its extension. Covers metadata-only triage, type and language detection, OCR, and output-size discipline for agent context. Use whenever a task involves reading the content of a file whose format you don't want to hand-parse.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

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:

The rest: https://github.com/apache/tika/blob/HEAD/.skills/users/file-to-markdown/SKILL.md
