BooAI DOCX Outline Extraction
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_3c9003af/boo-ai-docx-outline.
About this skill
Problem
Outline data in .docx files is not always obvious. A paragraph’s outline level can come from the paragraph itself or from an inherited style. Searching only for names like “Heading 1” or “Heading 2” misses custom styles, migrated templates, and renamed style IDs. A more stable approach is to inspect document.xml and styles.xml for outlineLvl, then produce an outline that can be reviewed by hand.
How It Works
The skill treats .docx as an OOXML package and avoids python-docx or pandoc. The main steps are:
- parse styles.xml and map styleId values to outlineLvl
- walk paragraphs in document.xml, preferring the paragraph’s direct outline level over the inherited style value
- emit an indented outline for levels 0 through 8 and count paragraphs by level
- default to writing a _大纲目录.txt file next to the source document
Limits
- Paragraphs with neither a direct
outlineLvlnor an outline-bearing style are treated as body text and skipped - Styles without outline levels are not treated as headings
- The output relies on OOXML markup, so it does not infer headings from plain text
- Input and output use
UTF-8, which suits scripted structure checks
Use Cases
- Review Word templates before release to verify style outline inheritance.
- Generate indented text outlines from many .docx deliverables at once.
- Diagnose conflicts between direct paragraph outline levels and style values.
- Check OOXML outline markup with a dependency-free standard-library script.
Best For
- Technical writers validating heading hierarchy in delivered documents
- Product documentation engineers maintaining Word templates and style rules
- Office automation engineers batch-checking document structure
- Local tooling developers debugging OOXML field mappings
Related Skills
Turns files, references, or chat context into styled single-page HTML reports with built-in templates and preset themes.
An engineering-oriented email automation solution for batch sending, Jinja2 templates, attachments, scheduled sending, inbox monitoring, and rule-based auto-reply.
An engineering workflow for creating, editing, reviewing, analyzing, and image-converting .docx files using pandoc, docx-js, OOXML, and LibreOffice.
Pre-submission scanner for Word/PDF blind-bid files that checks margins, fonts, page numbers, and metadata against tender requirements and flags residual bidder identities.