agentleFS
Nico0713520Nico0713520/dsh-doc-to-markdown/SKILL.md

doc-to-markdown

Skill0 starsChanged 3 months agoMITView on GitHub

Convert PDF and Word (DOCX) documents to clean Markdown. Use when the user asks to convert PDF/Word to Markdown, extract document text/structure, 提取 PDF/Word 内容, 转 Markdown, or prepare documents for editing/RAG. Handles Chinese documents and Windows paths well.

  • Installs packages

7 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions7 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 7

    1. sheepmao/doc-to-markdown-skill★ 9same name
    2. joaoguirunas/team-os★ 6same name
    3. TbusOS/sky-skills★ 3same name
    4. seonggukchoi/skills★ 1same name
    5. AllanSantos-DV/skill-kit★ 0same name
    6. bnwe/claude-skills★ 0same name
    7. Sorinpsc/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run from this skill directory:

    line 17
  2. Distinctive:

    Never bypass the path-safety checks.

    line 45

“Common” is measured: kept by at least 6 in 10 of the 6 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

Convert .pdf and .docx files to Markdown via deterministic rules (no LLM calls).

When to activate

User says: convert this PDF/Word to Markdown, 提取文档内容, 转 md, extract text for RAG/notes.

How to run

Run from this skill directory:

node scripts/convert.cjs <input> [-o output.md] [--stdout]
  • <input>: absolute or relative path to a .pdf or .docx file
  • -o: optional output path; default is <input-basename>.md next to the input
  • --stdout: print Markdown content to stdout instead of/in addition to writing the file

Parse the JSON result on stdout:

{ "ok": true, "format": "pdf", "input": "...", "output": "...", "warnings": ["..."] }

On failure: { "ok": false, "error": "human-readable reason" } — show the error to the user, do not retry blindly.

Engine routing

  • .docx → mammoth (DOCX→HTML) + turndown (HTML→MD). Pure Node, no extra deps.
  • .pdf → Python subprocess running PyMuPDF4LLM. Requires pip install pymupdf4llm; if missing, the tool returns a clear setup hint — report it to the user.
  • Scanned PDFs (no text layer) are detected and reported with an OCR suggestion.

Notes for the agent

  • Output file defaults next to the input file; use -o if the user wants a specific location.
  • Chinese document support is a first-class goal; report any garbled output as a bug.
  • Never bypass the path-safety checks; they reject suspicious paths on purpose.

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.