file-to-markdown

file-to-markdown is a skill for Claude Code, Codex from apache/tika. It costs 147 tokens per session (4,065 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 ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it to extract readable text and metadata from documents, inspect email attachments or archives, perform OCR, and handle uncommon file formats.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apache/tika/file-to-markdown
About the project

Apache Tika is a toolkit that reads many kinds of files and extracts their text and descriptive metadata, including from formats such as PDF, PowerPoint, and Excel. Applications and agent pipelines use it to turn documents into content they can process, search, or pass to language models. The catalogue skills provide reusable ways for coding agents to run Tika for file-to-Markdown extraction.

apache/tika · 4,104 stars · on GitHub · tika.apache.org

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.

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/github.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/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.

agentmods 80×15 button for file-to-markdown

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,065 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 60
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium Data Exfiltration · line 68
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 217
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium MCP Rug Pull · line 237
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
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.1 $0.00147 $0.04065
Opus 5.5 $0.00059 $0.01626
Sonnet 5.5 $0.00029 $0.00813
Haiku 4.5 $0.00015 $0.00407

Measured 5d ago against content hash 4d936077a1e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 5d 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 · 322 lines

How it starts

The opening of the file, as written. The whole thing — 322 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 · 322 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. 5d ago Changed · +2 lines 4d936077a1e5
  2. 17d ago Changed 69fab8b20d98
  3. 1mo 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,104 stars, last pushed today), licensed Apache-2.0. It adds 147 tokens to every session and 4,065 once invoked, about $0.0006 per session on Opus 5.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

audio-transcriber

Transform audio recordings into professional Markdown documentation with intelligent summaries using LLM integration.

sickn33/agentic-awesome-skills · 18 tokens

java-affected-tests

Use before opening or updating an OpenMetadata PR that changes Java, a JSON schema, an index mapping, a SQL migration, seed data or a pom — PR CI no longer runs the Java integration tests (they run only in the merge queue) and the JavaUIIT/search-it suites run only nightly, so this selects the unit tests and…

open-metadata/OpenMetadata · 120 tokens

java-checkstyle

Run mvn spotless:apply to fix Java checkstyle / formatting failures and verify the result. Invoke after authoring or modifying any .java files, or when CI reports a "Java checkstyle failed" or "Fix Java checkstyle" issue on a PR.

open-metadata/OpenMetadata · 60 tokens

pdf-processing

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

PrefectHQ/fastmcp · 11 tokens

azure-ai-formrecognizer-java

Build document analysis applications with Azure Document Intelligence (Form Recognizer) SDK for Java. Use when extracting text, tables, key-value pairs from documents, receipts, invoices, or buildi...

benjaminasterA/antigravity-awesome-skills · 45 tokens

document-processing

Use when the deliverable is a document's bytes or its literal content — text/tables out of PDFs, AcroForm fill and flatten, page merge/split, PDF/DOCX from templates, OCR of image-only scans. NOT schema-typed fields pulled from text (that is structured-extraction), NOT signature routing (e-signature) or spreadsheet…

ericrisco/rsc-harness · 84 tokens