office-tools
Skill này làm gì
Skill này là bộ công cụ dòng lệnh để đọc cấu trúc tài liệu, chỉnh sửa có mục tiêu, xử lý các thay đổi được theo dõi và kiểm tra gói tệp. Skill dành cho người cần chỉnh sửa cẩn thận tệp Office mà không phải viết lại toàn bộ, vốn rủi ro.
Khi nào nên dùng
- ✓Khi bạn muốn đọc cấu trúc của một tệp Word, PowerPoint hoặc Excel.
- ✓Khi bạn muốn chấp nhận hoặc rà soát các thay đổi được theo dõi hoặc bình luận trong tệp Word.
- ✓Khi bạn muốn kiểm tra một tệp Office xem có vấn đề gì khiến nó không mở được không.
Liên kết skill
https://github.com/Fei2411/DS-Bot/blob/main/ds-bot/src/office/skills/office-tools/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra báo cáo Word của tôi xem có lỗi nào khiến nó không mở được không, và liệt kê các bình luận trong đó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chạy công cụ đi kèm để đọc các khối của tệp và kiểm tra gói của nó. Agent ghi các chỉnh sửa vào một tệp mới, hoặc sửa tại chỗ khi bạn yêu cầu, rồi báo cáo kết quả.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Office tools
A bundled command line for the jobs the format skills cannot do safely: reading a document's structure with stable ids, repairing packages, targeted edits, tracked changes, layout findings, and contact sheets of rendered pages. Run every command through the Node and CLI paths in the runtime block at the end of this skill.
Every command accepts --json and prints {"ok":true,"data":…} for a run that completed, or {"ok":false,"error":{"code","message"}} when it failed. Findings are results, not failures: they land inside data.findings with ok still true, and the exit code carries them — 0 = ok, 1 = findings remain, 2 = usage or failure. Edits write a new file (-o out) or overwrite the input (--in-place); they never touch the input otherwise.
Commands
unpack <file> <dir>/pack <dir> <file>— extract a package to readable XML and repack it.pack --against <original>also runscheckagainst the original.check <file|dir> [--against <original>] [--fix]— only defects that make Office refuse a file or show a repair prompt.--againstreports just the issues the original lacks.--fixrepairs what is safe (xml:space, duplicate ids, content-type rows, dangling relationships).docx read <file> [--changes]— body blocks asp1…,t1…in reading order, with paragraph style, tables as cell rows (merges noted), headers/footers, footnotes/endnotes, comments and the paragraph each anchors to. Text shows tracked changes accepted;--changesmarks them inline ({+inserted (Ana)+},{-deleted (Ana)-}, moves, format changes, deleted paragraph marks).docx fields <file>— simple and complex fields with instruction and current result.docx edit <file> (-o out|--in-place) --ops <json|@file>— one batch of ops, all-or-nothing, ids fromdocx readof the same file:replace(cross-run text/regex, keeps formatting),set_cell,set_field,insert,delete,comment,accept_changes,reject_changes.pptx inventory <file> [--slides N…]— slide size, theme fonts, and every shape per slide: id, name, kind, placeholder, resolved box in inches (group transforms applied, layout/master placeholder inherited), text with run fonts and sizes, picture media.pptx layout <file> [--autofit]— overlapping text boxes and shapes off the slide, from the same resolved boxes.--autofitsetsa:normAutofiton the shapes found. Overflow inside a box still needs a render.pptx slides <file> -o|--in-place --order 3,1,1,5— reorder by current positions; a repeated position duplicates the slide (notes, charts and embedded workbooks copied); positions left out are removed.pptx clean <file|dir> [--dry-run]— drop slides not in the list, unreachable parts, dangling relationships/Overrides, unreferenced media (also works on docx/xlsx).xlsx inventory <file>— sheets (state, dimension, cell/formula counts, merges, tables, charts), defined names, every error cell with its formula, and a note when formulas have no cached value.xlsx read <file> --sheet <name> [--range A1:H40]— a grid of cached values with formulas shown; dates as ISO.sheet <png…|dir> -o <contact.png> [--cols 4] [--width 320]— one contact sheet of rendered pages, labelled with page numbers.
Workflows
Word — docx read for the ids → one docx edit batch over the opened document → docx read again to confirm → check --against <the untouched original> for anything left. Keep the original copy untouched (no --in-place on it).
PowerPoint — pptx inventory → edit (python-pptx through the format skill; pptx slides/pptx clean for structure) → pptx layout for overlap/off-slide findings → when office-render is in the catalog, render → sheet over the rendered images and look at the contact sheet before single slides → fix → recheck.
Excel — xlsx inventory → edit with openpyxl (format skill) → office-recalculate → xlsx inventory again and confirm no error cells and no uncached formulas.
XML edits — only through unpack, a real XML parser, and pack --against. Never sed or string-splice XML.
Finish line — check passes clean, pptx layout findings addressed or explained, the contact sheet looked at when rendering is available, and anything that could not be verified is said in the report.
Design rules for a new deck
One idea and one visual per slide. Titles state the point. One accent colour. A locked type scale. No card behind every paragraph. Draw
Câu hỏi thường gặp
Nó có thay đổi tệp gốc của tôi không?
Không, trừ khi bạn yêu cầu sửa tại chỗ. Nếu không, các chỉnh sửa được ghi vào một tệp đầu ra mới.
Có cần cài đặt không?
Không. Skill nói nó hoạt động ngoại tuyến và không cần cài đặt gì.
Một phát hiện nghĩa là gì?
Phát hiện là một vấn đề mà bước kiểm tra tìm thấy trong tệp. Nó được báo cáo mà không dừng việc chạy.
Chi tiết
Mô tả gốc của tác giả
Inspect, check, and edit .docx/.pptx/.xlsx packages in place — block-level reading, comments, tracked changes, slide inventory and layout checks, slide reorder/duplicate/cleanup, workbook errors, package checks, contact sheets. Works offline; nothing to install.
repo: Fei2411/DS-Bot
Độ phổ biến
- Sao GitHub
- 5.1k
- Vị trí xếp hạng
- #15052
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.