Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Use when the task involves reading, creating, or editing .docx documents, especially when formatting or layout fidelity matters; prefer python-docx plus the bundled scripts/render_docx.py for visual checks.
How to use
- Zainstaluj wymagane pakiety Pythona: uruchom
uv pip install python-docx pdf2image(lubpython3 -m pip install python-docx pdf2imagejeśli uv nie jest dostępne). 2. Zainstaluj narzędzia systemowe do renderowania: na macOS użyjbrew install libreoffice poppler, na Ubuntu/Debian uruchomsudo apt-get install -y libreoffice poppler-utils. 3. Aby odczytać lub edytować dokument, użyj python-docx do strukturalnych zmian (nagłówki, style, tabele, listy). Zapisz plik w kataloguoutput/doc/z opisową nazwą. 4. Po każdej znaczącej zmianie zweryfikuj wygląd wizualnie: jeśli dostępne sąsofficeipdftoppm, konwertuj DOCX na PDF, a następnie na obrazy PNG. Alternatywnie użyjscripts/render_docx.py(wymagapdf2imagei Poppler). 5. Jeśli narzędzia do renderowania nie są dostępne, wyodrębnij tekst za pomocą python-docx jako rezerwę, ale zwróć uwagę na ryzyko związane z layoutem. 6. Pliki tymczasowe przechowuj wtmp/docs/i usuń je po zatwierdzeniu dokumentu.