word-analysis

Extract text, tables, highlights, and embedded images from Word documents.

5.3k|380|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/OpenSenseNova/SenseNova-Skills --skill word-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: word-analysis
Source: https://github.com/OpenSenseNova/SenseNova-Skills/tree/main/skills/sn-da-non-spreadsheet-analysis/capability/word-analysis
Command: npx skills add https://github.com/OpenSenseNova/SenseNova-Skills --skill word-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, pandas, lxml.

What problem does it solve?

Reading and analyzing Word (.docx/.doc) files programmatically is error-prone: tables get missed, highlight colors are invisible to naive parsers, and legacy .doc files fail to open. This Skill provides tested python-docx recipes that handle full-text extraction, structured table parsing, format-aware color detection, multi-file aggregation, and embedded image captioning.

Core Features & Use Cases

  • Full Text & Table Extraction: Iterate document body in order to capture paragraphs and tables, converting tables into pandas DataFrames.
  • Format-Aware Parsing: Read highlight colors and cell shading via XML-level access to answer questions like "find the yellow-highlighted rows".
  • Multi-File Aggregation & Image Captioning: Batch-process directories of Word files and extract embedded images for caption generation.
  • Use Case: Given a folder of contract drafts, extract all text, locate every yellow-highlighted clause, pull comparison tables into DataFrames, and summarize embedded chart images in one pass.

Quick Start

Analyze the attached Word document and extract all text, tables, and any yellow-highlighted content.

Frequently Asked Questions about word-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text and tables from a Word document in Python?

Use python-docx and iterate the document body in order, handling paragraph and table elements separately so tables are not skipped. Table rows can be loaded into pandas DataFrames using the first row as the header.

How to find highlighted text or colored cells in a docx file?

Highlight and shading colors live in the document XML, not the high-level API. Access w:highlight on runs and w:shd on table cells via python-docx's qn() helper to read values like 'yellow' or hex fills such as 'FFFF00'.

Can python-docx open old .doc files?

No, python-docx only supports the .docx format. Convert legacy .doc files to .docx first using libreoffice in headless mode, then load the converted file normally.

Why does my Word extraction miss tables or content?

Reading only doc.paragraphs skips tables entirely because they are separate body elements. Iterate over doc.element.body in document order and dispatch on the element tag to capture both paragraphs and tables.

How do I extract embedded images from a docx file?

A .docx file is a ZIP archive, so open it with zipfile and read entries under word/media/. Save each image to disk and optionally pass it to a captioning script to get text descriptions of charts or screenshots.