技能圖譜SKILLSGROVE
技能圖譜/辦公文件/RUC-NLPIR/CoworkOS/office-documents

office-documents

安裝

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

簡介

原文描述 · MITCreate, inspect, edit, render, and validate Word and Excel files (.docx, .xlsx). Use for reports, spreadsheets and conversions; use presentations for PowerPoint work.
以下 SKILL.md 內容轉載自 RUC-NLPIR/CoworkOS(提交 baf03c3),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 CoworkOS contributors 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

Office documents

Use this skill for DOCX and XLSX files. For PowerPoint, load presentations; a bound editor also uses pptist. The skill supplies workflow and format knowledge; the runtime stays generic.

Workflow

  1. Load this skill with load_skill and run node <absolute-script-path> using its returned scripts["check_backend.mjs"]. When loaded by read, resolve scripts/check_backend.mjs against the actual parent directory of the SKILL.md you read. Never guess a location under ~/.agents/skills. Prefer the local officecli executable when it is available. If it is absent, use the detected Python format library for structured editing. Do not install packages or upload files without an explicit user request.
  2. Work on a copy in the current Agent's workspace. Preserve the user's original. Subagents keep candidate results under their private deliverables/; Main keeps scripts and intermediate previews under work/ and writes or copies accepted final files into the Task's artifacts/ with ordinary file/command tools. Only Task artifacts/ files appear as user deliverables.
  3. Inspect before editing. Use OfficeCLI view/get/query for structure and text; use render for a visual preview. Read the relevant reference in references/ only when the operation needs format-specific details.
  4. Make the smallest reliable change. Group independent OfficeCLI changes in one batch when possible, then validate and inspect issues.
  5. Render the result again and review the preview. Fix layout, missing content, invalid references, and accidental template changes before delivery.
  6. Return a concise conclusion with the output path, preview/validation evidence, and any backend limitation. Do not claim success when only a plan was produced.

Backend rules

  • @officecli/officecli from iOfficeAI/OfficeCLI is the preferred structured local backend when installed. It supports inspection, JSON-shaped operations, validation, and rendering for common Office formats.
  • Python fallbacks are format-specific: python-pptx can create and edit PPTX structure, python-docx handles DOCX structure, and openpyxl handles XLSX structure. These libraries do not render Office files, so a visual preview requires LibreOffice/soffice or another renderer.
  • LibreOffice/soffice is a useful conversion or rendering fallback, but it is not a substitute for structured editing. If no backend is available, explain the blocker instead of silently producing a fake file.
  • Keep Office-specific command knowledge in the references and load it on demand. Do not add a permanent Office tool or put the full workflow into the global Main prompt.

The generic read_file tool is restricted to the Agent's own working directory. The load_skill result already contains this skill's main instructions; to inspect a referenced file or run a bundled script outside that directory, use run_command with the absolute directory returned by load_skill (for example, cat <skill-directory>/references/format-checklist.md or node <skill-directory>/scripts/check_backend.mjs).

Ownership and evidence

Main remains responsible for task decomposition, decisions, and the final judgment. A Subagent may execute a focused Office artifact task, but must report the actual commands, output paths, and validation/render evidence in its final message. Prefer one artifact-focused task per Subagent.

See references/officecli.md for command patterns and references/format-checklist.md for format-specific acceptance checks.

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

Copyright (c) 2026 CoworkOS contributors

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.