- Home
- Skills
- APIs & Backend
- Safe Word Editing
Works with the AI Agents you already use
Safe Word Editing
Apply many corrections to a Word manuscript in minutes while italics, bold, fonts and Zotero fields stay intact.
Free
Safe Word Editing
Example session with this skill installed
Apply these two validated corrections to a copy of demo_manuscript_revised.docx and check that nothing else changed: "Bar color" → "Bar colour", and restore the bold on "Table 1" in "(Table 1)"
- Read your context and instructions
- Compiled the safe word editing
- Generated the document
Two validated corrections applied to a copy of demo_manuscript_revised.docx
Summary: both corrections are applied to a working copy. The integrity check shows exactly the two intended changes: one paragraph of text changed, and the bold on "Table 1" is back. Fields, image and bibliography are untouched, and your original file has the same hash as before.
1. Backup and hashes (MD5)
c154a99ec859a3c63ac770daac231e6f *../demo_manuscript_revised.docx
c154a99ec859a3c63ac770daac231e6f *demo_manuscript_revised.backup_before_edit.docx
c154a99ec859a3c63ac770daac231e6f *demo_manuscript_copy.docx
2. Corrections file (corrections.json)
[
{"old": "Bar color", "new": "Bar colour", "n": 1},
{"old": "(Table 1)", "segments": [["(", null], ["Table 1", "bold"], [")", null]], "n": 1}
]
3. Dry run, then apply (replace_text.py, output unedited)
[1/1] OK 'Bar color'
[1/1] OK '(Table 1)'
Dry run: 2/2 corrections found. No file written.
[1/1] OK 'Bar color'
[1/1] OK '(Table 1)'
Written: demo_manuscript_copy.docx (2 corrections)
4. Integrity report (check_integrity.py, output unedited)
Hashes: c154a99ec8 → c7e9e4e012
Fields: 7 → 7 | displayed citations identical: True (6 → 6 citations compared)
Images: 1 → 1 | identical: True
Bibliography entries: 7 → 7
Modified paragraph blocks: 1
- before [16] 'Figure 1. Mean number of chitinase genes per genome for each genus, drawn with Tool C [4]. Bar color indicates'
+ after [16] 'Figure 1. Mean number of chitinase genes per genome for each genus, drawn with Tool C [4]. Bar colour indicate'
bold lost: {}
bold added: {'Table 1': 1}
To check: any unplanned difference (field, image, bold/italic) must be explained before handing back the file.
Every difference is planned: the legend paragraph (colour), and the bold restored on "Table 1" (its text did not change, so it shows as formatting only). The 7 fields are the 6 Zotero citations and the Zotero bibliography; the 6 displayed citation numbers were compared one by one and are identical.
5. Formatting check in the regenerated PDF (3 pages)
| Passage | Line | In the .docx | In the PDF |
|---|---|---|---|
| "(Table 1)" | 25 | run "Table 1": bold=True | font TimesNewRomanPS-BoldMT |
| "Bar colour" | 30 | bold=None, italic=None | font TimesNewRomanPSMT (regular) |
No italic or bold was inherited by the new text.
Unchanged: demo_manuscript_revised.docx still has the hash c154a99ec859a3c63ac770daac231e6f.
Next steps: give demo_manuscript_copy.docx to the author to review. Replace their file only if they agree. The legend still says "green bars" and "Error bars…": those corrections need the author's approval first (see the legend check).
demo_manuscript_revised.docx
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Applying a list of validated corrections by hand to a Word manuscript is slow, and one careless edit can break an italic species name or a citation field.
What it does
A backup-first workflow for editing a .docx without breaking it.
replace_text.py: applies a JSON list of corrections, all or nothing: if one correction is not found the expected number of times, nothing is written- Does not change text inside fields (Zotero citations, cross-references)
--dry-runchecks every correction without writing- Sets bold, italic or highlight per segment of a corrected passage
check_integrity.py: compares the file before and after (fields, displayed citations, images, bibliography, changed paragraphs, bold and italic)
How it works
- Back up the file and note its hash. Work on a copy.
- Write each validated correction in a JSON file: current text, new text (or segments) and expected count.
- Run
replace_text.pywith--dry-run, then again without it. - Run
check_integrity.pyon the backup and the copy. Every difference must be planned. - Check the bold and italic of each changed passage in the regenerated PDF.
Frameworks & tools
Python 3.9+, python-docx.
Why this beats prompting it yourself
Every correction is checked before anything is written, and the report lists each difference between the two files, so you can explain each one before the file goes back to the author.
Use cases
Applying validated corrections in series; rewriting a sentence while keeping its italic names and bold cross-references.
Known limitations
- Works one paragraph at a time: a correction cannot span two paragraphs.
- Without
--output, it overwrites the file you pass: always pass a working copy. - Word rewrites a file at each save: close it before the run, and check the file again after any pass through Word.
- It checks the mechanics of a change, not whether the correction is right.
Field-tested on a real, successful research project.
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.
Requires python-docx. Files must be closed in Word during execution. PDF hyphenation can break search strings; text must be sourced from the .docx.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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 today
- Free with an Agensi account
- Software
Pythonpython-docx