automating-word

automating-word is a skill for Claude Code from SpillwaveSolutions/automating-mac-apps-plugin. It costs 67 tokens per session (865 once invoked), scanned A, original, MIT.

A guide for controlling Microsoft Word on macOS with JavaScript for Automation (JXA), Apple's scripting system. It covers documents, text ranges, tables, find-and-replace, and exporting files.

In plain words
What is it for?
Use it to create or edit Word documents, replace text, change tables, and export documents programmatically.
Why use it?
It helps automate repetitive Word work through scripts instead of doing each operation by hand. It also explains how to find the Word commands that scripts can use.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the automating-mac-apps plugin — 16 skills, 10 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/spillwavesolutions/automating-mac-apps-plugin/automating-word
Any agent
npx skills add SpillwaveSolutions/automating-mac-apps-plugin --skill automating-word
Clone the repo
git clone --depth 1 https://github.com/SpillwaveSolutions/automating-mac-apps-plugin

Made for: Claude Code.

Or install automating-mac-apps, the plugin that ships this one along with the rest of its 16 skills, 10 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for automating-word

README.md
[![agentmods](https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-word.svg)](https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-word)
Your own site
<a href="https://agentmods.dev/skills/spillwavesolutions/automating-mac-apps-plugin/automating-word"><img src="https://agentmods.dev/badge/skills/spillwavesolutions/automating-mac-apps-plugin/automating-word.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.00865
Opus 5 $0.00034 $0.00432
Sonnet 5 $0.00013 $0.00173
Haiku 4.5 $0.00007 $0.00086

Measured 6d ago against content hash 0a870da5e776, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

automating-word scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/automating-mac-apps-plugin/skills/automating-word/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Automating Word (JXA-first, AppleScript discovery)

Relationship to the macOS automation skill

  • Standalone for Word, aligned with automating-mac-apps patterns.
  • Use automating-mac-apps skill for permissions, shell execution, and UI scripting guidance.
  • PyXA Installation: To use PyXA examples in this skill, see the installation instructions in automating-mac-apps skill (PyXA Installation section).

Core framing

  • Word dictionary is AppleScript-first; discover there.
  • JXA provides logic, data handling, and ObjC bridge access.
  • Objects are specifiers; read via methods, write via assignments.
  • Handle errors from Word operations using try/catch blocks and Application error checking.

Implementation Workflow

  1. Discover AppleScript Dictionary: Open Script Editor, browse Word's AppleScript dictionary to understand available objects and methods.
  2. Translate to JXA: Use discovered AppleScript syntax as reference for JXA equivalents, consulting the dictionary translation table.
  3. Set Up JXA Script: Initialize Word application object and document references.
  4. Implement Operations: Apply find/replace, table manipulation, or export using JXA methods.
  5. Test and Validate: Run script and verify document changes match expectations.

Quick Examples

Document opening:

// JXA
const word = Application('Microsoft Word');
word.documents.open('/path/to/document.docx');
# PyXA (Recommended)
import PyXA
word = PyXA.Word()
word.documents().open("/path/to/document.docx")

Find and replace:

// JXA
const range = word.activeDocument.content;
range.find.text = 'old text';
range.find.replacement.text = 'new text';
range.find.execute({replace: 'all'});
# PyXA
doc = word.active_document()
find_obj = doc.content().find()
find_obj.text = 'old text'
find_obj.replacement.text = 'new text'
find_obj.execute(replace='all')

Table creation:

// JXA
const table = word.activeDocument.tables.add(word.activeDocument.content, 3, 4);
table.cell(1, 1).range.text = 'Header';
# PyXA
table = doc.tables().add(doc.content(), 3, 4)
table.cell(1, 1).range().text = 'Header'

Read the full file on GitHub · 95 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 95 lines · 67 tokens per session scan A 0a870da5e776

Subscribe to this mod's changes

automating-word is a skill published in the GitHub repository SpillwaveSolutions/automating-mac-apps-plugin (40 stars, last pushed 14d ago), licensed MIT. It adds 67 tokens to every session and 865 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

lark-workflow-meeting-summary

会议纪要整理工作流:汇总指定时间范围内的会议纪要并生成结构化报告。当用户需要整理会议纪要、生成会议周报、回顾一段时间内的会议内容时使用。.

DropFan/claude-code-plugins · 55 tokens

lark-drive

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base…

DropFan/claude-code-plugins · 208 tokens

lark-minutes

飞书妙记:搜索妙记、查看妙记基础信息、下载/上传音视频、读取或编辑妙记的产物内容、改标题、替换说话人/关键词、申请妙记查看/编辑权限。当给出minutetoken、本地音视频文件,要查/改/转妙记产物,或用户明确要主动申请妙记权限时使用;本地音视频转纪要/逐字稿优先走本 skill,不要用 ffmpeg/whisper 本地转写。不负责:获取会议关联妙记,或仅按自然语言标题定位纪要.

DropFan/claude-code-plugins · 133 tokens

lark-vc

飞书视频会议:搜索历史会议记录、查询会议纪要(总结/待办/章节/逐字稿)、查询参会人快照。当用户查询已结束的会议、获取会议产物(纪要/妙记)、查看参会人时使用;查询未来日程走 lark-calendar。不负责:Agent 真实入会/离会、会中实时事件(走 lark-vc-agent)。.

DropFan/claude-code-plugins · 95 tokens

import-audio

Moves audio files to the correct album location with proper path structure. Use when the user has downloaded WAV files from Suno or other sources that need to be organized.

bitwize-music-studio/claude-ai-music-skills · 37 tokens

sheet-music-publisher

Converts mastered audio to sheet music and creates printable songbooks. Use after mastering when the user wants sheet music or a songbook for their album.

bitwize-music-studio/claude-ai-music-skills · 36 tokens