digest-files
Skill0 starsChanged 55 days agoMITView on GitHub
Convert documents and binary files to Markdown with Microsoft MarkItDown (PDF, DOCX, PPTX, XLSX, HTML, images, audio, epub, zip, YouTube URLs). Use whenever the user asks to digir / digest / converter arquivo para md, markitdown, extrair texto de PDF/slides/Word/Excel, or needs LLM-ready Markdown from office/binary files — even if they do not say "digest-files". Prefer this over ad-hoc pdftotext or manual copy-paste.
- Installs packages
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- claude/CLAUDE.mdCLAUDE.md
- ai-memory-curateSkill
- asd-ste100Skill
- blindspot-passSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- emodeSkill
- find-skillsSkill
- grillingSkill
- handoffSkill
- new-botSkill
- prior-art-checkSkill
- prototypeSkill
- prSkill
- researchSkill
- resolving-merge-conflictsSkill
- retroSkill
- setup-ai-memorySkill
- setup-matt-pocock-skillsSkill
- setup-projectSkill
- setup-pucprSkill
- simplifySkill
- tddSkill
- verification-planningSkill
- wayfinderSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 24
Ask output location if unclear.
- Very specific: line 27
If the target .md already exists and is non-empty, ask before overwrite (idempotent: skip if content identical).
- Distinctive: line 63
Batch: use the kit script when present:
- Very specific: line 80
Prefer convert_local() for local-only paths when using the API in untrusted contexts.
- Distinctive: line 85
Do not dump huge Markdown into the chat.
- Very specific: line 86
If the agent must reason over the content and the file is large, use token-engine caveman_compress on excerpts, or read only the sections …
- Very specific: line 107
Do not invent content when conversion fails.
- Distinctive: line 108
Do not commit secrets from converted files into git without asking.
- Distinctive: line 109
Do not replace MarkItDown with a weaker one-off scraper when this skill was requested.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Digest files (MarkItDown)
Turn files into Markdown for agents and RAG using MarkItDown (pip install 'markitdown[all]').
Portuguese OK in chat. Paths, commands, and output filenames stay in English unless the project is PT-first.
Process
0. Confirm inputs
- Collect source path(s) or URL(s). Refuse untrusted remote URLs without user OK (MarkItDown can fetch network resources).
- Ask output location if unclear. Defaults:
- Single file: same dir as source, name
basename.md(e.g.aula01.pdf→aula01.md) - Batch / folder:
./digest/next to the sources (create if missing)
- Single file: same dir as source, name
- If the target
.mdalready exists and is non-empty, ask before overwrite (idempotent: skip if content identical).
1. Ensure MarkItDown is available
Resolve the CLI in this order (do not use the ancient system python3 on macOS CLT — it may pull a broken 0.0.1a1):
$MARKITDOWNif setcommand -v markitdown~/Projects/token-engine/.venv/bin/markitdown(common on this stack)- Else install into a real 3.10+ venv:
# Prefer Homebrew or an existing project/token-engine venv
python3.12 -m pip install -U 'markitdown[all]' # or: uv pip install ...
# Verify:
markitdown --version # expect 0.1.x+, not 0.0.1a1Need only a subset of formats: pip install 'markitdown[pdf,docx,pptx,xlsx]'.
Python 3.10+ required.
2. Convert
CLI (preferred):
markitdown "/ABS/OR/REL/path-to-file.pdf" -o "/path/to/output.md"Stdout redirect also works:
markitdown "/path/to/file.pdf" > "/path/to/output.md"Batch: use the kit script when present:
bash "$(dirname "$0")/scripts/digest.sh" /path/to/file_or_dir [--out DIR]
# or from cursor-kit:
# bash ~/Projects/cursor-kit/skills/digest-files/scripts/digest.sh ./Modulos --out ./digestPython API (when you need programmatic control):
from markitdown import MarkItDown
md = MarkItDown(enable_plugins=False)
result = md.convert("report.pdf")
Path("report.md").write_text(result.markdown, encoding="utf-8")Prefer convert_local() for local-only paths when using the API in untrusted contexts.
3. After convert
- Confirm the
.mdexists and size > 0. - Do not dump huge Markdown into the chat. Summarize: path, bytes/lines, first heading if any.
- If the agent must reason over the content and the file is large, use token-engine
caveman_compresson excerpts, or read only the sections needed (CBM / targeted Read). - Optional: add a one-line note in
PROJECT.mdor course notes only if the user asked to record digests.
4. Report
## Digest complete
- Source: …
- Output: …
- Tool: markitdown …
- Notes: (OCR skipped / empty extract / overwrite skipped / …)Formats (built-in)
PDF, PowerPoint, Word, Excel, images (EXIF + OCR deps), audio (transcription extras), HTML, CSV/JSON/XML, ZIP (walks contents), EPub, YouTube URLs (extra), and more.
Azure Document Intelligence / Content Understanding flags exist (-d, --use-cu) but are out of default scope unless the user provides endpoints and asks.
Guardrails
- Do not invent content when conversion fails. Report the error and suggest installing the right extra (
[pdf], etc.). - Do not commit secrets from converted files into git without asking.
- Do not replace MarkItDown with a weaker one-off scraper when this skill was requested.
- Machine-specific absolute paths only in local commands, never in shared docs.
Examples
User: "digere o Modulo03.pdf pra md"
→ markitdown Modulos/Modulo03.pdf -o Modulos/Modulo03.md (or digest/Modulo03.md if they prefer a digest folder)
User: "converte todos os pptx da pasta Slides"
→ batch into ./digest/ via scripts/digest.sh
User: "/digest-files" with an attachment path
→ same pipeline; ask only if output path is ambiguous
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
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.

