Logo van Docx

Docx

Organisatie
Navinspire-ia
docx

Works on existing Word (.docx) files at the package level with python-docx and lxml. Dumps and replaces text while keeping run formatting, adds or lists comments, accepts, rejects or creates tracked changes, unpacks, repacks and validates the OOXML package, converts with headless LibreOffice. Use when the user asks to "edit this Word file", "add comments to the docx", "accept all tracked changes", "replace the text in the contract" or "check why this docx is corrupted". In French "modifie ce fichier Word", "ajoute des commentaires dans ce document", "accepte les modifications suivies" or "remplace le texte du contrat". New documents from scratch belong to docx-generator.

Add to TypingMind

Overzicht

UitgeverNavinspire-ia
Repositorynavin
Skillnaamdocx
Sterren
37
Forks
5
Meegeleverde bestanden
6
LicentieAGPL-3.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 6

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door Navinspire-ia op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Docx in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/Navinspire-ia/navin/tree/main/navin/skills/docx
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Navinspire-ia/navin.git /tmp/navin
mkdir -p .claude/skills
cp -r /tmp/navin/navin/skills/docx .claude/skills/docx
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Docx in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Docx automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Docx niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

DOCX Toolkit

Overview

This skill edits Word files that already exist: contracts, reports, templates sent by the user. It preserves what is there (styles, numbering, headers, images, revision history) and changes only what was asked. All scripts run with exec and the bundled libraries (python-docx, lxml); nothing has to be installed first.

Pick the sibling skill when the job is different:

  • docx-generator: write a new report, letter or proposal from a brief or an HTML template.
  • pdf-generator: the deliverable must be a PDF rendered from HTML.
  • pdf: the input is a PDF, not a Word file.

Workflow

1. Read before touching

  1. Dump the text with python3 navin/skills/docx/scripts/docx_text.py dump input.docx --format markdown (or --format json for paragraph indexes, style names and table flags). Read the result with read_file when it is long.
  2. Count revisions and comments: python3 navin/skills/docx/scripts/docx_track.py count input.docx --json and python3 navin/skills/docx/scripts/docx_comments.py list input.docx. A document with pending revisions must be accepted or rejected first when the user wants a clean copy.
  3. Validate the package when Word complains or when the file comes from an unknown generator: python3 navin/skills/docx/scripts/office_pkg.py validate input.docx --json.

2. Edit

Always write to a new file with --out edited.docx unless the user explicitly wants the original overwritten.

  • Plain text replacement that keeps bold, italics and fonts of the matched run: docx_text.py replace input.docx --find "Old name" --with "New name" --all --out edited.docx.
  • Legal or review context, where the change must stay visible: docx_track.py replace input.docx --find "30 days" --with "45 days" --author "Navin" --out edited.docx records a tracked deletion followed by a tracked insertion.
  • Comments for a reviewer: docx_comments.py add input.docx --anchor "Payment terms" --text "Confirm the due date with finance." --author "Navin" --out edited.docx anchors the comment on the first paragraph containing the anchor text.
  • Accept or reject everything: docx_track.py accept input.docx --out clean.docx keeps insertions and drops deletions; reject does the opposite. Both clear formatting-change records in body, headers, footers, footnotes and endnotes.

3. Package-level surgery

When python-docx has no API for the change (content controls, custom XML, numbering restart, header images, broken relationships):

  1. office_pkg.py unpack input.docx work/ extracts the parts with pretty-printed XML.
  2. Edit work/word/document.xml (or styles.xml, numbering.xml, header1.xml) with edit_file. Keep w:r runs intact; a text node always lives inside w:t inside w:r inside w:p.
  3. office_pkg.py pack work/ output.docx zips the folder back with [Content_Types].xml first and minified XML.
  4. office_pkg.py validate output.docx before delivering: zip integrity, every content type and relationship target present, well-formed XML, python-docx round trip.

Read references/ooxml-anatomy.md first: it maps the parts, the paragraph and run model, tracked-change and comment markup, and the pitfalls that break Word.

4. Convert

python3 navin/skills/docx/scripts/office_convert.py edited.docx --to pdf --out-dir out/ drives headless LibreOffice. The script exits with a clear message when soffice is missing: say so instead of silently skipping the PDF, and offer the pdf-generator route if the content can be re-rendered from HTML.

5. Deliver

Re-run docx_text.py dump on the result and quote the changed paragraphs to the user. Attach the file. State what was not changed (styles, images, other sections) so the user knows the scope.

Scripts

ScriptCommand
scripts/docx_text.pydump FILE [--format json|markdown] [--no-tables]; replace FILE --find T --with T [--all] [--out F]
scripts/docx_comments.pylist FILE; add FILE --anchor T --text T [--author A] [--initials I] [--out F]
scripts/docx_track.pyaccept|reject FILE [--out F]; replace FILE --find T --with T [--author A] [--all] [--out F]; count FILE [--json]
scripts/office_pkg.pyunpack ARCHIVE DIR [--no-pretty]; pack DIR ARCHIVE [--no-minify]; validate ARCHIVE [--json] [--no-roundtrip]
scripts/office_convert.pySOURCE --to pdf|docx|html|pptx|xlsx [--out-dir D] [--timeout S] [--json]

Exit codes: 0 success, 1 nothing matched or validation failed, 2 usage or I/O error, 3 LibreOffice missing.

Rules

  • Language gate: when new text is written into the document (comments, inserted sentences, headings), ask for the document language if the user did not state it, and keep the language of the surrounding text.
  • Never put em dashes (U+2014) or en dashes (U+2013) in produced text. Use "-" or rephrase.
  • Keep the file editable: no screenshots pasted in place of text, no flattening to PDF unless asked.
  • Preserve run formatting: replace inside runs, do not rebuild paragraphs from scratch.
  • Tracked changes are the default in legal, HR and contract documents; silent edits are the default in drafts and templates. Ask when unsure.
  • Validate every file produced by package-level edits before delivering it; a corrupted docx is worse than no file.
  • Report partial results honestly: exit 1 from replace means the text was not found; say it and show the closest paragraphs from the dump.

References

  • references/ooxml-anatomy.md: package parts, paragraph and run model, styles and numbering, headers and footers, tracked changes and comments markup, common pitfalls.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Docx?

Works on existing Word (.docx) files at the package level with python-docx and lxml. Dumps and replaces text while keeping run formatting, adds or lists comments, accepts, rejects or creates tracked changes, unpacks, repacks and validates the OOXML package, converts with headless LibreOffice. Use when the user asks to "edit this Word file", "add comments to the docx", "accept all tracked changes", "replace the text in the contract" or "check why this docx is corrupted". In French "modifie ce fichier Word", "ajoute des commentaires dans ce document", "accepte les modifications suivies" or "r...

Waarom Docx gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Docx bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Docx in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/Navinspire-ia/navin/tree/main/navin/skills/docx. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Docx gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Docx gebruiken?

Zoveel als je wilt. Je kunt Docx gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Docx gratis?

Ja. Deze skill is door Navinspire-ia op GitHub gepubliceerd onder de licentie AGPL-3.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇