doc-ingest
БесплатноБез исполняемых скриптовНе проверенRead existing documents (PDF, Word, PowerPoint, Excel, HTML) and convert them into clean Markdown/plain text the agent can reason over: extract text, ingest a…
от phuetz★ 53 звезды на GitHubОб этом скилле
Ingest existing documents into Markdown / text
Turn a document the user already has (PDF, Word, PowerPoint, Excel, HTML) into
clean Markdown or plain text so you can quote, summarize, or transform it. This
is the read counterpart to the create skills (xlsx/docx/pptx/pdf).
Work one visible step at a time and verify before reporting.
Two backends — prefer the lean one
- Lean (always available, no extra install): the bundled libraries
pypdf,python-docx,python-pptx,openpyxlread the common Office/PDF formats withpython3 -c "import pypdf, docx, pptx, openpyxl". Use this path by default. - Rich (optional,
prepare:python:extras):markitdownadds HTML, images (OCR), EPUB, ZIP and more, and emits tidy Markdown directly. Only reach for it when the lean path can't read the format.
Workflow (one step at a time)
- Identify the file and its type (extension).
- Extract: run a short Python script (heredoc via the
bashtool) that reads the file with the matching library and prints — or writes — Markdown/text. - Verify: assert the output is non-empty (e.g.
assert len(text) > 0) and print a length + first lines so the extraction is visibly correct. - Report: the extracted text (or the saved
.mdpath) and a one-line summary.
Lean extraction (covers PDF / Word / PowerPoint / Excel)
python3 - "$FILE" <<'PY'
import sys, os
src = sys.argv[1]
ext = os.path.splitext(src)[1].lower()
def pdf(p):
from pypdf import PdfReader
return "\n\n".join((pg.extract_text() or "") for pg in PdfReader(p).pages)
def docx(p):
import docx
d = docx.Document(p)
return "\n".join(par.text for par in d.paragraphs)
def pptx(p):
from pptx import Presentation
out = []
for i, sl in enumerate(Presentation(p).slides, 1):
out.append(f"## Slide {i}")
for sh in sl.shapes:
if sh.has_text_frame:
out.append(sh.text_frame.text)
return "\n".join(out)
def xlsx(p):
from openpyxl import load_workbook
wb = load_workbook(p, data_only=True)
out = []
for ws in wb.worksheets:
out.append(f"## {ws.title}")
for row in ws.iter_rows(values_only=True):
out.append(" | ".join("" if c is None else str(c) for c in row))
return "\n".join(out)
handlers = {".pdf": pdf, ".docx": docx, ".pptx": pptx, ".xlsx": xlsx}
fn = handlers.get(ext)
if not fn:
sys.exit(f"Lean path can't read {ext}; enable the rich backend (prepare:python:extras) for markitdown.")
text = fn(src)
assert text and text.strip(), "extraction produced no text"
print(f"[{len(text)} chars]")
print("\n".join(text.splitlines()[:40]))
PY
Rich backend (markitdown — optional)
python3 - <<'PY'
try:
from markitdown import MarkItDown
except ModuleNotFoundError:
raise SystemExit(
"markitdown not installed. Run `npm run prepare:python:extras` in cowork/ "
"to add the optional ingestion backend (HTML, images/OCR, EPUB, ...)."
)
md = MarkItDown()
res = md.convert("INPUT_PATH")
assert res.text_content, "markitdown produced no content"
print(res.text_content[:4000])
PY
Notes
- Never invent content — only report what the extractor returned.
- For large files, summarize after extraction rather than dumping everything.
- To then produce a new document from what you read, hand off to the
xlsx/docx/pptx/pdfcreate skills.
Установить doc-ingest в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл doc-ingest?
Read existing documents (PDF, Word, PowerPoint, Excel, HTML) and convert them into clean Markdown/plain text the agent can reason over: extract text, ingest a file, summarize a document. Use whenever the user wants to READ, extract, ingest, transcribe, or summarize the contents of an existing file (not create one).
Как установить скилл doc-ingest?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл doc-ingest запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic