python-docx-style-id-mismatch
CommunityFix Word styles in python-docx
Software Engineering#document generation#python-docx#word styles#OxmlElement#style mapping#section breaks
Authorhubeiqiao
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill resolves issues where paragraphs in Word documents created with python-docx's OxmlElement API incorrectly default to the "Normal" style, even when a specific style like "Heading 2" is set. It also addresses the loss of section breaks during paragraph removal.
Core Features & Use Cases
- Correct Style Application: Ensures paragraphs created via
OxmlElementuse the intended styles by mapping display names to their correct XML IDs. - Preserve Section Breaks: Prevents the accidental deletion of section breaks when removing paragraphs.
- Use Case: When programmatically generating reports or documents with python-docx, this Skill guarantees that headings and other styled text appear correctly, and that document structure (like page numbering restarts) is maintained.
Quick Start
Use the python-docx-style-id-mismatch skill to fix style ID issues when creating a 'Heading 2' paragraph with OxmlElement.
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: python-docx-style-id-mismatch Download link: https://github.com/hubeiqiao/skills/archive/main.zip#python-docx-style-id-mismatch Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.