office-to-markdown

Converts office automation documents — PDF, PPTX, DOCX, XLSX, CSV — into clean, readable Markdown. Use this skill when a user explicitly asks to convert, extract, or turn an uploaded document into Markdown (e.g. "convert this PDF to markdown", "extract the text from this Word doc", "turn this into markdown"). Do NOT trigger on a bare file upload alone — wait for a clear conversion request. Handles both text-based and image-based / scanned documents via Claude vision (requires user confirmation before sending images to the API).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "office-to-markdown" with this command: npx skills add naimalarain13/office-to-markdown

Office → Markdown Skill

Convert any uploaded office document to clean Markdown. All conversion logic lives in scripts/ — load only the script you need.

Security notes

  • Dependencies are installed into an isolated temp directory (/tmp/office_md_deps/) and pinned to reviewed versions. The system Python environment is not modified.
  • For scanned or image-only content, pages are sent to Anthropic's vision API. Always ask the user for confirmation before enabling vision (see Workflow step 3).

Script Reference

FormatExtensionsScript
PDF (text + scanned/image).pdfscripts/pdf-to-md.py
PowerPoint.pptx, .pptscripts/pptx-to-md.py
Word.docx, .docscripts/docx-to-md.py
Excel.xlsx, .xlsscripts/xlsx-to-md.py
CSV.csvscripts/csv-to-md.py

Workflow

1. Confirm conversion intent

Only proceed if the user has explicitly asked to convert, extract, or export the document to Markdown. A bare file upload without a conversion request is not sufficient to trigger this skill.

2. Run the matching script (text-only pass first)

python scripts/<script-name>.py \
  /mnt/user-data/uploads/<input-file> \
  /mnt/user-data/outputs/<stem>.md

Each script installs its own pinned dependencies into /tmp/office_md_deps/ on first run (isolated from the system Python environment).

3. Vision consent — REQUIRED before image extraction

If the script output indicates image-only pages were detected (or the document is known to be scanned), stop and ask the user:

"This document has N image-only page(s) that cannot be extracted without sending them to Anthropic's vision API. Page images will be transmitted externally for OCR. Would you like to proceed with vision extraction?"

Only if the user confirms, re-run with the --allow-vision flag:

python scripts/<script-name>.py \
  /mnt/user-data/uploads/<input-file> \
  /mnt/user-data/outputs/<stem>.md \
  --allow-vision

If the user declines, save the text-only result and note which pages were skipped.

4. Present the file

Use present_files with the output .md path, then give a brief summary:

  • File type and page/slide/sheet count
  • Whether vision was used and for how many pages (or that it was skipped)

How vision works (PDF / PPTX / DOCX)

Each script uses a two-pass strategy:

  1. Text pass — extract text normally (fast, no API call, always runs)
  2. Vision pass — only runs when --allow-vision is passed AND pages had no extractable text; those pages are rendered and sent to the Claude vision API

Edge Cases

SituationBehaviour
Fully scanned PDFAll pages flagged for vision; user confirmation required
Mixed PDF (some text, some images)Only image pages flagged; user confirmation required
User declines visionText-only .md is saved; skipped pages are noted inline
Password-protected fileScript exits with a clear error message
Very large PDF (50+ image pages)Script adds 0.3s sleep between vision calls
Image too large (>4MB base64)Reduce DPI: edit dpi=150dpi=100 in pdf-to-md.py
Encoding errors in CSVScript auto-retries with latin-1

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Find Agent

OceanBus-powered agent and service discovery via Yellow Pages. Use when users want to find someone, look for a service, reach out to an expert, discover anot...

Registry SourceRecently Updated
Automation

Qwen Web Agent

Browser automation for 通义千问 (Qwen) web interface at qianwen.com. Use when the agent needs to ask questions to Qwen AI and get back responses via browser auto...

Registry SourceRecently Updated
Automation

bot File Processor

通用文件处理技能,用于批量重命名和格式转换。当用户需要批量重命名文件(添加前缀/后缀、替换文本、编号重命名、正则表达式重命名)或转换文件格式(图片格式转换、PDF与图片互转、DOCX转PDF、Markdown转PDF)时使用此技能。

Registry SourceRecently Updated
Automation

Ocean Chat

OceanBus-powered P2P messaging, shared address book, 1v1 meetup negotiation, and conversation threading for AI agents. Use when users want to manage contacts...

Registry SourceRecently Updated