Working with DOCX tools: create, clean, and compare Word documents in Rakenne

A practical guide on using Rakenne's DOCX tools skill to create client‑ready Word documents, clean up tracked changes, validate structure, convert formats, and generate redlines — without touching XML or code.

  • intermediate
  • 18 min read
  • 2026-03-09
  • Files
Author Ricardo Cabral · Founder

Most client‑facing deliverables still leave your system as Word documents — contracts, ISO reports, SoA packages, audit reports, PRDs. Rakenne’s DOCX tools skill lets you and the agent work with those files directly: drafting new .docx documents, cleaning up tracked changes, fixing structural issues, converting formats, and generating redlines for legal review.

This tutorial shows you how to:

  • Set up a project for Word workflows
  • Draft new client‑ready .docx files
  • Clean up tracked changes and comments
  • Validate and repair problematic documents
  • Convert between DOCX, PDF, HTML, and ODT
  • Compare versions and produce redlined Word files
  • Generate page images from PDFs for visual QA

You don’t need to know how DOCX works internally. Just describe the outcome you want; the agent uses the right tools behind the scenes.


When to use DOCX tools (and when not to)

Use the DOCX tools skill when:

  • The final deliverable must be sent as a .docx or PDF created from .docx
  • You receive heavily edited Word files from clients and need clean, final versions
  • Word starts complaining that a document is corrupted or opens in repair mode
  • Legal or compliance needs a redlined comparison between two Word versions
  • You want page‑by‑page images of a PDF for quality checks or slide decks

Stick to plain markdown skills when:

  • You’re still designing the workflow or document structure
  • The deliverable is an internal‑only artifact that never leaves Rakenne
  • You don’t care about Word formatting — only the text content

The most common pattern in practice is:

Draft and validate in markdown → export to DOCX → use DOCX tools for the last mile (polish, comparison, and handoff).

Setting up a project for DOCX work

Before you ask the agent to touch Word files, make sure the project is prepared.

1. Create or pick the right project

Create a project that reflects the engagement or deliverable, for example:

  • Client X — ISO 27001 SoA
  • Acme — MSA and DPA
  • Board — Q4 Security Report

This keeps related Word files together with their markdown sources and notes.

2. Upload your DOCX and PDF files

Add any existing files you want to work with:

  • Source contracts: contracts/msa-original.docx
  • Client edits: contracts/msa-client-edits.docx
  • Policies in Word: policies/info-sec-policy.docx
  • PDFs for page images: reports/soc2-report.pdf

Name files clearly. Suffixes like _original, _client-edits, _final, and _redline make conversations with the agent much easier.

3. Enable the DOCX tools skill

From the skill library, add the DOCX tools skill to your project. Once enabled, the agent can:

  • See that DOCX‑specific tools are available
  • Propose DOCX workflows when it spots .docx or .doc files
  • Save new or transformed documents into the workspace for download

You are now ready to use natural‑language prompts to drive Word workflows.


Workflow 1 — Draft a polished Word document from scratch

Use this when you want the agent to author a new .docx that you will open in Word, edit, and send to clients.

Goal

Produce a client‑ready report or contract in Word, starting from a high‑level brief.

How to run it

  1. Give the agent a clear brief:
    • Who the document is for (board, auditors, client legal, regulators)
    • What the outcome is (SoA, internal audit report, MSA, PRD, etc.)
    • Any constraints (length, level of formality, jurisdiction, language)
  2. Describe the structure you want:
    • “Executive summary, context, methodology, findings, recommendations”
    • “Numbered sections, annexes for evidence, and a sign‑off page”
  3. Ask explicitly for a Word file and path:
    • “Generate a .docx and save it as output/iso27001-internal-audit-report.docx.”
  4. Let the agent draft, revise if needed, and confirm once the .docx is ready to download.

Example prompts

  • “We need a client‑ready ISO 27001 internal audit report for CloudSync, 10–15 pages, aimed at auditors. Use sections for scope, methodology, findings, and recommendations, and save the result as output/iso27001-internal-audit-report.docx.”
  • “Draft a professional MSA for a B2B SaaS contract with Acme, under Brazilian law, in English. Include sections for scope, service levels, data protection, limitation of liability, and termination. Save the Word file as contracts/msa-acme-draft.docx.”

Workflow 2 — Clean up tracked changes and comments

Real‑world contracts and policies often bounce between teams with tracked changes turned on. The DOCX tools help you go from a noisy file to a clean final version, without losing context.

Goal

Turn a heavily edited Word file into:

  • A readable text view you can skim in Rakenne
  • A final clean version with all changes accepted
  • An optional commented version that captures your review notes

How to run it

  1. Start from the edited file:
    • “Work with contracts/msa-client-edits.docx.”
  2. Ask for a review‑friendly summary:
    • “Extract the text so I can see the final version as if all tracked changes were accepted, and show it in markdown.”
  3. Once you are comfortable with the text, request a final Word version:
    • “Now create a new .docx where all tracked changes are accepted and save it as contracts/msa-client-final.docx.”
  4. Optionally, ask the agent to add comments:
    • “Create a separate copy with review comments wherever the client changed limitation of liability or indemnity, and save that as contracts/msa-client-review-comments.docx.”

Example prompts

  • “The file contracts/nda-client-edits.docx is full of redlines. First, show me a markdown view of the final text as if all changes were accepted. Then generate a clean Word file with all changes accepted saved as contracts/nda-client-final.docx.”
  • “Review contracts/msa-client-edits.docx from our perspective. Add Word comments next to any clauses that weaken our IP rights or increase our liability, and save the commented version as contracts/msa-client-risk-review.docx.”

Workflow 3 — Validate and repair problematic DOCX files

Sometimes Word opens a file in repair mode, shows warnings about invalid content, or behaves unpredictably. The DOCX tools can help you diagnose and fix many of these issues before sending documents to clients or regulators.

Goal

Check that a .docx is structurally sound, repair common problems, and keep a safe original.

How to run it

  1. Tell the agent which file is misbehaving:
    • reports/sox-report-2025.docx opens in repair mode and sometimes crashes Word.”
  2. Ask for a structural health check:
    • “Validate the structure of this DOCX, repair any issues you can safely fix, and save a clean copy as reports/sox-report-2025-clean.docx.”
  3. Request a plain‑language summary:
    • “Explain what was wrong and what you changed, in terms a non‑technical auditor would understand.”

Example prompts

  • “Word reports invalid content when opening output/annual-report-2025.docx. Validate and repair the file if possible, then save a repaired version as output/annual-report-2025-clean.docx and summarize what changed.”
  • “Before we send policies/info-sec-policy.docx to the customer, run a structural validation and fix any common problems you find. Save the validated file as policies/info-sec-policy-validated.docx and confirm it should open cleanly in Word.”

Workflow 4 — Convert between DOCX, PDF, HTML, and ODT

Many engagements end with “Can you send it as a PDF?” or “We need this as a .docx, not .doc.” The DOCX tools wrap these conversions into repeatable flows.

Goal

Move documents between formats while preserving as much structure and formatting as possible.

Common conversions

  • .doc.docx for legacy contracts
  • .docxpdf for sign‑off
  • .docxhtml for intranet or documentation sites
  • .odt.docx for clients using LibreOffice

How to run it

  1. Point to the input file:
    • “Use contracts/master-agreement.doc as input.”
  2. Specify the target format and path:
    • “Convert it to a modern Word document and save as contracts/master-agreement.docx.”
  3. For PDF or HTML, ask for extra checks:
    • “Generate a PDF version as contracts/master-agreement.pdf and quickly scan whether headings and tables look correct on the first pages.”

Example prompts

  • “Convert output/iso27001-soa.docx into a PDF saved as output/iso27001-soa.pdf so we can send it to auditors.”
  • “Take output/board-pack-q4.docx and convert it to HTML for our internal wiki, saved as output/board-pack-q4.html. Keep headings and table structure intact as much as possible.”

Workflow 5 — Compare versions and generate a redlined DOCX

Legal and compliance teams often want to see exactly what changed between two versions of a document. The DOCX tools can generate a third file with tracked changes, ready for review in Word.

Goal

Produce a redlined .docx that compares an “original” and a “modified” version.

How to run it

  1. Identify the two versions:
    • contracts/msa-v2-internal.docx is our baseline; contracts/msa-v3-client.docx includes the client’s edits.”
  2. Ask for a redline:
    • “Generate a redlined Word file showing all differences between these two and save it as contracts/msa-v2-vs-v3-redline.docx.”
  3. Open the result in Word to review tracked insertions, deletions, and moves.

Example prompts

  • “Compare policies/privacy-policy-v1.docx with policies/privacy-policy-v2-client.docx and produce a redlined Word document saved as policies/privacy-policy-redline-client.docx.”
  • “Create a redline between contracts/sow-internal.docx and contracts/sow-client-edits.docx, suitable for our legal team to review, saved as contracts/sow-redline-client-edits.docx.”

Workflow 6 — Turn PDF pages into images

Sometimes you need images of each page instead of a single PDF: for slide decks, visual QA, or embedding thumbnails into another document.

Goal

Convert a PDF into one image per page at a chosen resolution.

How to run it

  1. Point to the PDF source:
    • “Work with reports/security-architecture.pdf.”
  2. Specify the output folder and resolution:
    • “Generate one PNG image per page at around 200 DPI into reports/security-architecture-images/.”
  3. The agent will:
    • Create the folder if needed
    • Save files like page-001.png, page-002.png, and so on

Example prompts

  • “From slides/isms-overview.pdf, generate PNG images for each page at 200 DPI under slides/isms-overview-images/.”
  • “Turn output/soc2-report.pdf into JPEG images named soc2-report-page-001.jpg, etc., so I can quickly review each page in a gallery.”

Example prompt templates

You can copy‑paste and adapt these to your own projects.

New report in Word

“We need a client‑ready report on [topic] for [client], about [length] pages, aimed at [audience]. Use sections [list of sections], and save the result as output/\[slug].docx. Keep the tone [tone].”

Finalize a redlined contract

“The file contracts/\[name]-client-edits.docx contains tracked changes. Show me the final text as if all changes were accepted in markdown, then generate a clean .docx with all changes accepted saved as contracts/\[name]-final.docx.”

Redline two versions

“Create a redlined Word document comparing \[path-to-original].docx and \[path-to-modified].docx, and save it as \[path-to-redline].docx so our legal team can review the differences.”

Health check before sending

“Before we send output/\[deliverable].docx to the client, validate its structure, repair any common issues, and save a validated copy as output/\[deliverable]-validated.docx. Let me know if anything still looks risky from a document‑health perspective.”


Limitations and best practices

A few practical notes to make DOCX workflows smoother:

  • Files must live in the project workspace
    If the agent says it can’t find a path, double‑check that you uploaded the file and that the folder name is correct.

  • Avoid overwriting originals
    By default, the agent writes new files (often with -clean, -final, or -redline suffixes), but it’s still a good habit to say: “Do not overwrite the original; save to a new path.”

  • Expect minor formatting shifts on conversion
    When converting between formats, key structure should survive, but exact spacing and layout may change. Plan a quick visual review for client‑facing documents.

  • Use meaningful filenames
    Encode version and role in the name: -original, -client-edits, -our-edits, -final, -redline. This reduces back‑and‑forth with the agent and with your team.

  • Combine markdown and DOCX workflows
    For long engagements, a good pattern is: design and validate structure in markdown skills, then rely on DOCX tools for the last mile of formatting, comparison, and delivery.

With these patterns, the DOCX tools become the “last‑mile engine” that turns your structured Rakenne workflows into Word documents your clients, auditors, and boards actually read.

Try it yourself

Open a workspace with the skills described in this article and start drafting in minutes.

Get Started Free — No Sign-Up

Ready to let your expertise drive the workflow?

Stop wrestling with rigid templates and generic chatbots. Describe your process, let the agent handle the rest.

Get Started Free — No Sign-Up