docx
यह क्या करती है
यह स्किल Microsoft Word फ़ाइलों को संभालती है, उनका ढाँचा पढ़ने से लेकर उन्हें बदलने और नई फ़ाइलें बनाने तक। यह उन सबके लिए है जिन्हें Word दस्तावेज़ बदलना या बनाना है और उसकी स्टाइल सुरक्षित रखनी है।
कब इस्तेमाल करें
- ✓जब आपके पास Word फ़ाइल हो और उसका टेक्स्ट या ढाँचा निकालना हो।
- ✓जब आपको Word दस्तावेज़ बदलना हो और उसकी स्टाइल व लेआउट वैसे ही रखने हों।
- ✓जब आपको एक ब्रीफ़ से नया Word दस्तावेज़ बनवाना हो।
Skill का लिंक
https://github.com/TokenRhythm/opensquilla/blob/main/src/opensquilla/skills/bundled/docx/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप इस Word अनुबंध में कीमतें अपडेट कर सकते हैं और फ़ॉर्मेटिंग वैसी ही रख सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट पहले फ़ाइल का ढाँचा देखता है कि उसमें क्या है, फिर सामग्री को उसी जगह बदलता है ताकि स्टाइल और लेआउट वैसे रहें। नए दस्तावेज़ के लिए वह आपकी ब्रीफ़ से फ़ाइल बनाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
docx
Work with Microsoft Word .docx files. The format is OOXML — a zip container
holding XML parts (word/document.xml, styles.xml, numbering.xml, headers,
footers, relationships). Treat structure as primary; rendered text is a view.
Decide the path first
Pick one path up front. The right path depends only on what is on disk before you start.
| You have | Goal | Path |
|---|---|---|
Existing .docx |
Read text/structure | A. Inspect |
Existing .docx |
Modify content while keeping styles | B. Edit-in-place |
| Nothing or a brief | Build a new doc | C. Create from scratch |
If the user hands you a doc and asks for changes, default to path B and treat the input as the visual style baseline. Only choose path C when the user says "start fresh" or there is no input.
Path A: Inspect
Dump structure as JSON for inspection without mutating anything.
python {baseDir}/scripts/inspect_docx.py /path/to/doc.docx
Output schema:
{
"paragraphs": [{"index": 0, "text": "...", "style": "Heading 1"}, ...],
"tables": [[["row0,col0", "row0,col1"], ...], ...],
"sections": 1,
"has_tracked_changes": false
}
Use this whenever you need to see what is in the doc before deciding how to edit. The output is stable and machine-readable — diff two inspect outputs to verify a round-trip preserved everything you intended.
Path B: Edit in place
Two sub-strategies; pick by how invasive the edit is.
B1. Run-level text replacement (preferred)
When the change is "swap this string" or "fill these placeholders": mutate runs in place. This preserves all theme/style/font settings.
python {baseDir}/scripts/edit_docx.py input.docx ops.json --out output.docx
ops.json is a list of operations:
[
{"op": "replace_run", "para": 0, "run": 0, "text": "Q3 Review"},
{"op": "replace_text", "find": "{{CLIENT}}", "with": "Acme Corp"}
]
Edit at the run level, not the paragraph level — replacing whole paragraph text drops formatting. If a placeholder spans multiple runs (often happens when the original template applied bold/italic mid-word), the helper script collapses runs into the first one and clears the rest.
B2. Structural edits (sections / page layout / numbering)
python-docx exposes paragraphs, tables, and runs but has limited support for
page layout, numbering definitions, and tracked changes. For those, unzip the
.docx, patch word/document.xml and adjacent parts, and repack:
mkdir _unpacked && (cd _unpacked && unzip -q ../input.docx)
# edit _unpacked/word/document.xml
(cd _unpacked && zip -q -r ../output.docx . -x "*.DS_Store")
Rules when patching XML:
- Use
defusedxml.ElementTreeorlxml, not stdlibxml.etree.ElementTree. ET drops or rewrites namespace prefixes (w:,r:) in ways Word refuses to load. - Preserve
xml:space="preserve"on<w:t>elements that hold leading or trailing whitespace. [Content_Types].xmlmust list every part type. Removing a header without also removing its override entry yields a "repair" prompt in Word.- Numbering definitions live in
numbering.xml; bullet/number changes must patch the numbering ID, not just the visible text.
When done, validate by opening in LibreOffice headless before declaring success — silent failures are common.
Path C: Create from scratch
For a simple Markdown source, run the export script with the Markdown on stdin:
python {baseDir}/scripts/export_markdown_docx.py --out out.docx < draft.md
For structured content, use a JSON specification:
python {baseDir}/scripts/create_docx.py spec.json --out out.docx
spec.json describes content declaratively:
{
"metadata": {"title": "Q3 Review", "author": "Wei E."},
"body": [
{"kind": "heading", "level": 1, "text": "Q3 Review"},
{"kind": "paragraph", "text": "Revenue +18% YoY."},
{"kind": "table", "rows": [["Metric", "Value"], ["Revenue", "$2.1M"]]}
]
}
For programmatic use call python-docx directly:
from docx import Document
doc = Document()
doc.add_heading("Q3 Review", level=1)
doc.add_paragraph("Revenue +18% YoY.")
table = doc.add_table(rows=2, cols=2)
table.rows[0].cells[0].text = "Metric"
doc.save("out.docx")
See references/python_docx.md for paragraphs, styles, numbering, tables, headers/footers, and section breaks.
Tracked changes
Tracked changes are stored in `word/document
अक्सर पूछे जाने वाले सवाल
क्या यह मेरी फ़ॉर्मेटिंग रखेगा?
हाँ। बदलाव के समय यह मौजूदा फ़ाइल को स्टाइल का आधार मानकर उसे बनाए रखता है।
क्या यह ट्रैक्ड बदलाव संभाल सकता है?
हाँ। स्किल Word फ़ाइल में ट्रैक्ड बदलावों की समीक्षा को कवर करती है।
अगर मुझे नई फ़ाइल चाहिए तो?
अगर आप नई शुरुआत करने को कहें या कोई इनपुट फ़ाइल न हो, तो स्किल नया दस्तावेज़ बनाती है।
जानकारी
लेखक का मूल विवरण
Read, inspect, edit, or create Microsoft Word `.docx` documents, including structured text extraction, style-preserving edits, tracked-change review, and generation from a brief.
repo: TokenRhythm/opensquilla
लोकप्रियता
- GitHub स्टार
- 7.1k
- रैंकिंग में स्थान
- #13588
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
browser-use
7.1kयह आपके एजेंट को OpenSquilla Desktop के साइडबार ब्राउज़र में वेब पेज खोलने, पढ़ने और चलाने देती है, जिसमें फ़ॉर्म और विज़ुअल जाँच शामिल हैं।
deep-research
7.1kयह आपके एजेंट को सहेजी गई योजना, ट्रैक किए गए स्रोतों और उद्धरणों वाली लंबी रिपोर्ट के साथ कई दौर का गहन शोध करना सिखाती है।
html-coder
7.1kयह आपके एजेंट को सुलभ फ़ॉर्म और HTML5 फ़ीचर वाले साफ़ HTML पेज लिखने और उन्हें वेब प्रीव्यू में खोलने में मदद करती है।
pdf-toolkit
7.1kयह आपके एजेंट को PDF से टेक्स्ट और टेबल निकालने, उन्हें जोड़ने या बाँटने, फ़ॉर्म फ़ील्ड भरने और डेटा से नई PDF बनाने में मदद करती है।
मिलती-जुलती skills
feishu-doc
394kयह आपके एजेंट को document टूल से Feishu क्लाउड दस्तावेज़ पढ़ने, बनाने और बदलने में मदद करती है, जिसमें टेक्स्ट, इमेज और टेबल शामिल हैं।
feishu-drive
394kयह आपके एजेंट को बॉट के साथ साझा किए गए Feishu क्लाउड फ़ोल्डर में फ़ाइलें देखने, व्यवस्थित करने और उन पर टिप्पणी करने देती है।
feishu-perm
394kयह आपके एजेंट को Feishu फ़ाइल तक किसकी पहुंच है, यह जांचने और बदलने देती है, और आपके अनुरोध के लिए सबसे छोटी अनुमति चुनती है।