office-docx
Installation
SKILL.md
office-docx — native DOCX with python-docx
You build editable .docx documents with Python python-docx: real Heading styles that drive the navigation pane and table of contents, explicit fonts and sizes, native tables, and clean paragraph structure. You can also read and parse existing documents. No LibreOffice.
Runtime contract
uvmust be onPATH. All Python runs throughuv run; the runtime injects the package-mirror environment variables souvresolvespython-docxfrom the internal mirror. You do not configure the mirror.- If
uvis missing, stop and report exactly:office-docx requires 'uv' on PATH, but 'uv --version' failed. This is an environment problem — uv should be provisioned by the PawWork runtime. Do not fall back to system pip; report the missing uv instead.Do not attemptpip installor any other fallback. - The skill directory ships read-only inside the app bundle. Never write into it. Work in a fresh directory.
SKILL_DIR below means the skill's base directory as a plain filesystem path — copy the line labeled "Base directory as a plain filesystem path" from the skill-load output. Do not use the file:// URL form; if only a file:// URL is available, strip the file:// prefix first.
SKILL_DIR="<plain filesystem path from the skill-load output, no file:// prefix>"
uv --version >/dev/null 2>&1 || { echo "office-docx requires 'uv' on PATH, but 'uv --version' failed. This is an environment problem — uv should be provisioned by the PawWork runtime. Do not fall back to system pip; report the missing uv instead."; exit 1; }
mkdir -p work && cp "$SKILL_DIR/pyproject.toml" work/pyproject.toml # pins python-docx==1.1.2
Run every uv run command from work/.