agentleFS
Adonis0123Adonis0123/hermes-kit/skills/convert-documents-to-markdown/SKILL.md

convert-documents-to-markdown

Skill1 starsChanged 50 days agoMITView on GitHub

Convert Word/PPT/Excel/PDF to Markdown via read_file.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not use for scanned/image-only PDFs → ocr-and-documents (or pdftoppm + vision_analyze)

    line 27
  2. Distinctive:

    Stop here if the text is usable.

    line 34
  3. Very specific:

    Do not npx skills add firecrawl/anydoc -g — installer can overwrite Hermes category dirs (see references/anydoc-read-file.md).

    line 65
  4. Very specific:

    Do not shell npx on every document.

    line 66

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Convert documents to Markdown

Hermes already converts most office files inside read_file (lazy firecrawl-anydoc). This skill is the routing, not a second converter.

Use when a task needs the contents of .doc .docx .ppt .pptx .xls .xlsx .odt .ods .odp .rtf .epub .csv .pdf that cannot be read as plain text.

Upstream CLI skill (do not npx skills add it here): https://github.com/firecrawl/anydoc/tree/main/skills/convert-documents-to-markdown

Pin / routing / quality notes: references/anydoc-read-file.md.

When to Use

  • User (or a task) needs an office document, spreadsheet, presentation, ebook, or PDF
  • read_file returned a binary-file guard, empty math, or raw percents that look wrong
  • Do not use for scanned/image-only PDFs → ocr-and-documents (or pdftoppm + vision_analyze)

Procedure

  1. Local file, normal read — read_file the path. It auto-extracts Markdown for:
    • stdlib: .ipynb .docx .xlsx
    • anydoc (lazy firecrawl-anydoc==0.2.3): .pdf .doc .ppt .xls .pptx + variants, .odt .ods .odp .rtf .epub Stop here if the text is usable.
  2. stdlib gap — .docx formulas and .xlsx number formats (15.5% / $1,234.50) stay on the stdlib path even with anydoc installed. Re-convert with the venv library, not npx:

    "$HERMES_HOME/hermes-agent/.venv/bin/python" -c 'import anydoc,sys; print(anydoc.to_markdown(sys.argv[1]))' -- "/path/to/file.docx"

    Large output: write a .md next to the source and read_file slices of it.

  3. CSV — Hermes read_file does not extract .csv. Same Python one-liner, or pass format when the extension is missing:

    "$HERMES_HOME/hermes-agent/.venv/bin/python" -c 'import anydoc,sys; print(anydoc.to_markdown_bytes(open(sys.argv[1],"rb").read(),"csv"))' -- "/path/to/file.csv"
  4. URL — web_extract the PDF/Office URL first. Fall back to download + step 1.
  5. Scanned / empty PDF — anydoc raises UnsupportedError: … OCR is required. Load ocr-and-documents. Do not retry anydoc.

npx -y @firecrawl/anydoc is a last resort (no venv, or need to prove CLI==Python). Prefer the already-installed 0.2.3 wheel.

Failures

SymptomMeaningNext
binary-file guard on .pdf/.pptxanydoc not loaded in this process/restart after pin bump; then read_file again
“The roots are for any a.”stdlib .docx ate OMMLstep 2
0.155 instead of 15.5%stdlib .xlsxstep 2 on .xlsx, or read_file a .xls
EncryptedErrorpassword-protectedstop; ask for an unlocked copy
MalformedErrortruncated/corruptstop; file is unusable
UnsupportedError + Scannedno text layerocr-and-documents

Pitfalls

  • Do not npx skills add firecrawl/anydoc -g — installer can overwrite Hermes category dirs (see references/anydoc-read-file.md).
  • Do not shell npx on every document; the Python binding is the same converter and is already in the Hermes venv.
  • Cap 50 MB (read_file). Bigger files: convert to a .md on disk, then paginate.
  • Pin lives in tools/lazy_deps.py (tool.doc_extract). Changing it needs a gateway /restart.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.