मुख्य सामग्री पर जाएँ
Skillpedia
PDF, Word और स्लाइड37k · #7576

docx

यह क्या करती है

यह स्किल AI एजेंट को Microsoft Word फ़ाइलों के साथ काम करने देती है। यह उन सभी के लिए है जिन्हें Word दस्तावेज़ बनवाना, बदलवाना या पढ़वाना है।

कब इस्तेमाल करें

  • ✓जब आपको हेडिंग, टेबल या पेज नंबर वाला नया Word दस्तावेज़ चाहिए।
  • ✓जब आपको मौजूदा .docx फ़ाइल को संपादित करना या उससे सामग्री निकालनी हो।
  • ✓जब आप Word फ़ाइल में ट्रैक्ड बदलाव या टिप्पणियों के साथ काम करना चाहें।

Skill का लिंक

https://github.com/agentscope-ai/QwenPaw/blob/main/src/qwenpaw/agents/skills/docx-en/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/agentscope-ai/QwenPaw/blob/main/src/qwenpaw/agents/skills/docx-en/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इन मीटिंग नोट्स को विषय-सूची वाले फ़ॉर्मेटेड Word दस्तावेज़ में बदलिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह Word फ़ाइल को XML हिस्सों के समूह के रूप में पढ़ती है और सीधे संपादित करती है, या डॉक्यूमेंट बिल्डर से नई फ़ाइल बनाती है। यह पुरानी फ़ाइलों को बदल सकती है और सामान्य टूल से टेक्स्ट या PDF निर्यात कर सकती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Important: All scripts/ paths are relative to this skill directory. Run with: cd {this_skill_dir} && python scripts/... Or use the cwd parameter of execute_shell_command.

DOCX creation, editing, and analysis

Prerequisites

  • docx (npm install -g docx): new document creation
  • LibreOffice (soffice): .doc -> .docx conversion, tracked-changes acceptance, and PDF export
  • pandoc: text extraction
  • pdftoppm (poppler-utils): document-to-image workflows
  • If pdftoppm is unavailable, a Python fallback path may use pdf2image.
  • On Windows, dependencies must be installed and available in PATH; if missing, report the dependency issue and stop (do not keep retrying).

Overview

A .docx file is a ZIP archive containing XML files.

Quick Reference

Task Approach
Read/analyze content pandoc or unpack for raw XML
Create new document Use docx-js - see Creating New Documents below
Edit existing document Unpack → edit XML → repack - see Editing Existing Documents below

Converting .doc to .docx

Legacy .doc files must be converted before editing:

python scripts/office/soffice.py --headless --convert-to docx document.doc

Reading Content

# Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md

# Raw XML access
python scripts/office/unpack.py document.docx unpacked/

Converting to Images

python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page

Accepting Tracked Changes

To produce a clean document with all tracked changes accepted (requires LibreOffice):

python scripts/accept_changes.py input.docx output.docx

Creating New Documents

Generate .docx files with JavaScript, then validate. Install: npm install -g docx

Setup

const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, ImageRun,
        Header, Footer, AlignmentType, PageOrientation, LevelFormat, ExternalHyperlink,
        TableOfContents, HeadingLevel, BorderStyle, WidthType, ShadingType,
        VerticalAlign, PageNumber, PageBreak } = require('docx');

const doc = new Document({ sections: [{ children: [/* content */] }] });
Packer.toBuffer(doc).then(buffer => fs.writeFileSync("doc.docx", buffer));

Validation

After creating the file, validate it. If validation fails, unpack, fix the XML, and repack.

python scripts/office/validate.py doc.docx

Page Size

// CRITICAL: docx-js defaults to A4, not US Letter
// Always set page size explicitly for consistent results
sections: [{
  properties: {
    page: {
      size: {
        width: 12240,   // 8.5 inches in DXA
        height: 15840   // 11 inches in DXA
      },
      margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 } // 1 inch margins
    }
  },
  children: [/* content */]
}]

Common page sizes (DXA units, 1440 DXA = 1 inch):

Paper Width Height Content Width (1" margins)
US Letter 12,240 15,840 9,360
A4 (default) 11,906 16,838 9,026

Landscape orientation: docx-js swaps width/height internally, so pass portrait dimensions and let it handle the swap:

size: {
  width: 12240,   // Pass SHORT edge as width
  height: 15840,  // Pass LONG edge as height
  orientation: PageOrientation.LANDSCAPE  // docx-js swaps them in the XML
},
// Content width = 15840 - left margin - right margin (uses the long edge)

Styles (Override Built-in Headings)

Use Arial as the default font (universally supported). Keep titles black for readability.

const doc = new Document({
  styles: {
    default: { document: { run: { font: "Arial", size: 24 } } }, // 12pt default
    paragraphStyles: [
      // IMPORTANT: Use exact IDs to override built-in styles
      { id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", quickFormat: true,
        run: { size: 32, bold: true, font: "Arial" },
        paragraph: { spacing: { before: 240, after: 240 }, outlineLevel: 0 } }, // outlineLevel required for TOC
      { id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
        run: { size: 28, bold: true, font: "Arial" },
        paragraph: { spacing: { before: 180, after: 180 }, outlineLevel: 1 } },
    ]
  },
  sections: [{
अक्सर पूछे जाने वाले सवाल

क्या इसे अतिरिक्त सॉफ़्टवेयर चाहिए?

हाँ। इसे docx, LibreOffice और pandoc जैसे टूल इंस्टॉल और सिस्टम पाथ में उपलब्ध चाहिए।

क्या यह पुरानी .doc फ़ाइलें संभाल सकती है?

हाँ। पुरानी .doc फ़ाइलें पहले LibreOffice से .docx में बदली जाती हैं।

क्या यह PDF के साथ काम करती है?

नहीं। PDF के काम एक अलग स्किल सँभालती है।

जानकारी

लेखक का मूल विवरण

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of \"Word doc\", \"word document\", \".docx\", 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 .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a \"report\", \"memo

repo: agentscope-ai/QwenPaw

लोकप्रियता

GitHub स्टार
37k
रैंकिंग में स्थान
#7576
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

terraform-skill

37k

यह आपके एजेंट को Terraform या OpenTofu इन्फ़्रास्ट्रक्चर कोड लिखने, टेस्ट करने और समीक्षा करने में मदद करती है, जिसमें मॉड्यूल, CI/CD, सुरक्षा स्कैन और स्टेट की समस्याएँ शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

computer_use

37k

यह आपके एजेंट को Windows या macOS ऐप को स्क्रीन देखकर, क्लिक करके और हर नतीजे की जाँच करके चलाने देती है, जब कोई सीधा टूल काम न कर सके।

AI और एजेंटएजेंट

browser

37k

यह आपके एजेंट को QwenPaw Browser SDK के ज़रिए असली वेब ब्राउज़र चलाने देती है, पेज पढ़ते, उन पर कार्रवाई करते और सफलता बताने से पहले नतीजे जाँचते हुए।

AI और एजेंटएजेंट

channel_message

37k

यह आपके एजेंट को सही गंतव्य मिलने के बाद किसी खास चैट चैनल या सेशन में एक-तरफ़ा संदेश भेजने देती है, जैसे काम पूरा होने की सूचना।

प्रोडक्टिविटीईमेल और मैसेज

मिलती-जुलती skills