officecli-docx
Fungsinya
Skill ini memandu agent AI dalam mengerjakan file Word .docx melalui alat officecli. Ini untuk orang yang menulis, memformat, atau merevisi dokumen Word.
Kapan dipakai
- βSaat Anda ingin laporan, surat, memo, atau proposal Word ditulis sebagai file .docx.
- βSaat Anda perlu membaca atau mengambil teks dari file Word yang sudah ada.
- βSaat Anda ingin mengedit templat, menambahkan daftar isi, atau bekerja dengan komentar.
Link skill
https://github.com/iOfficeAI/OfficeCLI/blob/main/skills/officecli-docx/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda menulis surat satu halaman sebagai file Word dan menambahkan nomor halaman di footer?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memakai officecli untuk membaca struktur dokumen dan mengedit isi, gaya, header, serta footer, lalu memeriksa hasilnya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah saya perlu memasang Word?
Tidak. Skill ini menyatakan officecli bekerja tanpa Microsoft Office.
Apakah bisa menangani perubahan yang dilacak?
Ya. Skill ini mencakup perubahan yang dilacak dan komentar.
Dari mana bantuan diperoleh?
Skill ini mengarahkan ke perintah bantuan officecli untuk nama properti yang tepat.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 33k
- Peringkat
- #9132
- Lisensi
- Apache-2.0
- Diperbarui
- 30/10/2026
Komentar
- β¦
Skill lain dari repositori ini
officecli
33kMembantu agent Anda membuat, membaca, memeriksa, dan mengedit file Word, Excel, dan PowerPoint dengan alat officecli, tanpa perlu memasang Office.
morph-ppt-3d
33kMembantu agent Anda membuat presentasi PowerPoint dengan model 3D GLB dan transisi Morph yang halus antarslide.
morph-ppt
33kMembantu agent Anda membuat file PowerPoint dengan transisi Morph yang halus, di mana bentuk bergerak, membesar, atau berputar antarslide.
officecli-academic-paper
33kMembantu agent Anda memformat makalah riset, tesis, atau naskah sebagai file Word dengan sitasi, persamaan, dan tata letak gaya jurnal.
Skill serupa
feishu-doc
394kMembantu agent Anda membaca, membuat, dan mengedit dokumen cloud Feishu, termasuk teks, gambar, dan tabel, dengan memakai alat dokumen.
feishu-drive
394kMemungkinkan agent Anda menelusuri, mengatur, dan memberi komentar pada file di folder cloud Feishu yang sudah dibagikan kepada bot.
feishu-perm
394kMembantu agent Anda memeriksa dan mengubah siapa yang dapat mengakses file Feishu, dengan memilih izin terkecil yang memenuhi permintaan Anda.