docx-figure-sync

Replace embedded SVG/PNG figures in DOCX files while preserving layout and captions.

19|2|Updated Mar 14, 2025
One-click install
npx skills add https://github.com/ThalesGroup/agilab --skill docx-figure-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docx-figure-sync
Source: https://github.com/ThalesGroup/agilab/tree/main/.claude/skills/docx-figure-sync
Command: npx skills add https://github.com/ThalesGroup/agilab --skill docx-figure-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Replace embedded figures in DOCX reports while preserving placement, sizing, and nearby captions. Use this skill when you want a figure updated inside a Word document, wants SVG/PNG media replaced without rebuilding the whole document manually, or needs related PDF regeneration only when explicitly requested.

Core Features & Use Cases

  • Precise replacement of embedded media in DOCX while keeping captions and layout intact.
  • Swap editable source figures (SVG/other) and regenerate PDFs on demand.
  • Works with deterministic scripts to update media within the DOCX package without altering unrelated content.

Quick Start

Run the media replacement script to list embedded media and replace a target entry with a new image, producing a new DOCX.

Frequently Asked Questions about docx-figure-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace embedded figures in a Word document without changing the layout or captions?

To replace embedded figures in a Word document without altering layout, use a deterministic script to locate and swap the target media inside the DOCX archive. This preserves placement, sizing, and nearby captions automatically.

Can I update SVG or PNG images inside a DOCX file without rebuilding the whole document?

Yes, you can update SVG or PNG images inside a DOCX file without rebuilding it manually. The process targets the specific media entries within the DOCX package and swaps them with your new image files.

What is the best way to regenerate a PDF after updating figures in a DOCX report?

The best way to regenerate a PDF after updating figures in a DOCX report is to explicitly request PDF regeneration after the media swap. This ensures the newly replaced SVG or PNG figures are reflected in the final output.

Does replacing media in a DOCX archive affect the surrounding text and content?

No, replacing media in a DOCX archive does not affect surrounding text and content. The script ensures filetype compatibility and performs a precise swap that preserves the existing layout and all unrelated content.

Do I need Python to automate DOCX figure replacement?

Yes, you need Python to automate DOCX figure replacement using this approach. It relies on a deterministic Python script to safely locate and replace embedded media within the document archive.