Logotipo de Doc To Markdown

Doc To Markdown

Comunidad
scdenney
doc-to-markdown

Reads or converts documents in a research workflow, including PDF, Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, and CSV. Chooses direct reading or conversion, selects a converter from document structure, and decides whether the Markdown is tracked or temporary. Use when a document must be read, quoted, summarized, searched, extracted, or added to a source library. Scanned documents go to vlm-ocr and bulk intake to research-repo.

Descripción general

Editorscdenney
Repositorioopen-science-skills
Nombre de la habilidaddoc-to-markdown
Estrellas
69
Forks
3
Archivos incluidos
Solo instrucciones
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por scdenney en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Doc To Markdown en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/scdenney/open-science-skills/tree/main/plugin/skills/doc-to-markdown
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/scdenney/open-science-skills.git /tmp/open-science-skills
mkdir -p .claude/skills
cp -r /tmp/open-science-skills/plugin/skills/doc-to-markdown .claude/skills/doc-to-markdown
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Doc To Markdown en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Doc To Markdown automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Doc To Markdown no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Reading and Converting Documents

Instructions

1. Decide whether to convert at all

Conversion is a cost, not a default. Read the file directly with the Read tool when the question is bounded — Read handles PDFs natively, sees figures, equations, and layout that no text conversion preserves, and takes a pages range.

Read directly when the document is under ~20 pages and the task is one pass over it (summarize, answer a question, check a claim, review a draft), when the payload is visual (figures, plots, scanned tables, slides), or when you need a page number you can cite.

Convert when the document is longer than one read comfortably spans, when the text will be searched or quoted repeatedly, when it joins a corpus or source library, when many documents get the same treatment, or when a downstream tool (grep, a classifier, a script) needs plain text. citation-check and fact-check both require converted Markdown, one file per source.

State which path you took in one line. Silently converting a two-page memo wastes a step; silently reading page 1 of a 300-page book and answering as if you read it all is worse.

2. Route by what the document actually is, not by its extension

Probe first — the extension says nothing about structure:

bash
pdfinfo doc.pdf | grep -E '^(Pages|Encrypted)'
pages=$(pdfinfo doc.pdf | awk '/^Pages:/{print $2}')
chars=$(pdftotext -q doc.pdf - | wc -c)
echo "$((chars / pages)) chars/page"   # < 300 means image-only, needs OCR
DocumentToolWhy
Born-digital PDF, prose-dominant (articles, books, reports)opendataloader-pdf -f markdownKeeps paragraph boundaries and does not invent tables
PDF whose payload is tables (questionnaires, appendices, statistical tables)npx -y @firecrawl/anydocReal tables come out as real columns
Office and e-book formats (.docx, .pptx, .xlsx, .odt, .ods, .odp, .rtf, .epub, .csv)npx -y @firecrawl/anydocOne local MIT Rust binary covers all 14 formats, sub-second, no model weights
Scanned or image-only PDF (< 300 chars/page)Stop and hand off to vlm-ocrNeither text extractor can do OCR
One value or one passage out of a clean PDFpdftotext -layout30 ms, no dependencies

Fall back to pandoc for .docx only when Node is unavailable; it escapes apostrophes, hard-wraps lines, and emits Pandoc-flavored rather than GitHub-flavored Markdown.

If the repo already ships a conversion script — scripts/convert-sources.sh and a sources/og + sources/md pair is the house layout — run that script instead of a bare converter. It encodes the project's naming and output conventions, and bypassing it produces files the rest of the pipeline cannot find.

3. Know each converter's failure mode

These are measured on the library's own corpus of political-science PDFs, not vendor claims:

  • opendataloader-pdf leaves typographic ligatures intact. One 30-page article carried 426 raw fi/ff/ffi characters, so grep significant silently misses every hit. Expand them on every conversion:

    bash
    sed -i.bak 's/ff/ff/g; s/fi/fi/g; s/fl/fl/g; s/ffi/ffi/g; s/ffl/ffl/g; s/ſt/ft/g; s/st/st/g' out.md && rm out.md.bak
    grep -c 'ff\|fi\|fl\|ffi\|ffl' out.md   # must be 0

    Full unicodedata.normalize('NFKC', ...) fixes ligatures too, but it also flattens superscripts, so footnote markers merge into the body text as ordinary digits. On documents whose footnote numbering matters, expand the ligatures and leave the rest alone.

  • opendataloader-pdf fails silently on scanned PDFs. A 28-page image-only article produced 2.5 KB of noise and exit code 0. The chars-per-page probe catches this; treat a short output as a failure until shown otherwise.

  • opendataloader-pdf under-detects section headings on some layouts, emitting the title as the only #. Check the heading count before relying on the Markdown for structure-aware chunking.

  • anydoc invents tables out of two-column prose and footnote blocks, shredding sentences into pipe cells. On the same article it emitted 24 table rows where the PDF has no tables at all. Grep the output for ^| and read what it caught before trusting it on a prose document.

  • anydoc merges a whole page into one line, running headers and footnotes into the middle of body paragraphs — fine for retrieval, wrong for quotation and for anything that reads paragraph structure.

  • anydoc errors loudly on image-only PDFs (OCR is required, exit 1). That is a feature: use it as a cheap scanned-document detector.

After any conversion, spot-check the head, the tail, and one middle page against the original. Converters truncate, drop columns, and reorder without complaining.

4. Decide whether the Markdown persists or is thrown away

Make this call yourself, then say which way you went and where the file is.

Persist — write into the project and keep it — when any of these hold:

  • The repo has a source-library convention (sources/md/, knowledge_base/md/, a convert-sources.sh). Write there, under the repo's naming scheme (author-year-slug.md, up to three authors, then firstauthor-etal-year-slug).
  • The document is a cited source for a manuscript, or will be quoted, coded, or fact-checked.
  • The document will be read again — a corpus, a literature review, a multi-session project.
  • Conversion was expensive: OCR, a VLM run, a long book, a manual repair pass.

Use a scratch file and delete it when done when any of these hold:

  • The document lives outside the project (Downloads, an email attachment, /tmp) and the task is one question about it.
  • Conversion is cheap and exactly reproducible from a file that is not going anywhere.
  • The request is transient — "what does this say about X", "check this number".
  • The document is third-party copyrighted material and the repo does not already track converted sources. Repos that keep originals gitignored and conversions tracked have made that call deliberately; a repo with no such convention has not.

When in doubt, persist inside the project and tell the user, since a stray Markdown file is cheap and a re-run of a 40-minute OCR job is not. Either way, say so when writing into a git-tracked directory, and leave the source document where it is.

5. Record what produced the file

A converted document is derived data, and a reader six months on cannot tell a clean extraction from a mangled one. For anything persisted, note the converter and version — in the file's front matter, in sources/README.md, or in the conversion log the repo already keeps. When a document needed OCR, that fact travels with it; downstream text analysis has to know it is working from OCR output.

Bulk intake of many sources at once is research-repo's job, not this skill's. Cleaning OCR output is vlm-ocr's (clean phase).

Quality Checks

  • Read-versus-convert decided explicitly and stated, not defaulted to conversion
  • Structure probed before routing: page count and chars-per-page checked, image-only documents caught before a text extractor ran
  • Repo's own conversion script used when the project ships one
  • Ligatures expanded: grep -c 'ff\|fi\|fl\|ffi\|ffl' returns 0
  • Output spot-checked at head, tail, and one middle page against the original
  • Tables inspected if the output contains any, and confirmed to correspond to tables in the source
  • Persist-or-discard decided, stated, and acted on — scratch files actually deleted
  • Naming convention followed for anything written into a source library
  • Provenance recorded for persisted conversions, including whether OCR was involved
  • Source document untouched

Preguntas frecuentes

¿Qué hace la habilidad de IA Doc To Markdown?

Reads or converts documents in a research workflow, including PDF, Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, and CSV. Chooses direct reading or conversion, selects a converter from document structure, and decides whether the Markdown is tracked or temporary. Use when a document must be read, quoted, summarized, searched, extracted, or added to a source library. Scanned documents go to vlm-ocr and bulk intake to research-repo.

¿Por qué usar Doc To Markdown en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Doc To Markdown está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Doc To Markdown en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/scdenney/open-science-skills/tree/main/plugin/skills/doc-to-markdown. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Doc To Markdown?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Doc To Markdown?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Doc To Markdown con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Doc To Markdown?

scdenney la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇