pdf-folder-to-markdownlisted
Install: claude install-skill palych65/pdf-folder-to-markdown
# PDF folder → Markdown
This skill drops two small, self-contained Python scripts into a target folder:
1. **`convert_pdfs_to_md.py`** — walks the folder tree, converts every `*.pdf` it finds to a Markdown file using PyMuPDF's fast plain-text extractor (no OCR, no layout reconstruction). The Markdown file is named after the containing folder; if a folder holds multiple PDFs they're concatenated with clear separators.
2. **`delete_non_markdown.py`** — dry-run by default, previews and (with `--apply`) deletes every non-`.md` file in the tree, preserving the scripts themselves unless `--include-scripts` is also passed.
## When to use
Trigger whenever the user wants to bulk-convert PDFs in a folder tree to Markdown, and/or clean up the originals afterwards.
## How to execute
### Step 1 — Confirm the target folder
If the target folder is ambiguous, ask with `AskUserQuestion`. Default to the user-selected workspace folder or the folder most recently discussed in the conversation.
### Step 2 — Write the two scripts
Read each template and write it verbatim into the target folder. Do not rewrite or "improve" them — the point of the skill is a consistent, proven output.
- `templates/convert_pdfs_to_md.py` → `<target>/convert_pdfs_to_md.py`
- `templates/delete_non_markdown.py` → `<target>/delete_non_markdown.py`
### Step 3 — Install the dependency and run the converter
```bash
pip install pymupdf --break-system-packages --quiet
cd "<target_folder>"
python3 -u convert_pdfs_to