Docs

From fritzprix/libr-agent · View interactive version

Docs is an AI agent skill from the GitHub repository fritzprix/libr-agent. Use when the user needs to convert Markdown to PDF, PPTX, DOCX, or extract documents to Markdown. Uses fixed CLI commands with bundled scripts and ReportLab/MarkItDown. Do not write custom renderers.

How to use this skill

Skill file

Docs

[!CAUTION]

Do not write your own renderer.

Do not use fpdf, reportlab, or puppeteer code directly. Do not use python -c or node -e.

If convert.py fails, report the error. Do not improvise.

This skill provides unified document conversion between Markdown and presentation/document formats (PDF, DOCX, PPTX) as well as extracting existing documents back into structured Markdown.

Permissive Library Licenses

All tools and runtime dependencies used by this skill are permissively licensed:

Routing by Direction

Select the conversion guide matching the desired direction:

All three output formats share the same templates, so one --template value

means the same document identity everywhere: report, proposal, minutes.

| Direction | Guide Reference | Outputs |

|-----------|-----------------|---------|

| Markdown -> PDF | references/md-to-pdf.md | .pdf |

| Markdown -> DOCX | references/md-to-docx.md | .docx |

| Markdown -> PPTX | references/md-to-pptx.md | .pptx |

| Document -> Markdown | references/to-md.md | Text extraction via MarkItDown |

Fixed Command Form

Before first conversion or when troubleshooting dependencies, run the doctor command:

powershell -NoProfile -ExecutionPolicy Bypass -File "<skill-base-dir>/scripts/doctor.ps1"

(On Linux/macOS: uv run --no-project --python 3.12 "<skill-base-dir>/scripts/convert.py" --doctor)

The doctor discovers a working Python environment, provisions a persistent virtualenv outside the managed skill directory (at ~/.libragent/skills/docs/venv), verifies dependencies, and prints Doctor: OK along with the VenvPython: executable path. It installs the Word, PowerPoint and Excel converters too, so --to md works on .docx, .pptx and .xlsx files after a single doctor run.

Then run document conversion using the interpreter reported under VenvPython:. Always use the fixed command form. Give file paths only. Do not use inline code. Do not use pipes. The command must run in Windows PowerShell 5.1:

& "<venv-python-from-doctor>" "<skill-base-dir>/scripts/convert.py" --in "<abs.md>" --to pdf --template report --out "<abs.pdf>"

(On Linux/macOS: "<venv-python-from-doctor>" "<skill-base-dir>/scripts/convert.py" --in "<abs.md>" --to pdf --template report --out "<abs.pdf>")

Images, Charts and Diagrams

Output Contract & Verification

The script enforces an explicit output contract on every execution:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.