AI Agent Hub
Back to skills
BooAI DOCX Outline Extraction icon

BooAI DOCX Outline Extraction

Office Efficiency Updated 2026.08.29

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 outlineLvl nor 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