Logo: Docx

Docx

Organisatioun
sinaptik-ai
docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', '.docx', or requests to produce professional documents with headings, tables of contents, page numbers, or letterheads. Also use for extracting content from .docx files, working with tracked changes, or converting content into a polished Word document.

Iwwersiicht

Editeursinaptik-ai
Repositorystarpod
Skill-Nummdocx
Stären
80
Forks
20
Matgeliwwert Dateien
7
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 7 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    sinaptik-ai huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Docx an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/sinaptik-ai/starpod/tree/main/crates/starpod/skills/docx
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sinaptik-ai/starpod.git /tmp/starpod
mkdir -p .claude/skills
cp -r /tmp/starpod/crates/starpod/skills/docx .claude/skills/docx
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Docx an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Docx automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Docx net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

DOCX Skill

Quick Reference

TaskApproachScript
Read/extract textpython-docx or pandocSee below
Create new documentpython-docx (Python) or docx (Node.js)See below
Edit existingpython-docx load → modify → saveSee below
Edit XML directlyunpack → edit → packpython scripts/office/unpack.py doc.docx unpacked/
Add commentscomment.pypython scripts/comment.py unpacked/ 0 "text"
Accept tracked changesaccept_changes.pypython scripts/accept_changes.py in.docx out.docx
Convert .doc → .docxLibreOfficepython scripts/office/soffice.py --headless --convert-to docx doc.doc
Convert to PDFLibreOfficepython scripts/office/soffice.py --headless --convert-to pdf doc.docx

Reading Content

python-docx

python
from docx import Document

doc = Document("document.docx")
for para in doc.paragraphs:
    print(f"[{para.style.name}] {para.text}")

for table in doc.tables:
    for row in table.rows:
        print([cell.text for cell in row.cells])

pandoc (with tracked changes)

bash
pandoc --track-changes=all document.docx -o output.md

Creating New Documents with python-docx

Full document example

python
from docx import Document
from docx.shared import Inches, Pt, Cm, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT
from docx.enum.section import WD_ORIENT

doc = Document()

# Page setup (US Letter)
section = doc.sections[0]
section.page_width = Inches(8.5)
section.page_height = Inches(11)
section.top_margin = Inches(1)
section.bottom_margin = Inches(1)
section.left_margin = Inches(1)
section.right_margin = Inches(1)

# Default font
style = doc.styles['Normal']
font = style.font
font.name = 'Arial'
font.size = Pt(11)

# Title
title = doc.add_heading('Document Title', level=0)
title.alignment = WD_ALIGN_PARAGRAPH.CENTER

# Body text
doc.add_paragraph('Executive summary paragraph with key findings and recommendations.')

# Heading hierarchy
doc.add_heading('Section 1: Overview', level=1)
doc.add_paragraph('Section content goes here.')

doc.add_heading('1.1 Subsection', level=2)
doc.add_paragraph('Subsection details.')

doc.save('document.docx')

Lists

python
# Bullet list
doc.add_paragraph('First item', style='List Bullet')
doc.add_paragraph('Second item', style='List Bullet')

# Numbered list
doc.add_paragraph('Step one', style='List Number')
doc.add_paragraph('Step two', style='List Number')

# Nested bullets (indent level)
p = doc.add_paragraph('Sub-item', style='List Bullet 2')

Tables

python
table = doc.add_table(rows=4, cols=3)
table.style = 'Table Grid'
table.alignment = WD_TABLE_ALIGNMENT.CENTER

# Set column widths
for row in table.rows:
    row.cells[0].width = Inches(2)
    row.cells[1].width = Inches(3)
    row.cells[2].width = Inches(1.5)

# Header row
headers = ['Name', 'Description', 'Status']
for i, h in enumerate(headers):
    cell = table.rows[0].cells[i]
    cell.text = h
    for p in cell.paragraphs:
        p.runs[0].bold = True
    shading = cell._element.get_or_add_tcPr()
    from docx.oxml.ns import qn
    from lxml import etree
    shd = etree.SubElement(shading, qn('w:shd'))
    shd.set(qn('w:fill'), '333333')
    shd.set(qn('w:val'), 'clear')
    for p in cell.paragraphs:
        p.runs[0].font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)

# Data
data = [['Project A', 'Core platform rewrite', 'Active'],
        ['Project B', 'API integration', 'Planning'],
        ['Project C', 'Documentation update', 'Complete']]
for r, row_data in enumerate(data, 1):
    for c, val in enumerate(row_data):
        table.rows[r].cells[c].text = val

Images

python
doc.add_picture('chart.png', width=Inches(5))
last_paragraph = doc.paragraphs[-1]
last_paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER

Headers and footers

python
section = doc.sections[0]
header = section.header
header_para = header.paragraphs[0]
header_para.text = "Company Name"
header_para.style.font.size = Pt(9)

footer = section.footer
footer_para = footer.paragraphs[0]
footer_para.text = "Confidential"
footer_para.alignment = WD_ALIGN_PARAGRAPH.CENTER

Page breaks

python
doc.add_page_break()

Landscape sections

python
new_section = doc.add_section(WD_ORIENT.LANDSCAPE)
new_section.orientation = WD_ORIENT.LANDSCAPE
new_section.page_width = Inches(11)
new_section.page_height = Inches(8.5)

Editing Existing Documents

python
from docx import Document

doc = Document("existing.docx")

# Find and replace text
for para in doc.paragraphs:
    for run in para.runs:
        if "OLD_TEXT" in run.text:
            run.text = run.text.replace("OLD_TEXT", "NEW_TEXT")

# Add content at the end
doc.add_heading('New Section', level=1)
doc.add_paragraph('Additional content appended to the document.')

# Modify styles
for para in doc.paragraphs:
    if para.style.name == 'Heading 1':
        for run in para.runs:
            run.font.color.rgb = RGBColor(0x1E, 0x27, 0x61)

doc.save("modified.docx")

Advanced: XML Editing Workflow

For complex modifications (TOC, footnotes, bookmarks, tracked changes) that python-docx can't handle, edit the raw XML:

bash
# Unpack
python scripts/office/unpack.py document.docx unpacked/

# Edit XML files in unpacked/word/ using the Edit tool
# Key files: document.xml, styles.xml, [Content_Types].xml

# Add comments
python scripts/comment.py unpacked/ 0 "Review this section"

# Repack
python scripts/office/pack.py unpacked/ output.docx

Key XML patterns

Tracked change (replace "30" with "60"):

xml
<w:r><w:t>The term is </w:t></w:r>
<w:del w:id="1" w:author="Claude" w:date="2025-01-01T00:00:00Z">
  <w:r><w:delText>30</w:delText></w:r>
</w:del>
<w:ins w:id="2" w:author="Claude" w:date="2025-01-01T00:00:00Z">
  <w:r><w:t>60</w:t></w:r>
</w:ins>
<w:r><w:t> days.</w:t></w:r>

Smart quotes in XML:

xml
<w:t>Here&#x2019;s a quote: &#x201C;Hello&#x201D;</w:t>

DXA unit reference

  • 1440 DXA = 1 inch
  • US Letter: 12240 x 15840 DXA
  • A4: 11906 x 16838 DXA

Conversion

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

# .docx to PDF
python scripts/office/soffice.py --headless --convert-to pdf document.docx

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

# Accept all tracked changes (produces clean document)
python scripts/accept_changes.py input.docx clean.docx

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Docx?

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', '.docx', or requests to produce professional documents with headings, tables of contents, page numbers, or letterheads. Also use for extracting content from .docx files, working with tracked changes, or converting content into a polished Word document.

Firwat Docx op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Docx besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Docx an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/sinaptik-ai/starpod/tree/main/crates/starpod/skills/docx an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Docx benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Docx benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Docx domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Docx gratis?

Jo. sinaptik-ai huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇