技能圖譜SKILLSGROVE
技能圖譜/辦公文件/TencentCloud/Octop/office-documents

office-documents

安裝

$npx skills add https://github.com/TencentCloud/Octop --skill office-documents
$git clone --depth 1 https://github.com/TencentCloud/Octop.git /tmp/Octop && mkdir -p ~/.claude/skills && cp -r /tmp/Octop/src/octop/infra/agents/builtin_skills/office-documents ~/.claude/skills/office-documents
請幫我安裝這個 Agent Skill:https://github.com/TencentCloud/Octop/tree/3935f8438b3d9c0e7eb5c690516e52e3d97cd1fe/src/octop/infra/agents/builtin_skills/office-documents ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

在同一個工作區裡建立、編輯和渲染 Word、Excel 與 PowerPoint 文件。

本站編輯撰寫的導讀

原文描述 · MITCreate, edit, inspect and render Word documents, Excel workbooks and PowerPoint presentations in this Octop workspace. 创建、检查、修改和渲染 Word、Excel、PowerPoint 文件。
以下 SKILL.md 內容轉載自 TencentCloud/Octop(提交 3935f84),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 Octop 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

Office documents

Work inside {{OCTOP_WORKSPACE}} using the active expert's file and execution tools. Find uploaded originals under inbound/. Use a descriptive output filename and preserve the original when editing. Use the execution environment's Python with the Octop Office dependencies. Check the exact input and the intended output before reporting success.

Requirements and fallback

This skill is off by default; the expert's owner turns it on in the skills panel. Before the first task in a conversation, check what the execution environment has:

python -c "import docx, openpyxl, pptx" && echo office-python-ok
python "{{OCTOP_BUILTIN_SKILLS}}/office-documents/scripts/render.py" --check
  • Editing needs python-docx, openpyxl and python-pptx in the execution environment's Python. If the import fails, tell the user which package is missing and do not hand over a file you could not reopen.
  • Page preview also needs LibreOffice (soffice) and Poppler (pdftoppm). --check prints what is missing. Remote and sandboxed environments often lack them.
  • When preview is unavailable, still reopen and validate the saved file as described below, and say plainly that the layout was not checked visually. Never claim a page-by-page review that did not happen.
Format Create Load and edit Check before delivery
Word from docx import Document and doc = Document() Open with Document(input_path). Edit the affected paragraphs, runs or table cells and call doc.save(output_path). Editing individual runs preserves their formatting. Reopen with Document(output_path) and check headings, tables and the requested text.
Excel from openpyxl import Workbook and book = Workbook() Use openpyxl.load_workbook(input_path, data_only=False). Change the target sheets or cells, retain formulas and save to the output path. Reopen the file, verify sheet names, target cell values and formulas. Recalculate using a spreadsheet application if computed values are part of the deliverable.
PowerPoint from pptx import Presentation and deck = Presentation() Open with Presentation(input_path). Update shapes, runs or charts on the requested slides and save via deck.save(output_path). Reopen the output, check slide count, titles and target shape content.

Page preview

Only when --check reports the renderer as available: for a visual check or when the user requests page images, run the following command inside the same workspace. The helper converts the document to PDF with LibreOffice and renders every page to PNG using Poppler. In Excel it respects the workbook's print areas and page setup.

python "{{OCTOP_BUILTIN_SKILLS}}/office-documents/scripts/render.py" "output/report.docx" "output/report-pages"

Choose a new preview directory on each run. Its document.pdf and page-*.png files come from the saved Office file. Open the images and inspect tables, wrapping and overflows before handing over the finished file. If the command fails, report the missing renderer and keep document validation separate from a visual check. The Octop chat file preview also opens Word, Excel and PowerPoint files, so the user can look at the layout themselves.

Use the platform's file delivery tool when available to attach the final workspace file to the conversation. Include preview images when requested.

檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 Octop

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.