AI Agent Hub
Back to skills
Word Text Style Cleaner icon

Word Text Style Cleaner

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md and install @user_fdb72718/word-style-cleaner.

About this skill

What It Solves

Word documents often accumulate unrelated style entries: heading 6-9, TOC1-TOC9, annotations, residual font styles, Excel import leftovers, and unused Title, Subtitle, or list paragraph styles. Removing them manually is slow and risks deleting Normal text, table, hyperlink, or actually referenced styles.

How It Works

Word Text Style Cleaner processes .docx files or folders through an unpack → analyze → clean → repack workflow. It scans document.xml for styles actually used in the document, then removes redundant entries using a default keep policy:
- Kept: Normal, Default Paragraph Font, heading 1-5, common table styles, No List, hyperlinks, header/footer styles.
- Removed: heading 6-9, TOC styles, annotation/comment styles, font5-font12, xl65-xl79, and other unused residual styles.

Boundaries and Notes

This is useful when the Word style panel is cluttered or when a document should keep only body text and headings. It overwrites the original file by default, so back it up first. If you need a narrower policy, such as keeping only heading 1-3, update the BASE_KEEP_IDS set in the script. Also adjust the top-level constants if the paths to unpack.py or pack.py change.

Use Cases

  • When receiving legacy Word documents with a cluttered style panel, quickly keep only Normal and headings 1-5.
  • Before delivery, batch-process multiple .docx files in a folder to remove TOC, comments, and Excel import leftovers.
  • When customer files mix unused Title, Subtitle, and font5 styles, clean them by the keep policy and overwrite.
  • When preparing report decks, keep only body text, headings 1-5, tables, and hyperlinks to avoid noisy styles.

Best For

  • Consulting consultants delivering Word reports: want to remove unrelated styles from templates and historical documents.
  • Administrative or operations staff maintaining document standards: need to batch-simplify .docx style panels.
  • Engineers preparing report materials: want to keep only body text, headings, tables, and hyperlinks.
  • Document administrators: clean TOC, comments, and residual styles from customer or legacy Word files.