Run3 Extract DOCX Content and Structure
[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.
npx -y skills add cxcscmu/SkillLearnBench --skill run3_Extract-DOCX-Content-and-StructureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Use this skill to extract text and structure from Word documents (.docx files) to determine their subject for classification into the correct folder.
SKILL.md
1.5 KB, as published. Nobody here has run it
When to use this skill
- When you need to read content from .docx files
- Before sorting Word documents into subject folders
- When document filenames are generic or unclear
How to extract DOCX content
Using python-docx
from docx import Document
def extract_docx_content(docx_path):
doc = Document(docx_path)
content = []
for para in doc.paragraphs:
if para.text.strip():
content.append(para.text)
# Also extract from tables if present
for table in doc.tables:
for row in table.rows:
for cell in row.cells:
if cell.text.strip():
content.append(cell.text)
return "\n".join(content)
Using markitdown
python -m markitdown input.docx > output.md
Key information to extract
- Document title/heading: Top of document (usually styled as heading)
- First paragraph: Introduces the document's main topic
- Section headers: Reveal subject areas covered
- Keywords and technical terms: Identify the subject domain
Subject indicators
- Use same keyword patterns as PDF and PPTX extraction
- Pay attention to document structure and headings
- Read first page thoroughly as it typically establishes the subject
Store extracted content
Retain the full text for subject classification analysis.