Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
k-dense-ai avatar

Docx

  • 978 installs
  • 32k repo stars
  • Updated July 29, 2026
  • k-dense-ai/scientific-agent-skills

docx is a scientific-agent-skills module that enables Claude-powered agents to accurately read, edit, and generate structured content inside Microsoft Word .docx files for developers automating document workflows.

About

docx is a k-dense-ai scientific-agent-skills package, licensed under Anthropic terms, that equips agents to manipulate Microsoft Word .docx files with accurate structured reading, editing, and generation. Developers use docx when reports, protocols, or scientific write-ups must live in Word format rather than plain Markdown, especially in regulated or collaborator-facing workflows. The skill fits agent pipelines that ingest existing .docx templates, patch sections programmatically, and emit updated Word documents without manual copy-paste between editors.

  • Enables direct .docx file interaction for AI agents without losing formatting or structure
  • Supports reading paragraphs, tables, headings, and tracked changes
  • Allows agents to accept all tracked changes programmatically
  • Preserves complex Word document elements during AI editing workflows
  • Anthropic-licensed scientific agent skill for professional document automation

Docx by the numbers

  • 978 all-time installs (skills.sh)
  • +43 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #1,087 of 16,570 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill docx

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs978
repo stars32k
Security audit2 / 3 scanners passed
Last updatedJuly 29, 2026
Repositoryk-dense-ai/scientific-agent-skills

How do agents edit Microsoft Word docx files accurately?

Enable Claude-powered agents to accurately read, edit, and generate structured content inside Microsoft Word.docx files.

Who is it for?

Developers automating scientific or technical Word document workflows where agents must preserve .docx structure instead of converting everything to Markdown.

Skip if: Teams standardized on Markdown-only docs, Google Docs, or PDF-only publishing pipelines without .docx requirements.

When should I use this skill?

A developer needs an agent to open, modify, or generate content inside an existing or new Microsoft Word .docx file.

What you get

Updated .docx files with edited structured content, generated Word sections, and agent-readable document extracts.

  • edited .docx file
  • generated Word document sections

Files

SKILL.mdMarkdownGitHub ↗

© 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

Related skills

How it compares

Pick docx when Word-native .docx structure matters; use Markdown documentation skills when repos and static sites are the primary output.

FAQ

What file format does the docx skill handle?

The docx skill handles Microsoft Word .docx files, enabling agents to read, edit, and generate structured content within the Office Open XML document format.

When should developers choose docx over Markdown skills?

Developers should choose docx when deliverables must remain native Word documents—such as scientific reports or template-driven .docx files—rather than Markdown exports that break Word-specific structure.

Is Docx safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.