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.
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
.docxfiles - 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
.docxor 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:
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 SoAAcme — MSA and DPABoard — 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
.docxor.docfiles - 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
- 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)
- Describe the structure you want:
- “Executive summary, context, methodology, findings, recommendations”
- “Numbered sections, annexes for evidence, and a sign‑off page”
- Ask explicitly for a Word file and path:
- “Generate a
.docxand save it asoutput/iso27001-internal-audit-report.docx.”
- “Generate a
- Let the agent draft, revise if needed, and confirm once the
.docxis 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
- Start from the edited file:
- “Work with
contracts/msa-client-edits.docx.”
- “Work with
- 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.”
- Once you are comfortable with the text, request a final Word version:
- “Now create a new
.docxwhere all tracked changes are accepted and save it ascontracts/msa-client-final.docx.”
- “Now create a new
- 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.”
- “Create a separate copy with review comments wherever the client changed limitation of liability or indemnity, and save that as
Example prompts
- “The file
contracts/nda-client-edits.docxis 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 ascontracts/nda-client-final.docx.” - “Review
contracts/msa-client-edits.docxfrom our perspective. Add Word comments next to any clauses that weaken our IP rights or increase our liability, and save the commented version ascontracts/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
- Tell the agent which file is misbehaving:
- “
reports/sox-report-2025.docxopens in repair mode and sometimes crashes Word.”
- “
- 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.”
- “Validate the structure of this DOCX, repair any issues you can safely fix, and save a clean copy as
- 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 asoutput/annual-report-2025-clean.docxand summarize what changed.” - “Before we send
policies/info-sec-policy.docxto the customer, run a structural validation and fix any common problems you find. Save the validated file aspolicies/info-sec-policy-validated.docxand 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→.docxfor legacy contracts.docx→pdffor sign‑off.docx→htmlfor intranet or documentation sites.odt↔.docxfor clients using LibreOffice
How to run it
- Point to the input file:
- “Use
contracts/master-agreement.docas input.”
- “Use
- Specify the target format and path:
- “Convert it to a modern Word document and save as
contracts/master-agreement.docx.”
- “Convert it to a modern Word document and save as
- For PDF or HTML, ask for extra checks:
- “Generate a PDF version as
contracts/master-agreement.pdfand quickly scan whether headings and tables look correct on the first pages.”
- “Generate a PDF version as
Example prompts
- “Convert
output/iso27001-soa.docxinto a PDF saved asoutput/iso27001-soa.pdfso we can send it to auditors.” - “Take
output/board-pack-q4.docxand convert it to HTML for our internal wiki, saved asoutput/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
- Identify the two versions:
- “
contracts/msa-v2-internal.docxis our baseline;contracts/msa-v3-client.docxincludes the client’s edits.”
- “
- 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.”
- “Generate a redlined Word file showing all differences between these two and save it as
- Open the result in Word to review tracked insertions, deletions, and moves.
Example prompts
- “Compare
policies/privacy-policy-v1.docxwithpolicies/privacy-policy-v2-client.docxand produce a redlined Word document saved aspolicies/privacy-policy-redline-client.docx.” - “Create a redline between
contracts/sow-internal.docxandcontracts/sow-client-edits.docx, suitable for our legal team to review, saved ascontracts/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
- Point to the PDF source:
- “Work with
reports/security-architecture.pdf.”
- “Work with
- Specify the output folder and resolution:
- “Generate one PNG image per page at around 200 DPI into
reports/security-architecture-images/.”
- “Generate one PNG image per page at around 200 DPI into
- 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 underslides/isms-overview-images/.” - “Turn
output/soc2-report.pdfinto JPEG images namedsoc2-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.docxcontains tracked changes. Show me the final text as if all changes were accepted in markdown, then generate a clean.docxwith all changes accepted saved ascontracts/\[name]-final.docx.”
Redline two versions
“Create a redlined Word document comparing
\[path-to-original].docxand\[path-to-modified].docx, and save it as\[path-to-redline].docxso our legal team can review the differences.”
Health check before sending
“Before we send
output/\[deliverable].docxto the client, validate its structure, repair any common issues, and save a validated copy asoutput/\[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-redlinesuffixes), 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