Skip to content
Skillpedia
PDF, Word & slides5.1k Β· #15052

office-tools

What it does

It is a command-line toolkit for reading document structure, making targeted edits, handling tracked changes, and checking the file package. It is for people who need careful edits to Office files without a risky rewrite.

When to use it

  • βœ“When you want to read the structure of a Word, PowerPoint, or Excel file.
  • βœ“When you want tracked changes or comments in a Word file accepted or reviewed.
  • βœ“When you want to check an Office file for problems that would make it fail to open.

Skill link

https://github.com/Fei2411/DS-Bot/blob/main/ds-bot/src/office/skills/office-tools/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/Fei2411/DS-Bot/blob/main/ds-bot/src/office/skills/office-tools/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCheck my Word report for problems that would stop it opening, and list its comments.”

5 new skills a week. 1 minute to read.

How it works

The agent runs the bundled tool to read the file's blocks and check its package. It writes edits to a new file, or in place when you ask, and reports its findings.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Office tools

A bundled command line for the jobs the format skills cannot do safely: reading a document's structure with stable ids, repairing packages, targeted edits, tracked changes, layout findings, and contact sheets of rendered pages. Run every command through the Node and CLI paths in the runtime block at the end of this skill.

Every command accepts --json and prints {"ok":true,"data":…} for a run that completed, or {"ok":false,"error":{"code","message"}} when it failed. Findings are results, not failures: they land inside data.findings with ok still true, and the exit code carries them β€” 0 = ok, 1 = findings remain, 2 = usage or failure. Edits write a new file (-o out) or overwrite the input (--in-place); they never touch the input otherwise.

Commands

  • unpack <file> <dir> / pack <dir> <file> β€” extract a package to readable XML and repack it. pack --against <original> also runs check against the original.
  • check <file|dir> [--against <original>] [--fix] β€” only defects that make Office refuse a file or show a repair prompt. --against reports just the issues the original lacks. --fix repairs what is safe (xml:space, duplicate ids, content-type rows, dangling relationships).
  • docx read <file> [--changes] β€” body blocks as p1…, t1… in reading order, with paragraph style, tables as cell rows (merges noted), headers/footers, footnotes/endnotes, comments and the paragraph each anchors to. Text shows tracked changes accepted; --changes marks them inline ({+inserted (Ana)+}, {-deleted (Ana)-}, moves, format changes, deleted paragraph marks).
  • docx fields <file> β€” simple and complex fields with instruction and current result.
  • docx edit <file> (-o out|--in-place) --ops <json|@file> β€” one batch of ops, all-or-nothing, ids from docx read of the same file: replace (cross-run text/regex, keeps formatting), set_cell, set_field, insert, delete, comment, accept_changes, reject_changes.
  • pptx inventory <file> [--slides N…] β€” slide size, theme fonts, and every shape per slide: id, name, kind, placeholder, resolved box in inches (group transforms applied, layout/master placeholder inherited), text with run fonts and sizes, picture media.
  • pptx layout <file> [--autofit] β€” overlapping text boxes and shapes off the slide, from the same resolved boxes. --autofit sets a:normAutofit on the shapes found. Overflow inside a box still needs a render.
  • pptx slides <file> -o|--in-place --order 3,1,1,5 β€” reorder by current positions; a repeated position duplicates the slide (notes, charts and embedded workbooks copied); positions left out are removed.
  • pptx clean <file|dir> [--dry-run] β€” drop slides not in the list, unreachable parts, dangling relationships/Overrides, unreferenced media (also works on docx/xlsx).
  • xlsx inventory <file> β€” sheets (state, dimension, cell/formula counts, merges, tables, charts), defined names, every error cell with its formula, and a note when formulas have no cached value.
  • xlsx read <file> --sheet <name> [--range A1:H40] β€” a grid of cached values with formulas shown; dates as ISO.
  • sheet <png…|dir> -o <contact.png> [--cols 4] [--width 320] β€” one contact sheet of rendered pages, labelled with page numbers.

Workflows

Word β€” docx read for the ids β†’ one docx edit batch over the opened document β†’ docx read again to confirm β†’ check --against <the untouched original> for anything left. Keep the original copy untouched (no --in-place on it).

PowerPoint β€” pptx inventory β†’ edit (python-pptx through the format skill; pptx slides/pptx clean for structure) β†’ pptx layout for overlap/off-slide findings β†’ when office-render is in the catalog, render β†’ sheet over the rendered images and look at the contact sheet before single slides β†’ fix β†’ recheck.

Excel β€” xlsx inventory β†’ edit with openpyxl (format skill) β†’ office-recalculate β†’ xlsx inventory again and confirm no error cells and no uncached formulas.

XML edits β€” only through unpack, a real XML parser, and pack --against. Never sed or string-splice XML.

Finish line β€” check passes clean, pptx layout findings addressed or explained, the contact sheet looked at when rendering is available, and anything that could not be verified is said in the report.

Design rules for a new deck

One idea and one visual per slide. Titles state the point. One accent colour. A locked type scale. No card behind every paragraph. Draw

FAQ

Does it change my original file?

Not unless you ask it to edit in place. Otherwise edits go to a new output file.

Does it need installing?

No. The skill says it works offline and nothing needs to be installed.

What does a finding mean?

A finding is a problem the check found in the file. It is reported without stopping the run.

Details

Original description by the author

Inspect, check, and edit .docx/.pptx/.xlsx packages in place β€” block-level reading, comments, tracked changes, slide inventory and layout checks, slide reorder/duplicate/cleanup, workbook errors, package checks, contact sheets. Works offline; nothing to install.

repo: Fei2411/DS-Bot

Popularity

GitHub stars
5.1k
Ranking position
#15052
License
Apache-2.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills