/paper-office:docxfrom paper-office
Reads, edits, and creates Microsoft Word .docx files using paper-docx (extends python-docx). Supports inspection, guarded edits, review structures, composition, diffs, and byte-preserving saves.
Ships in paper-office. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
paper-docx is an upgraded distribution of python-docx. It keeps the familiar import and ordinary API:
from docx import Document
document = Document(source_path)
Use your existing knowledge of python-docx for normal paragraphs, runs, styles, tables, sections, pictures, headers, and footers. The fork adds public APIs where ordinary python-docx is weak: finding text across fragmented runs and document stories, editing revisions and review structures, targeting bookmarks/fields/content controls, composing documents, inspecting package changes, and refusing operations it cannot perform safely.
paper-docx provides the docx import.
The Paper API companion maps Paper-specific capabilities to their public symbols. The generated API reference covers the complete public API, including the surface inherited from python-docx, with one page per module. It is large; search by symbol and read only the relevant section.
Check for paper-docx with python -m pip show paper-docx. If missing, use an activated virtual environment and follow the package README install commands:
python -m pip uninstall -y python-docx paper-docx
python -m pip install paper-docx
python -m paper_docx_doctor
Use the same python for checks, installation, and scripts; activate the venv in the agent's shell.
python-docx and paper-docx both provide the docx import. Do not install them together.
Run python -m paper_docx_doctor again if imports fail or the environment changes.
Paper's targets are live. A successful text-changing replacement consumes its Span or Block; an Anchor is location evidence rather than a mutation target. Contextual ranking is inspection-only.
Opening a document can refuse. paper-docx validates the package on intake and rejects an archive with more than one reading, so a hand-rezipped or tool-mangled file may raise MalformedPackageError where upstream python-docx opened it. Saving applies the same check to its own output. Report the refusal and its message rather than working around it; each such refusal matches what Word itself does with that file. Use docx.package.diagnose(path) to triage a file before opening it, since it reports rather than raises.
A docx.errors.PaperRefusal means paper-docx cannot guarantee the attempted operation through its guarded API. The concrete subclass and message identify the condition that caused the refusal; DocumentProtectedError has a documented override in acknowledge_protection(document). In rare cases an ordinary python-docx mutation or direct package editing may be appropriate when unguarded serialization is intentionally acceptable and its effects on the document's package and its revision, comment, and numbering structures are understood. Verify the resulting document carefully; the intake refusal above is not covered.
Precise ZIP/OOXML work is still available when it is genuinely the narrowest operation, the exact package member and schema are understood, and the edit does not cross an ownership boundary that Paper is protecting. Work on a separate candidate, preserve the source, and keep the changed-member budget explicit.
Document.save() uses ordinary serialization. docx.package.patch_save() retains the original bytes of unchanged package parts and returns change evidence.
references/api/api.md (opens in a new tab)references/api/blkcntnr.md (opens in a new tab)references/api/blocks.md (opens in a new tab)references/api/bookmarks.md (opens in a new tab)references/api/commentops.md (opens in a new tab)references/api/comments.md (opens in a new tab)references/api/composition.md (opens in a new tab)references/api/controls.md (opens in a new tab)references/api/dml.color.md (opens in a new tab)references/api/document.md (opens in a new tab)references/api/drawing.md (opens in a new tab)references/api/enum.base.md (opens in a new tab)references/api/enum.dml.md (opens in a new tab)references/api/enum.section.md (opens in a new tab)references/api/enum.shape.md (opens in a new tab)references/api/enum.style.md (opens in a new tab)references/api/enum.table.md (opens in a new tab)references/api/enum.text.md (opens in a new tab)references/api/errors.md (opens in a new tab)references/api/exceptions.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/pptxWork with Microsoft PowerPoint `.pptx` files using the installed `paper-pptx` distribution, which imports as `pptx` and extends `python-pptx` with inspection, guarded edits, composition, diffs, and package-preserving saves./xlsxWork with Excel `.xlsx` and `.xlsm` files using the installed `paper-xlsx` distribution, which imports as `openpyxl` and extends it with preservation-aware saves, guarded structural edits, recalculation helpers, diffs, and richer inspection.npx claudepluginhub paper-instruments/skills --plugin paper-officeOther plugins' skills for the same job