officecli-docx
하는 일
이 스킬은 officecli 도구로 .docx Word 파일을 다루도록 AI 에이전트를 안내합니다. Word 문서를 쓰거나, 서식을 지정하거나, 수정하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓Word 보고서, 편지, 메모, 제안서를 .docx 파일로 작성하고 싶을 때.
- ✓기존 Word 파일을 읽거나 내용을 추출해야 할 때.
- ✓템플릿을 편집하거나, 목차를 추가하거나, 댓글을 다루고 싶을 때.
스킬 링크
https://github.com/iOfficeAI/OfficeCLI/blob/main/skills/officecli-docx/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“한 페이지짜리 편지를 Word 파일로 작성하고 바닥글에 페이지 번호를 넣어 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 officecli로 문서 구조를 읽고, 내용, 스타일, 머리글과 바닥글을 편집한 뒤, 결과를 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
OfficeCLI DOCX Skill
Setup
If officecli is missing:
- macOS / Linux:
curl -fsSL https://d.officecli.ai/install.sh | bash - Windows (PowerShell):
irm https://d.officecli.ai/install.ps1 | iex
Verify with officecli --version (open a new terminal if PATH hasn't picked up). If install fails, download a binary from https://github.com/iOfficeAI/OfficeCLI/releases.
⚠️ Help-First Rule
This skill teaches what good docx looks like, not every command flag. When a property name, enum value, or alias is uncertain, consult help BEFORE guessing.
officecli help docx # List all docx elements
officecli help docx <element> # Full element schema (e.g. paragraph, field, numbering, watermark, toc)
officecli help docx <verb> <element> # Verb-scoped (e.g. add field, set section)
officecli help docx <element> --json # Machine-readable schema
Help is pinned to the installed CLI version. When this skill and help disagree, help is authoritative.
Mental Model
A .docx is a ZIP of XML parts (document.xml, styles.xml, numbering.xml, header*.xml, footer*.xml, comments.xml, …). Everything the user sees — headings, tables, page numbers, TOC, tracked changes — is XML inside that ZIP. officecli gives you a semantic-path API (/body/p[1]/r[2]) over it, so you almost never touch raw XML; when you must, use raw-set (see the XML appendix).
Shell & Execution Discipline
docx paths contain []; some prop values contain $. Both are shell metacharacters. Escaping happens at three layers — keep them separate.
- Shell. ALWAYS quote element paths:
"/body/p[1]", not/body/p[1](zsh/bash glob[N]). Single-quote any value containing$:--prop text='$50M'— at any length, the whole value inside one pair of single quotes. Unquoted$50Mis stripped toM; mixing'…$var…'and"…$50…"on one long string is where the$50silently vanishes. - CLI (
text=). The two-char escapes\n,\vand\tARE interpreted in--prop text=(same rule as pptx):\nstarts a new paragraph (each new<w:p>inherits the source paragraph's style),\vis a soft line break within one paragraph (<w:br/>),\ta<w:tab/>. Double the backslash (\\n) for a literal backslash-n (rarely wanted). Row-level table shortcutsc1…cNare the exception: there\nis a<w:br/>line break inside the cell (see recipe (e)). - JSON (batch). Batch does NOT interpret the two-char escapes — a JSON
"\\n"or"\\v"lands as literal text. Use JSON escapes for the real characters:"\n"(a newline) starts a new paragraph,"\u000b"is a soft line break.
If in doubt, view text after writing and compare character-for-character.
Incremental execution. officecli mutates the file on every call. Run commands one at a time and check each exit code — a 50-command script that fails at command 3 cascades silently. After any structural op (new style, table, TOC, section break) run get on it before stacking more.
Open/save lifecycle: officecli open <file> at the start, officecli save <file> at the end to flush to disk — save only writes and leaves the resident warm for follow-up edits; reach for officecli close <file> only to release the resident on a one-shot handoff. Both are always safe (never error or lose work). For many paragraphs of one style, use batch (one pass for the whole array). Flush only at the non-officecli boundary: officecli's own reads always see your edits; run save/close only before a non-officecli program reads the file (python-docx, Word, a renderer, delivery).
$FILE convention. All commands use "$FILE" — set it once (FILE="your-doc.docx"). Never copy a literal doc.docx / review.docx into output — always substitute your actual target.
Requirements for Outputs
Deliverable standards every document MUST meet — know these before reaching for a command.
Clear hierarchy. Every non-trivial document has Title → Heading 1 → Heading 2 → body, not a wall of unstyled Normal paragraphs. If view outline shows one flat list, the hierarchy is missing.
Explicit heading sizes (Word default style sizes drift between templates): H1 ≥ 18pt (20pt for long reports), H2 = 14pt bold, H3 = 12pt bold, body = 11–12pt, line spacing 1.15–1.5x. Prefer style=Heading1 over inline sizes so a retheme touches the definition once — but set explicit sizes when you can't trus
자주 묻는 질문
Word가 설치되어 있어야 하나요?
아닙니다. 스킬에 따르면 officecli는 Microsoft Office 없이 작동합니다.
변경 내용 추적도 다룰 수 있나요?
네. 스킬은 변경 내용 추적과 댓글을 다룹니다.
정확한 속성 이름은 어디에서 찾나요?
스킬은 officecli의 help 명령을 참고하라고 안내합니다.
상세 정보
작성자의 원본 설명
Use this skill any time a .docx file is involved -- as input, output, or both. This includes: creating Word documents, reports, letters, memos, or proposals; reading, parsing, or extracting text from any .docx file; editing, modifying, or updating existing documents; working with templates, tracked changes, comments, headers/footers, or tables of contents. Trigger whenever the user mentions 'Word doc', 'document', 'report', 'letter', 'memo', or references a .docx filename.
repo: iOfficeAI/OfficeCLI
인기도
- GitHub 스타
- 33k
- 순위
- #9132
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 30.
댓글
- …
이 저장소의 다른 스킬
officecli
33k에이전트가 officecli 도구로 Office를 설치하지 않고도 Word, Excel, PowerPoint 파일을 만들고, 읽고, 확인하고, 편집하도록 돕습니다.
morph-ppt-3d
33k에이전트가 3D GLB 모델과 슬라이드 사이의 부드러운 Morph 전환 효과를 넣은 PowerPoint 발표 자료를 만들도록 돕습니다.
morph-ppt
33k에이전트가 슬라이드 사이에서 도형이 움직이거나 커지거나 회전하는 부드러운 Morph 전환 효과가 있는 PowerPoint 파일을 만들도록 돕습니다.
officecli-academic-paper
33k에이전트가 인용, 수식, 저널 스타일 레이아웃을 갖춘 연구 논문, 학위논문, 원고를 Word 파일로 서식 지정하도록 돕습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.