Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Control Word App Via Osascript

ASecurity

Control Word app sessions, documents, selections, comments, export, and review state with osascript workflows.

19 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentsrustgorailsapisecurity

Works with

cursorcliapi

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add rondoflow/rondoflow --skill control-word-app-via-osascript --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Control Word App Via Osascript?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Control Word App Via Osascript
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rondoflow-control-word-app-via-osascript/badge)](https://www.skillsdirectory.com/skills/rondoflow-control-word-app-via-osascript)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: control-word-app-via-osascript
description: "Control Word app sessions, documents, selections, comments, export, and review state with osascript workflows."
category: "Integrations"
author: community
version: "1.0.0"
icon: plug
---

## When to Use

User needs Microsoft Word controlled as a live application, not treated as a `.docx` file format.
Agent handles app attach, active document state, selection-aware edits, comments, track changes, export, and clean shutdown through the official `osascript` CLI.
If the main artifact is offline DOCX creation or structural file editing, use `word-docx` instead.

## Architecture

Memory lives in `~/word/`. If `~/word/` does not exist, run `setup.md`. See `memory-template.md` for structure.

```text
~/word/
├── memory.md             # Environment facts, safe defaults, and last working control path
├── incidents.md          # Reusable failures and proven recovery steps
└── document-notes.md     # Non-sensitive notes about trusted documents, views, and export targets
```

## Quick Reference

Load only the smallest file that matches the current Word task and risk level.

| Topic | File |
|-------|------|
| Setup guide | `setup.md` |
| Memory template | `memory-template.md` |
| Interface selection | `execution-matrix.md` |
| Live control patterns | `live-control-patterns.md` |
| Destructive action guardrails | `safety-checklist.md` |
| Debug and recovery | `troubleshooting.md` |

## Requirements

- Microsoft Word installed locally.
- macOS with `osascript` available.
- Explicit confirmation before destructive document actions.

## Core Rules

### 1. Choose the app-control path by document state
- Use `osascript` for live Word document control through the app's scripting dictionary.
- Keep automation inside the live Word session instead of falling back to file-only DOCX tooling.
- Do not switch to offline document libraries when the requested job depends on the current live Word app state.

### 2. Identify the exact document and view before acting
- Confirm whether the target is the active document, a named open document, or a path to open now.
- Read the current view, selection, and review mode before making edits tied to cursor position or markup state.
- Never assume the frontmost Word window is the intended document.

### 3. Read before write, then verify the final state
- Pre-read document name, current selection, target paragraph, comment count, or export target before mutation.
- After edits, comments, accept/reject actions, or exports, re-read the affected state and report what changed.
- If Word does not reach the requested state, stop and diagnose instead of layering more edits.

### 4. Treat selection-driven actions as high-risk
- Selection-based commands can land in the wrong paragraph, story range, header, or comment balloon.
- When possible, anchor the action to a specific document object instead of only the current insertion point.
- If the selection context is ambiguous, clarify first.

### 5. Separate reversible review actions from destructive cleanup
- Adding comments, changing view, and exporting are usually reversible.
- Accept all changes, reject all changes, remove comments, close without save, and overwrite exports require explicit confirmation.
- If review state matters, preserve track changes and display settings unless the user explicitly asks to change them.

### 6. Keep provenance explicit
- State whether the target was already open or opened just for this task.
- Report what document was changed, which review mode was active, and where exports were written.
- Preserve user-owned open documents that were outside the task scope.

### 7. Recover cleanly and avoid orphaned app sessions
- If you opened Word just for this task, keep ownership clear and close only what you created.
- If you attached to an existing session, do not close unrelated documents or quit Word without explicit approval.
- On failure, record the exact blocker: protected document, modal dialog, compatibility mode, track changes mismatch, or missing permissions.

## Word Traps

- Treating a live document like a static `.docx` file -> review state, comments, fields, and view context drift apart.
- Writing relative to the current cursor without verifying selection -> text lands in the wrong story range.
- Accepting or rejecting changes globally when only one section was intended -> irreversible editorial loss.
- Exporting before fields, references, or TOC are updated -> stale output delivered as final.
- Closing an attached user session after automation -> unrelated writing work is interrupted.
- Ignoring protected view or tracked-change mode -> edits silently fail or create the wrong markup history.

## Security & Privacy

**Data that stays local:**
- Document paths, environment notes, and reusable fixes in `~/word/`.
- Document contents accessed through local Word automation.

**Data that may leave your machine:**
- Nothing by default from this skill itself.
- A document's own links, add-ins, macros, or cloud-backed autosave behavior may contact external systems.

**This skill does NOT:**
- Use Microsoft Graph, cloud document APIs, or OAuth flows.
- Disable review warnings silently.
- Accept destructive document-wide changes without explicit confirmation.
- Bypass Word protection prompts.

## Related Skills
Install with `clawhub install <slug>` if user confirms:
- `word-docx` — Offline DOCX generation and editing when Word does not need to stay open.
- `office` — Broader Office task routing across documents, spreadsheets, and presentations.
- `applescript` — macOS app automation patterns when Word dictionary work needs deeper script design.

## Feedback

- If useful: `clawhub star word`
- Stay updated: `clawhub sync`

Attribution

rondoflowrondoflow
View sourceMore from rondoflow →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

693621 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →