Logo di Docx

Docx

Organizzazione
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.

Panoramica

Pubblicato daNavinspire-ia
Repositorynavin
Nome della skilldocx
Stelle
37
Fork
5
File inclusi
6
LicenzaAGPL-3.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 6

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da Navinspire-ia su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Docx in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/Navinspire-ia/navin/tree/main/navin/skills/docx
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Docx in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Docx non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Docx non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill 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 "r...

Perché usare Docx su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Docx è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Docx in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/Navinspire-ia/navin/tree/main/navin/skills/docx. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Docx?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Docx?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Docx: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Docx è gratuita?

Sì. È pubblicata su GitHub da Navinspire-ia con licenza AGPL-3.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇