xirothedev/opencode-office-plugin/office
Claude Code and agent skill by xirothedev/opencode-office-plugin
- community
Checking that the SKILL.md file is still in the repository.
MAIN method for Office and PDF — every read, create, edit, review, convert, version of .docx/.doc/.dotx/.xlsx/.xls/.xlsm/.pptx/.ppt/.pdf (and images) MUST go through officecli. Use whenever a task touches .docx/.doc/.xlsx/.xls/.pptx/.ppt/.pdf/image files or asks for document drafts, suggestions, track changes, history, batch generation, or format export. The native read/edit/write tools are blocked for these extensions.
Install
npx vskill@latest install xirothedev/opencode-office-plugin/officeSKILL.md
The same SKILL.md was published earlier as xirothedev/opencode-office-plugin/office.
Office documents
MAIN for Office/PDF — every read and handle (create/edit/accept/undo/history/revert/comment/track-change) of.docx/.doc/.dotx/.dotm/.xlsx/.xls/.xlsm/.xlsb/.xltx/.pptx/.ppt/.potx/.pdf(and images.png/.jpg/.jpeg/.gif/.bmp/.tiff/.webp) MUST go throughofficecli. The plugin's guard blocks the nativeread/edit/writetools for these extensions and errors withuse officecli tool for office/PDF files — office is the main method for read + handle. Do not bypass.
The plugin overrides the builtin edit tool: every edit — text or binary — runs through a draft and needs officecli accept to reach the real file. Two edit surfaces:
officecli(action="edit", filePath, content)— replaces the whole draft with your markdown (for office/PDF, this is the ONLY write surface)edittool (filePath,oldString,newString) — patches the existing draft in place (text files only; blocked for office/PDF/images)
For office/PDF/images, officecli is the ONLY path: read returns markdown, create/edit consume markdown, both sides inside officecli. Never use read/edit/write on *.docx,*.doc,*.dotx,*.xlsx,*.xls,*.xlsm,*.pptx,*.ppt,*.pdf,*.png,*.jpg,*.jpeg,*.gif — guard fails them. For live Word content on the same machine use officecli(action="read", live=true) (prefers Application.Word document whose full name matches filePath, falls back to saved file; local-only).
Draft lifecycle (every task)
Every write runs through a draft: nothing reaches the real file until accept. The lock is claimed lazily on the first mutating action and released on accept/undo.
create filePath + contentfor a new file, oredit filePath + contentto open an existing file's draft- Re-
edit,comment,approve,metadata,watermarkfreely while iterating — all mutate the same draft acceptflushes the draft to disk, records a version snapshot, releases the lock
Done means: every write path ended in accept or undo. A dropped draft leaves the file locked and the change invisible.
Universal actions (all via officecli — main for office/PDF):
read—officecli(action="read")extract any office/PDF/image to markdown; inspect before editing anything you did not author this session (nativereadis blocked for.docx/.doc/.xlsx/.xls/.pptx/.ppt/.pdf)diff— unified markdown diff of draft vs real file; call before accept on edits to files you didn't createpreview— renders the draft to an HTML file for human inspectionundo— discard draft, real file unchangedlist— active drafts across all files; run when resuming after an interruption- Stale lock (
staleLockHours, default 24h):lock-status, thenforce-release— the displaced session's next mutation fails with an error, expected
Bundled format skills (anthropics/skills, source-available)
skills/docx, skills/xlsx, skills/pptx, skills/pdf are bundled verbatim from anthropics/skills (see LICENSE.txt in each). They hold the canonical gotchas and helper scripts per format. skills/office is the router + draft/history; delegate format-specific authoring to the bundled skill when fidelity matters. Quick markdown→officecli covers 80%; the bundled skill covers the 20% that silently corrupts.
| Need | Where | |
|---|---|---|
| Simple headings + pipe tables (markdown enough) | officecli create/edit → v2 styled defaults (A4, D9E1F2, DXA) | |
| Precise .docx: sections, images, TOC, page size, redlines, comments | skills/docx — docx npm + scripts/merge_runs.py/comment.py/accept_changes.py/office/validate.py + soffice | |
| XLSX with formulas, styling, recalc | skills/xlsx — openpyxl + scripts/recalc.py (mandatory) + pandas for bulk | |
| Styled .pptx / template fill | skills/pptx — pptxgenjs + scripts/add_slide.py/thumbnail.py/clean.py | |
| PDF forms, table extraction, merge/split | skills/pdf — forms.md/reference.md + pypdf/pdfplumber/reportlab helpers |
Advanced edit on existing file: officecli read to inspect → officecli edit to open draft → run the format skill's script against the draft file (see officecli list / .opencode/office/drafts/ in src/core/draft/manager.ts:18), iterate → officecli accept. Never touch the real file bypassing the lock. For quick markdown writes, officecli edit alone is enough.
Task router
| Task type | Reference | |
|---|---|---|
| New document, template batch generation, validation gates, format conversion | authoring.md + format skill (docx/xlsx/pptx/pdf) | |
| Editing/reviewing existing documents, suggestions, track changes, version recovery | reviewing.md + docx:editing / pptx:editing sections | |
| Fillable PDF forms | pdf/forms.md + scripts/check_fillable_fields.py | |
| XLSX recalc / financial model | xlsx SKILL recalc.py section |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtests/isolated-workspace/skills/office/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xirothedev/opencode-office-plugin/office)