docx
Skill8 starsChanged 3 months agoApache-2.0View on GitHub
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. This skill should be used when Cline needs to work with professional documents (.docx files) for creating new documents, modifying or editing content, working with tracked changes, adding comments, or any other document tasks.
- Installs packages
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 189 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use "Text extraction" or "Raw XML access" sections below
- Distinctive: line 18
Use "Creating a new Word document" workflow
- Distinctive: line 29
If you just need to read the text contents of a document, convert the document to markdown using pandoc:
- Distinctive: line 61
When creating a new Word document from scratch, use docx-js, which allows you to create Word documents using JavaScript/TypeScript.
- Distinctive: line 65
Create a JavaScript/TypeScript file using Document, Paragraph, TextRun components
- Distinctive: line 104
When editing an existing Word document, work with the underlying XML directly.
- Distinctive: line 140
When implementing tracked changes, only mark text that actually changes.
- Distinctive: line 201
IMPORTANT: When generating code for DOCX operations:
- Distinctive: line 203
Avoid verbose variable names and redundant operations
- Distinctive: line 204
Avoid unnecessary print statements
“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DOCX Creation, Editing, and Analysis
Overview
A user may ask Cline to create, edit, or analyze the contents of a .docx file. A .docx file is essentially a ZIP archive containing XML files and other resources that can be read or edited. Different tools and workflows are available for different tasks.
Workflow Decision Tree
Reading/Analyzing Content
Use "Text extraction" or "Raw XML access" sections below
Creating New Document
Use "Creating a new Word document" workflow
Editing Existing Document
- Own document + simple changes → Use "Basic OOXML editing" workflow
- Someone else's document → Use "Redlining workflow" (recommended default)
- Legal, academic, business, or government docs → Use "Redlining workflow" (required)
Reading and Analyzing Content
Text Extraction
If you just need to read the text contents of a document, convert the document to markdown using pandoc:
# Convert document to markdown with tracked changes
pandoc --track-changes=all path-to-file.docx -o output.md
# Options: --track-changes=accept/reject/allRaw XML Access
Raw XML access is needed for: comments, complex formatting, document structure, embedded media, and metadata. Unpack the document to read its raw XML contents.
Unpacking a File
# Unpack using Python zipfile
python3 -c "
import zipfile
with zipfile.ZipFile('document.docx') as z:
z.extractall('unpacked/')
"Key File Structures
word/document.xml— Main document contentsword/comments.xml— Comments referenced in document.xmlword/media/— Embedded images and media files- Tracked changes use
<w:ins>(insertions) and<w:del>(deletions) tags
Creating a New Word Document
When creating a new Word document from scratch, use docx-js, which allows you to create Word documents using JavaScript/TypeScript.
Workflow
- Create a JavaScript/TypeScript file using Document, Paragraph, TextRun components
- Export as .docx using Packer.toBuffer()
Example
const { Document, Packer, Paragraph, TextRun, HeadingLevel } = require("docx");
const fs = require("fs");
const doc = new Document({
sections: [{
properties: {},
children: [
new Paragraph({
text: "Report Title",
heading: HeadingLevel.HEADING_1,
}),
new Paragraph({
children: [
new TextRun("This is the body text of the document."),
],
}),
],
}],
});
Packer.toBuffer(doc).then((buffer) => {
fs.writeFileSync("output.docx", buffer);
});Dependencies
npm install docxEditing an Existing Word Document
When editing an existing Word document, work with the underlying XML directly.
Workflow
- Unpack the document using Python zipfile
- Modify the XML in
word/document.xml - Repack the document
Unpack/Repack Pattern
import zipfile
import os
# Unpack
with zipfile.ZipFile('document.docx') as z:
z.extractall('unpacked/')
# ... Edit files in unpacked/ ...
# Repack
with zipfile.ZipFile('output.docx', 'w', zipfile.ZIP_DEFLATED) as zout:
for root, dirs, files in os.walk('unpacked/'):
for file in files:
file_path = os.path.join(root, file)
arcname = os.path.relpath(file_path, 'unpacked/')
zout.write(file_path, arcname)Redlining Workflow for Document Review
This workflow creates comprehensive tracked changes using OOXML. CRITICAL: For complete tracked changes, implement ALL changes systematically.
Batching Strategy: Group related changes into batches of 3-10 changes. This makes debugging manageable while maintaining efficiency. Test each batch before moving to the next.
Principle: Minimal, Precise Edits When implementing tracked changes, only mark text that actually changes. Break replacements into: [unchanged text] + [deletion] + [insertion] + [unchanged text].
Example — Changing "30 days" to "60 days":
<!-- BAD - Replaces entire sentence -->
<w:del><w:r><w:delText>The term is 30 days.</w:delText></w:r></w:del>
<w:ins><w:r><w:t>The term is 60 days.</w:t></w:r></w:ins>
<!-- GOOD - Only marks what changed -->
<w:r w:rsidR="00AB12CD"><w:t>The term is </w:t></w:r>
<w:del><w:r><w:delText>30</w:delText></w:r></w:del>
<w:ins><w:r><w:t>60</w:t></w:r></w:ins>
<w:r w:rsidR="00AB12CD"><w:t> days.</w:t></w:r>Tracked Changes Workflow
- Get markdown representation:
pandoc --track-changes=all path-to-file.docx -o current.md - Identify and group changes: Review the document and identify ALL changes needed, organizing them into logical batches
- Unpack and modify:
python3 -c " import zipfile with zipfile.ZipFile('document.docx') as z: z.extractall('unpacked/') " - Implement changes in batches: Group changes logically and implement them together in a single script per batch
- Repack the document:
python3 repack.py unpacked/ reviewed-document.docx - Final verification:
pandoc --track-changes=all reviewed-document.docx -o verification.md
Converting Documents to Images
To visually analyze Word documents, convert them to images:
- Convert DOCX to PDF:
soffice --headless --convert-to pdf document.docx - Convert PDF pages to JPEG images:
pdftoppm -jpeg -r 150 document.pdf page
Code Style Guidelines
IMPORTANT: When generating code for DOCX operations:
- Write concise code
- Avoid verbose variable names and redundant operations
- Avoid unnecessary print statements
Dependencies
Required dependencies (install if not available):
- pandoc:
sudo apt-get install pandoc(for text extraction) - docx:
npm install docx(for creating new documents) - LibreOffice:
sudo apt-get install libreoffice(for PDF conversion) - Poppler:
sudo apt-get install poppler-utils(for pdftoppm)
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 63
- netease-youdao/LobsterAI★ 6.2k29% same
- jjyaoao/HelloAgents★ 3.2k16% same
- anthropics/claude-agent-sdk-demos★ 2.8k35% same
- freestylefly/wesight★ 94135% same
- Chen-zexi/open-ptc-agent★ 72935% same
- tomascupr/sandstorm★ 44735% same
- zephyrwang6/myskill★ 33935% same
- xuzeyu91/WebCode★ 27835% same
- pheuter/claude-agent-desktop★ 21135% same
- ImGoodBai/goodable★ 19534% same
53 more not listed
Wrote their own version · 131
- anthropics/skills★ 186ksame name
- spinabot/brigade★ 11ksame name
- OpenBMB/PilotDeck★ 4.5ksame name
- nextlevelbuilder/goclaw★ 3.7ksame name
- K-Dense-AI/claude-scientific-writer★ 2.4ksame name
- OpenCoworkAI/open-cowork★ 2.2ksame name
- ChenglinPoly/infiAgent★ 1.2ksame name
- polyuiislab/infiAgent★ 1.2ksame name
- melandlabs/openloomi★ 1ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
121 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use gift-evaluator, Podcast Generate and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dav-niu474Skillgift-evaluator
The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.
Also in 5 projects that use this
dav-niu474SkillPodcast Generate
Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).
Also in 5 projects that use this
huang-x-hSkillVideo Generation
Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.
Also in 6 projects that use this
huang-x-hSkillVLM
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.
Also in 6 projects that use this
SeifBenayedSkillfile-reading
Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.
Also in 5 projects that use this
SeifBenayedSkillpdf-reading
Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.
Also in 6 projects that use this
- +1 more from huang-x-h
- +5 more from dav-niu474
In this repository49 other files it gives its agents.
- a-b-testingSkill
- api-devSkill
- article-extractorSkill
- audio-genSkill
- blog-writerSkill
- brainstormingSkill
- brand-guidelinesSkill
- canvas-designSkill
- changelog-generatorSkill
- code-refactorerSkill
- competitive-ads-extractorSkill
- content-research-writerSkill
- database-managerSkill
- docker-deploySkill
- domain-name-brainstormerSkill
- email-campaignsSkill
- finishing-a-development-branchSkill
- game-devSkill
- git-pushingSkill
- git-workflowSkill
- godot-helperSkill
- image-enhancerSkill
- ios-simulator-skillSkill
- langsmith-fetchSkill
- lead-research-assistantSkill
- lean-ctxSkill
- mcp-builderSkill
- meeting-insights-analyzerSkill
- pdfSkill
- playwright-skillSkill
- pptxSkill
- react-nextjs-builderSkill
- review-implementingSkill
- seo-optimizerSkill
- ship-learn-nextSkill
- skill-creatorSkill
- skill-builderSkill
- social-media-managerSkill
- staff-engineer-reviewSkill
- tailored-resume-generatorSkill
- test-driven-developmentSkill
- test-fixingSkill
- twitter-algorithm-optimizerSkill
- using-git-worktreesSkill
- video-framesSkill
- webapp-testingSkill
- xlsxSkill
- youtube-transcriptSkill
- your-skill-nameSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

