agentleFS
mikel-codemikel-code/claude-skills/doc-to-markdown/SKILL.md

doc-to-markdown

Skill0 starsChanged 3 months agoMITView on GitHub

Convert an office document (docx/doc, pptx/ppt, xlsx/xls, odt/ods/odp, rtf, epub, csv) to a markdown file with Open Knowledge Format frontmatter, via the anydoc CLI. Refuses PDFs — those need the pdf-to-markdown skill's tiered OCR/verification pipeline. Use when the user asks to convert a Word/PowerPoint/Excel/OpenDocument/RTF/EPUB/CSV file to markdown.

  • Installs packages

8 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

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Default output is <input-stem>.md in the current directory.

    line 21

“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

doc-to-markdown

Thin wrapper around anydoc — office document formats are a solved conversion problem, so this skill is just the CLI plus OKF frontmatter, no pipeline. Supported formats: docx, doc, pptx, ppt, xlsx, xls, odt, ods, odp, rtf, epub, csv.

Command

uv run <skill-dir>/scripts/doc_to_markdown.py <input-file> [-o OUTPUT.md] [--output-dir DIR]

Default output is <input-stem>.md in the current directory.

Output

One markdown file: Open Knowledge Format (OKF) v0.2 frontmatter (type: Document, title from the first markdown heading anydoc produced — else the filename stem —, description from the first paragraph, resource/sources pointing at the input file's absolute path, generated.by: machine:doc-to-markdown/anydoc), then anydoc's converted markdown body unchanged.

PDFs go elsewhere

This skill refuses PDF input (by extension and by %PDF- magic bytes) and points at the pdf-to-markdown skill instead — PDFs need a tiered pipeline with routing, OCR, and verification that doesn't belong in a trivial wrapper.

Troubleshooting (exit codes)

  • 0 success.
  • 1 unexpected error — bad input path, or anydoc itself was invoked wrong (a bug in this script, not the document).
  • 2 anydoc not on PATH — install with npm install -g @firecrawl/anydoc (requires Node/npm).
  • 3 input refused — it's a PDF; use the pdf-to-markdown skill.
  • 4 anydoc could not convert the document. Its stderr message is passed through and tells you why — observed cases: document is encrypted (password-protected), unsupported input: unrecognized file content and extension (not one of the supported formats, or a bare extension-less file), malformed document: not a readable zip archive (corrupt docx/xlsx/pptx/odt — these are zip containers), io error (permissions or path problem). Nothing is written to the output file on any exit-4 failure.

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.