docx - Word toolkit with native Office Math

    1

    This skill provides a suite of targeted Python CLIs to programmatically read, edit, and generate Word documents without losing document integrity.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    docx - Word toolkit with native Office Math

    Example session with this skill installed

    Create a document named 'Project_Status.docx' from a JSON spec with a Level 1 heading 'Weekly Update', a bulleted list of 'Task A' and 'Task B', and a 2x2 table showing 'Status' and 'Owner'.

    • Read your context and instructions
    • Compiled the docx - word

    I have generated the Word document based on your specification using the docx_create.py tool. The JSON spec was structured to include the heading, bullet list, and the status table as requested.

    Document Generation Results

    FieldValue
    FilenameProject_Status.docx
    Blocks Created3 (Heading, Bullet List, Table)
    Table Layout2x2 Grid (Default Style)
    StatusSuccessfully written to disk
    {
      "blocks": [
        {
          "type": "heading",
          "text": "Weekly Update",
          "level": 1
        },
        {
          "type": "bullet_list",
          "items": [
            "Task A",
            "Task B"
          ]
        },
        {
          "type": "table",
          "header": ["Status", "Owner"],
          "rows": [
            ["In Progress", "Engineering"],
            ["Completed", "Design"]
          ],
          "header_bold": true
        }
      ]
    }
    

    Next steps

    • Run python scripts/docx_read.py Project_Status.docx --text to verify the content outline.
    • If you need specific column widths for the status table, use docx_pack.py to unpack and table_width.py to set dimensions.
    • To add a summary comment to the document, use docx_comments.py add Project_Status.docx --target "Weekly Update" --text "Review required".
    Project_Status.docx

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Automating Word document workflows often breaks when dealing with complex formatting, nested tables, or native Office Math. Working with .docx files usually requires heavy libraries or brittle manual editing that strips out styles and metadata. This skill provides a suite of targeted Python CLIs to programmatically read, edit, and generate Word documents without losing document integrity.

    What it does

    • JSON-to-Docx Generation builds full documents including headings, tables, and images from structured JSON specs.
    • Office Math Conversion transforms linear LaTeX or Unicode formulas into native, editable Word OMML equations.
    • Table Geometry Control resolves layout issues by syncing gridCol and tcW values to force specific column widths.
    • Template Injection fills {{token}} placeholders and applies formatting templates from one document to another.
    • Content Inspection extracts text, outlines, styles, images, and tracked revisions into machine-readable formats.
    • Direct XML Editing provides tools to pack and unpack documents for low-level XML manipulation of document parts.

    How it works

    1. Analyze existing documents using docx_read.py or docx_validate.py to inspect structure, styles, or comments.
    2. Transform content by running docx_edit.py for text replacement or docx_mathify.py to upgrade formulas.
    3. Generate new files by passing a JSON configuration to docx_create.py for automated reporting.
    4. Refine layout by unpacking the archive and using table_width.py to fix column dimensions.

    Frameworks & tools

    Built with Python 3.10+ using python-docx and lxml. It integrates latex2mathml for equation handling and requires MML2OMML.XSL (typically found in a Microsoft Office installation) for native math support.

    Why this beats prompting it yourself

    Generic AI prompting often produces plain text that requires manual copy-pasting into Word, losing all semantic formatting. This skill gives the agent direct, surgical control over the XML structure, allowing for precise table layouts and native equation rendering that raw text generation cannot achieve.

    Use cases

    • Generate recurring business reports with dynamic tables and branding from JSON data.
    • Batch convert scientific manuscripts with LaTeX formulas into submission-ready Word files.
    • Audit legal documents for tracked changes, comments, and specific formatting compliance.
    • Automate document templating for high-volume personalized letters or certificates.

    Known limitations

    Does not support PDF, XLSX, or PPTX formats. Formula conversion is conservative to protect prose, and some complex equations may return a partial success code. Requires local XSL files for math.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Does not support PDF, Excel, or Slides. Requires Python 3.10+ and lxml. Math conversion depends on local MML2OMML.XSL file. Direct XML edits require unpacking/packing steps.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 11 days ago

    • Free with an Agensi account

    Software
    PythonNode.jsGit

    Permissions

    Terminal / Shell
    Write Files
    Read Files
    Environment Variables
    Listed11 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard text-to-Word converters, this skill directly manipulates the XML structure to support native Office Math (OMML) and precise table column widths that usually break during automation. It ensures your generated documents are fully editable and maintain professional styling rather than just being plain text exports.

    This skill is designed for any AI agent or workflow capable of executing Python 3.10 scripts. It provides a standardized CLI interface, making it compatible with AutoGPT, LangChain agents, or custom local automation pipelines that have access to a Python environment.

    For native math conversion, you will need the MML2OMML.XSL stylesheet, which is included in standard Microsoft Office installations. If you are running this in a headless or Linux environment, you will need to provide this file path to the skill to enable equation rendering.

    You receive a suite of specialized Python scripts (including docx_create, docx_edit, and docx_mathify) along with comprehensive documentation on JSON schemas for document generation. The package also includes utility tools for unpacking and validating the underlying XML of your .docx files.

    No, this skill is purpose-built exclusively for the .docx format to ensure deep integration with Word's specific features like tracked changes and style templates. It does not support Excel (.xlsx), PowerPoint (.pptx), or PDF conversion.

    New in APIs & Backend

    Free