Skip to content

FISCFED9/CLI / .agents/skills/docx-processing-lawvable

Word Editor

Verified

Edit, query, and transform Word documents (.docx) with the SuperDoc CLI. Use when the user asks to read, search, modify, format, comment, track changes, or review changes in .docx files. Triggers on any task involving Word documents — text replacement, redlining, contract markup, template filling, bulk edits, content extraction, or document review.

FileKindSize
LICENSE.txtmarkdown33.7 KB
SKILL.mdskill md5.6 KB
references/bookmarks-footnotes.mdmarkdown2.2 KB
references/citations.mdmarkdown2.6 KB
references/comments.mdmarkdown2.6 KB
references/content-controls.mdmarkdown6.2 KB
references/create.mdmarkdown2.6 KB
references/diff.mdmarkdown2.0 KB
references/format.mdmarkdown7.3 KB
references/headers-footers.mdmarkdown1.4 KB
references/hyperlinks.mdmarkdown2.1 KB
references/images.mdmarkdown2.6 KB
references/index.mdmarkdown6.0 KB
references/lists.mdmarkdown4.3 KB
references/mutations-apply.mdmarkdown6.4 KB
references/mutations.mdmarkdown4.8 KB
references/protection.mdmarkdown849 B
references/reading.mdmarkdown5.2 KB
references/sections.mdmarkdown1.8 KB
references/session.mdmarkdown2.7 KB
references/tables.mdmarkdown7.2 KB
references/toc.mdmarkdown2.3 KB
references/track-changes.mdmarkdown1.8 KB

references/mutations.md

View on GitHub
# Core Mutation Commands

### replace

Replace content at a contiguous document selection. Text path accepts a SelectionTarget or ref plus replacement text. Structural path replaces whole blocks with SDFragment content.

```bash
superdoc replace --tracked --block-id <id> --start <n> --end <n> --text "new text" 2>/dev/null
superdoc replace --tracked --target-json '<SelectionTarget>' --text "new text" 2>/dev/null
superdoc replace --tracked --ref-json '"text:v4:eyJ..."' --text "new text" 2>/dev/null
```

| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--text` | string | no* | Replacement text (text path) |
| `--target-json` | JSON | no* | SelectionTarget from `query match` |
| `--ref-json` | JSON | no* | Ref string from `query match` handle |
| `--block-id` | string | no* | Target block ID (flat flag alternative) |
| `--start` | number | no* | Start offset within block |
| `--end` | number | no* | End offset within block |
| `--content-json` | JSON | no* | SDFragment for structural replacement |
| `--in-json` | JSON | no | Story scope |
| `--nesting-policy-json` | JSON | no | `{"tables":"allow"}` to permit nested tables |
| `--tracked` | boolean | no | Apply as tracked change |
| `--change-mode` | string | no | `direct` or `tracked` |
| `--dry-run` | boolean | no | Preview without applying |
| `--expected-revision` | number | no | Optimistic concurrency check |

*Must provide either `--text` or `--content-json`, and one of: `--target-json`, `--ref-json`, or `--block-id`+`--start`+`--end`.

### insert

Insert content into the document. Text mode inserts inline content at a position. Structural mode inserts blocks.

```bash
superdoc insert --tracked --value "text to insert" 2>/dev/null                              # append to end
superdoc insert --tracked --block-id <id> --offset <n> --value "text" 2>/dev/null           # insert at position
superdoc insert --tracked --type markdown --value "## New Heading" 2>/dev/null               # insert markdown
superdoc insert --tracked --type html --value "<p>Paragraph</p>" 2>/dev/null                 # insert html
```

| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--value` | string | no* | Text/markdown/html content |
| `--type` | string | no | `text` (default), `markdown`, `html` |
| `--target-json` | JSON | no | SelectionTarget or BlockNodeAddress for positioning |
| `--ref` | string | no | Ref string for positioning |
| `--block-id` | string | no | Block ID for inline insertion |
| `--offset` | number | no | Character offset within block |
| `--start` | number | no | Start offset (alias for text-based positioning) |
| `--end` | number | no | End offset |
| `--placement` | string | no | `before`, `after`, `insideStart`, `insideEnd` (structural inserts) |
| `--content-json` | JSON | no* | SDFragment for structural insertion |
| `--in-json` | JSON | no | Story scope |
| `--nesting-policy-json` | JSON | no | `{"tables":"allow"}` to permit nested tables |
| `--tracked` | boolean | no | Apply as tracked change |
| `--change-mode` | string | no | `direct` or `tracked` |
| `--dry-run` | boolean | no | Preview without applying |

*Provide either `--value` or `--content-json`. When both target and value are omitted, content appends at document end.

### delete

Delete content at a contiguous document selection. Supports cross-block deletion.

```bash
superdoc delete --tracked --block-id <id> --start <n> --end <n> 2>/dev/null
superdoc delete --tracked --target-json '<SelectionTarget>' 2>/dev/null
superdoc delete --tracked --ref "text:v4:eyJ..." 2>/dev/null
```

| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--target-json` | JSON | no* | SelectionTarget |
| `--ref` | string | no* | Ref string from query match |
| `--block-id` | string | no* | Target block ID |
| `--start` | number | no* | Start offset |
| `--end` | number | no* | End offset |
| `--behavior` | string | no | `selection` (default) or `exact` |
| `--in-json` | JSON | no | Story scope |
| `--tracked` | boolean | no | Apply as tracked change |
| `--change-mode` | string | no | `direct` or `tracked` |
| `--dry-run` | boolean | no | Preview without applying |

*Provide one of: `--target-json`, `--ref`, or `--block-id`+`--start`+`--end`.

### clear-content

Clear all document body content, leaving a single empty paragraph.

```bash
superdoc clear-content 2>/dev/null
```

### blocks delete

Delete an entire block node by address.

```bash
superdoc blocks delete --target-json '{"kind":"block","nodeType":"paragraph","nodeId":"ABC"}' --dry-run 2>/dev/null
```

### blocks delete-range

Delete a contiguous range of top-level blocks between two endpoints (inclusive).

```bash
superdoc blocks delete-range --start-json '<BlockNodeAddress>' --end-json '<BlockNodeAddress>' 2>/dev/null
```
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall