docx
यह क्या करती है
इस टूल से आप Word दस्तावेज़ (.docx) बना, पढ़ और बदल सकते हैं, और उन्हें व्यवस्थित कर सकते हैं। आप इसकी मदद से प्रोफेशनल रिपोर्ट, पत्र, या कोई भी ऐसा दस्तावेज़ बना सकते हैं जिसमें खास फॉर्मेटिंग चाहिए।
कब इस्तेमाल करें
- ✓खास फॉर्मेटिंग के साथ नया Word दस्तावेज़ बनाते समय।
- ✓मौजूदा Word दस्तावेज़ में कंटेंट जोड़ने या हटाने के लिए उसे बदलते समय।
- ✓Word दस्तावेज़ से जानकारी निकालकर उसे किसी दूसरे फॉर्मेट में लाते समय।
Skill का लिंक
https://github.com/anthropics/skills/blob/main/skills/docx/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“एक मासिक रिपोर्ट बनाओ जिसमें टेबल ऑफ कंटेंट, पेज नंबर और कंपनी के लोगो वाला हेडर हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल Word दस्तावेज़ (.docx) की अंदरूनी फाइलों के साथ काम करता है, जो टेक्स्ट और फॉर्मेटिंग के पैकेज जैसी होती हैं। यह कंटेंट पढ़ सकता है, फाइल में सीधे बदलाव कर सकता है, या निर्देशों के आधार पर नए दस्तावेज़ बना सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
DOCX creation, editing, and analysis
A .docx is a ZIP archive of XML files. Choose your approach by task:
| Task | Approach |
|---|---|
| Create a new document | Write a docx (npm) script — see gotchas below |
| Edit an existing document | unzip → edit word/document.xml → zip (docx-js cannot open existing files) |
| Read content | pandoc -t markdown file.docx |
Script paths below are relative to this skill's directory.
Creating with docx-js — gotchas
docx is preinstalled — do not run npm install first; write the script and require('docx') directly. Only if that require fails: npm install docx. The model knows the API; these are the footguns:
- Page size defaults to A4. For US Letter set
page: { size: { width: 12240, height: 15840 } }(DXA; 1440 = 1″). - Landscape: pass portrait dimensions and
orientation: PageOrientation.LANDSCAPE— docx-js swaps width/height internally. - Tables need dual widths: set
columnWidthson the table ANDwidthon every cell, both inWidthType.DXA(PERCENTAGE breaks in Google Docs). Column widths must sum to the table width. - Table shading: use
ShadingType.CLEAR, neverSOLID(renders black). - Lists: never insert
•literally; use anumberingconfig withLevelFormat.BULLET. ImageRunrequirestype:("png","jpg", …).PageBreakmust be inside aParagraph.- Never use
\n— use separateParagraphelements. - TOC: headings must use built-in
HeadingLevel.*; custom heading styles needoutlineLevelset or they won't appear. - Don't use a table as a horizontal rule — use a paragraph bottom border instead.
- Dot-leader / right-aligned-on-same-line: use
PositionalTab(alignment: PositionalTabAlignment.RIGHT,leader: PositionalTabLeader.DOT) inside aTextRun, not literal.or space padding.
Verify the output
After writing a .docx, render it and look at it:
python scripts/office/soffice.py --headless --convert-to pdf output.docx
pdftoppm -jpeg -r 100 output.pdf page
ls page-*.jpg # then Read the images
pdftoppm zero-pads page numbers to the width of the page count (page-01.jpg…page-12.jpg).
Editing existing documents
Legacy .doc files must be converted first: python scripts/office/soffice.py --headless --convert-to docx file.doc.
unzip -q doc.docx -d unpacked/
find unpacked -type l -delete # strip symlink entries — docx from external parties is untrusted
python scripts/merge_runs.py unpacked/ # coalesce fragmented runs so text is findable
# edit unpacked/word/document.xml in place — do NOT reformat or pretty-print
(cd unpacked && rm -f ../out.docx && zip -Xr ../out.docx .)
python scripts/office/validate.py out.docx --original doc.docx # XSD checks; --auto-repair fixes common issues
# redlining? add --author "<the name you redlined under>" to check every edit is tracked
Word splits text across many <w:r> runs (revision ids, spell-check markers), so a phrase you can see in the document often doesn't exist as a contiguous string in the XML. merge_runs.py merges adjacent identically-formatted runs in word/document.xml without changing content or rendering; it also accepts a .docx directly (python scripts/merge_runs.py doc.docx -o merged.docx).
Tracked changes: when redlining, validate with --author "<the name you redlined under>" (needs --original) — it reports any text you changed without a <w:ins>/<w:del> around it, which is easy to do by accident and invisible in the accepted view. Wrap runs in <w:ins>/<w:del> with w:id, w:author, w:date attributes. Inside <w:del>, the text element is <w:delText>, not <w:t>. A deleted paragraph mark (<w:pPr><w:rPr><w:del w:id=".." w:author=".." w:date=".."/></w:rPr></w:pPr>) means "merge this paragraph into the next" — so deleting a paragraph outright is that plus a <w:del> around every run. The <w:del/> must come before the rPr's other children; their order is schema-enforced.
To produce a clean copy with all tracked changes accepted: python scripts/accept_changes.py in.docx out.docx.
…
अक्सर पूछे जाने वाले सवाल
यह टूल टेबल को कैसे संभालता है?
टेबल के लिए आपको हर कॉलम और हर सेल की चौड़ाई तय करनी होती है। इसके लिए टूल DXA नाम का फॉर्मेट इस्तेमाल करता है। ज़रूरी है कि सभी कॉलम की चौड़ाई का जोड़ पूरी टेबल की चौड़ाई के बराबर हो।
क्या मैं इमेज जोड़ सकता हूँ?
हाँ, लेकिन इमेज जोड़ते समय आपको उसका फाइल टाइप बताना होता है, जैसे 'png' या 'jpg'।
बुलेट वाली लिस्ट कैसे बनती है?
बुलेट लिस्ट बनाने के लिए '•' चिन्ह सीधे नहीं लिखना चाहिए। इसके बजाय टूल 'numbering' नाम की खास सेटिंग इस्तेमाल करता है, ताकि लिस्ट सही तरीके से फॉर्मेट हो।
जानकारी
लेखक का मूल विवरण
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .
repo: anthropics/skills
लोकप्रियता
- GitHub स्टार
- 181k
- रैंकिंग में स्थान
- #642
- लाइसेंस
- —
- अपडेट की गई
- 9/10/2026
कमेंट
- …
इस repository की और skills
academy-guide
181kयह आपके एजेंट को Claude सीखने के लिए courses और tutorials सुझाने देता है। Claude या उसके products के इस्तेमाल के बारे में सवाल हों, तब उपयोगी है।
algorithmic-art
181kयह आपके एजेंट को code से कला बनाने में मदद करता है और unique images तैयार करता है। जब आपको original computer-generated art चाहिए, तब यह काम आता है।
brand-guidelines
181kआपके एजेंट को Anthropic के ब्रांड कलर और विज़ुअल स्टाइल को मटेरियल पर लगाने देता है। अलग-अलग प्रोजेक्ट्स में कंपनी की विज़ुअल पहचान बनाए रखने के लिए यह उपयोगी है।
canvas-design
181kयह आपके एजेंट को files में सुंदर visual art बनाने में मदद करता है। poster, art या किसी भी static design की माँग हो, तब यह काम आता है।
मिलती-जुलती skills
feishu-doc
394kयह आपके एजेंट को document टूल से Feishu क्लाउड दस्तावेज़ पढ़ने, बनाने और बदलने में मदद करती है, जिसमें टेक्स्ट, इमेज और टेबल शामिल हैं।
feishu-drive
394kयह आपके एजेंट को बॉट के साथ साझा किए गए Feishu क्लाउड फ़ोल्डर में फ़ाइलें देखने, व्यवस्थित करने और उन पर टिप्पणी करने देती है।
feishu-perm
394kयह आपके एजेंट को Feishu फ़ाइल तक किसकी पहुंच है, यह जांचने और बदलने देती है, और आपके अनुरोध के लिए सबसे छोटी अनुमति चुनती है।