
Docx
Edit, review, and finalize Microsoft Word .docx files—including tracked changes—from an agent during scientific or business writing.
Overview
Docx is an agent skill for the Build phase that helps agents create and revise Microsoft Word .docx files, including tracked-change workflows.
Install
npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill docxWhat is this skill?
- Agent-oriented workflows for Word .docx creation and revision
- Supports accepting or working with tracked changes in documents
- Fits scientific-agent-skills bundles alongside other research writing utilities
- Governed by Anthropic skill license terms when sourced from Anthropic materials
Adoption & trust: 605 installs on skills.sh; 27.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent can write markdown, but reviewers and journals expect a proper Word file with revision history you cannot hand-edit reliably by hand.
Who is it for?
Scientific and professional writing pipelines that must land in Word format with revision markup.
Skip if: Teams that publish only in markdown/HTML/Google Docs with no .docx requirement.
When should I use this skill?
You need to create, modify, or finalize a .docx file including tracked-change review from within an agent session.
What do I get? / Deliverables
You get an updated .docx artifact with changes applied or reviewed according to the skill’s document-editing procedure.
- Revised .docx file
- Tracked-change resolution per workflow
Recommended Skills
Journey fit
How it compares
Document-production skill for OOXML, not a markdown-to-PDF-only formatter.
Common Questions / FAQ
Who is docx for?
Solo builders and small teams using scientific-agent-skills who need agent-driven Word document editing during research or compliance writing.
When should I use docx?
Use it in Build/docs when drafting or finalizing .docx deliverables, accepting tracked changes, or converting agent-written content into submission-ready Word files.
Is docx safe to install?
Treat it like any third-party skill that may read and write local document files; confirm license terms in SKILL.md and check the Security Audits panel on this Prism page.
SKILL.md
READMESKILL.md - Docx
© 2025 Anthropic, PBC. All rights reserved. LICENSE: Use of these materials (including all code, prompts, assets, files, and other components of this Skill) is governed by your agreement with Anthropic regarding use of Anthropic's services. If no separate agreement exists, use is governed by Anthropic's Consumer Terms of Service or Commercial Terms of Service, as applicable: https://www.anthropic.com/legal/consumer-terms https://www.anthropic.com/legal/commercial-terms Your applicable agreement is referred to as the "Agreement." "Services" are as defined in the Agreement. ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the contrary, users may not: - Extract these materials from the Services or retain copies of these materials outside the Services - Reproduce or copy these materials, except for temporary copies created automatically during authorized use of the Services - Create derivative works based on these materials - Distribute, sublicense, or transfer these materials to any third party - Make, offer to sell, sell, or import any inventions embodied in these materials - Reverse engineer, decompile, or disassemble these materials The receipt, viewing, or possession of these materials does not convey or imply any license or right beyond those expressly granted above. Anthropic retains all right, title, and interest in these materials, including all copyrights, patents, and other intellectual property rights. """Accept all tracked changes in a DOCX file using LibreOffice. Requires LibreOffice (soffice) to be installed. """ import argparse import logging import shutil import subprocess from pathlib import Path from office.soffice import get_soffice_env logger = logging.getLogger(__name__) LIBREOFFICE_PROFILE = "/tmp/libreoffice_docx_profile" MACRO_DIR = f"{LIBREOFFICE_PROFILE}/user/basic/Standard" ACCEPT_CHANGES_MACRO = """<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic"> Sub AcceptAllTrackedChanges() Dim document As Object Dim dispatcher As Object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dispatcher.executeDispatch(document, ".uno:AcceptAllTrackedChanges", "", 0, Array()) ThisComponent.store() ThisComponent.close(True) End Sub </script:module>""" def accept_changes( input_file: str, output_file: str, ) -> tuple[None, str]: input_path = Path(input_file) output_path = Path(output_file) if not input_path.exists(): return None, f"Error: Input file not found: {input_file}" if not input_path.suffix.lower() == ".docx": return None, f"Error: Input file is not a DOCX file: {input_file}" try: output_path.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(input_path, output_path) except Exception as e: return None, f"Error: Failed to copy input file to output location: {e}" if not _setup_libreoffice_macro(): return None, "Error: Failed to setup LibreOffice macro" cmd = [ "soffice", "--headless", f"-env:UserInstallation=file://{LIBREOFFICE_PROFILE}", "--norestore", "vnd.sun.star.script:Standard.Module1.AcceptAllTrackedChanges?language=Basic&location=application", str(output_path.absolute()), ] try: result = subprocess.run( cmd, capture_output=True, text=True, timeout=30, check=False, env=get_soffice_env(), ) except subprocess.TimeoutExpired: return ( None, f"Successfully accepted all tracked changes: {input_file} -> {output_file}", ) if result.returncode != 0: return No