← Back to library

▶ quest log

Convert PDFs to Markdown Before Feeding Them to an Agent

Claude Code / Skills◆ Intermediate◆ Advanced@peerjuelichsaved JUL 02

◇ Could this help me?

Yes for the technique, no for how it is installed. Converting a document to text before handing it to a model is straightforwardly correct: image tokens are expensive, and a PDF is a container, so extracting the text first removes cost that buys nothing, and it also produces cleaner input than page images do. The install advice is the weak part, because copying a link into an agent and letting it install on the strength of the word safe is exactly the habit that gets someone a malicious lookalike repository one day, so verify the publisher and the repository yourself before anything is installed. General practice, and expect the seventy percent saving to vary widely with how image-heavy the document is.

✦ Walkthrough+10 xp / step
0 / 5 steps · adopt for +40
$ suggested_prompt+40xp

I want to stop wasting tokens by pasting PDFs directly into a coding session. First, research the MarkItDown project: confirm the official Microsoft repository, who maintains it, what it installs, what it runs locally, and whether anything is sent off the machine. Report those findings with a recommendation, and install it only after I explicitly approve. Once it is set up, show me how to convert a document to Markdown before a session starts, and compare the token count of the converted version against the original PDF so I can see the actual saving on my own documents.

More from Claude Code / Skills

Enter world →