{"id":"1f5d1f37-9f84-4bca-9949-a845e81136b9","entityType":"agent","slug":"clawhub-axelhu-openclaw-office-toolkit","name":"Office Toolkit","canonicalUrl":"https://www.xpersona.co/agent/clawhub-axelhu-openclaw-office-toolkit","canonicalPath":"/agent/clawhub-axelhu-openclaw-office-toolkit","generatedAt":"2026-10-09T19:36:07.001Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":null},"description":"处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require... Skill: Office Toolkit Owner: axelhu Summary: 处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-01T10:28:14.136Z | auto - Initial release of office-toolkit, providing tools for reading, creating, and editing Word (.docx), Excel (.xlsx/.csv), PowerPoint (.pp","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 9.1K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s172yaxxd2drm0sc92554g9aq983hegj:openclaw-office-toolkit","sourceUrl":"https://clawhub.ai/axelhu/openclaw-office-toolkit","homepage":"https://clawhub.ai/axelhu/skills/openclaw-office-toolkit","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/axelhu/openclaw-office-toolkit","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/axelhu/skills/openclaw-office-toolkit","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":null},"stars":null,"forks":null,"downloads":9104,"packageName":null,"latestVersion":"1.0.0","tractionLabel":"9.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T02:32:53.436Z","lastCrawledAt":"2026-10-09T02:32:53.436Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T02:32:53.436Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.0","createdAt":"2026-04-01T10:28:14.136Z","changelog":"- Initial release of office-toolkit, providing tools for reading, creating, and editing Word (.docx), Excel (.xlsx/.csv), PowerPoint (.pptx), and PDF documents. - Utilizes python-docx, openpyxl, python-pptx, and pypdf libraries for core functionality. - Supports document conversion and additional features via pandoc and LibreOffice. - Includes code examples and formatting guidelines for typical Office file operations. - Specifies dependency installation steps and agent rules for robust document handling.","fileCount":3,"zipByteSize":4105}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s172yaxxd2drm0sc92554g9aq983hegj:openclaw-office-toolkit","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T19:36:07.001Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-axelhu-openclaw-office-toolkit/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":null},"readme":"Skill: Office Toolkit\n\nOwner: axelhu\n\nSummary: 处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require...\n\nTags: latest:1.0.0\n\nVersion history:\n\nv1.0.0 | 2026-04-01T10:28:14.136Z | auto\n\n- Initial release of office-toolkit, providing tools for reading, creating, and editing Word (.docx), Excel (.xlsx/.csv), PowerPoint (.pptx), and PDF documents.\n- Utilizes python-docx, openpyxl, python-pptx, and pypdf libraries for core functionality.\n- Supports document conversion and additional features via pandoc and LibreOffice.\n- Includes code examples and formatting guidelines for typical Office file operations.\n- Specifies dependency installation steps and agent rules for robust document handling.\n\nArchive index:\n\nArchive v1.0.0: 3 files, 4105 bytes\n\nFiles: _meta.json (142b), skill-card.md (1832b), SKILL.md (5512b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: office-toolkit\ndescription: \"处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Requires: python-docx, openpyxl, python-pptx, pypdf, pandoc, LibreOffice（验证用）。\"\nmetadata: {\"openclaw\":{\"emoji\":\"📄\",\"requires\":{\"anyBins\":[]}}}\n---\n\n# office-toolkit\n\n处理 Office 文档：Word（.docx）、Excel（.xlsx/.csv）、PPT（.pptx）、PDF。\n\n## 环境要求\n\n```bash\npip install --break-system-packages python-docx openpyxl python-pptx pypdf\nsudo apt install libreoffice-writer libreoffice-calc libreoffice-impress pandoc\n```\n\n## 快速参考\n\n| 任务 | 库/命令 |\n|------|---------|\n| 读 Word | `python-docx` 或 `pandoc -t markdown` |\n| 创建/编辑 Word | `python-docx` |\n| 读 Excel | `openpyxl` 或 `pandas` |\n| 创建/编辑 Excel | `openpyxl` |\n| 读 PPT | `python-pptx` |\n| 创建/编辑 PPT | `python-pptx` |\n| 读 PDF | `pypdf` 或 `pandoc` |\n| PDF 格式验证 | LibreOffice `soffice` |\n| PDF 转图片 | `pdftoppm` (poppler-utils) |\n\n---\n\n## Word (.docx)\n\n### 读取\n```python\nfrom docx import Document\ndoc = Document('file.docx')\nfor para in doc.paragraphs:\n    print(para.text)\n\n# 带格式提取\nimport subprocess\nresult = subprocess.run(['pandoc', '--track-changes=all', 'file.docx', '-t', 'markdown'], \n    capture_output=True, text=True)\nprint(result.stdout)\n```\n\n### 创建\n```python\nfrom docx import Document\nfrom docx.shared import Pt, Inches\n\ndoc = Document()\n# 标题\ndoc.add_heading('文档标题', 0)\n\n# 段落\np = doc.add_paragraph('正文内容')\np.runs[0].bold = True  # 加粗\np.runs[0].font.size = Pt(12)\np.runs[0].font.name = 'Arial'\n\n# 引用\ndoc.add_paragraph('引用内容', style='Intense Quote')\n\n# 表格\ntable = doc.add_table(rows=2, cols=3)\ntable.style = 'Light Grid Accent 1'\ntable.rows[0].cells[0].text = '表头1'\ntable.rows[0].cells[1].text = '表头2'\n\ndoc.save('output.docx')\n```\n\n### 编辑现有文档\n1. 解压 → 修改 XML → 重新打包（推荐用 python-docx 直接修改）\n2. 复杂格式建议用 LibreOffice 打开编辑\n\n---\n\n## Excel (.xlsx)\n\n### 读取\n```python\nimport openpyxl\nwb = openpyxl.load_workbook('file.xlsx')\nws = wb.active\nfor row in ws.iter_rows(values_only=True):\n    print(row)\n```\n\n### 创建/编辑\n```python\nimport openpyxl\nfrom openpyxl.styles import Font, PatternFill, Alignment\n\nwb = openpyxl.Workbook()\nws = wb.active\nws.title = '数据'\n\n# 写入\nws['A1'] = '姓名'\nws['B1'] = '年龄'\nws['A2'] = '张三'\nws['B2'] = 25\n\n# 格式化\nheader_fill = PatternFill(start_color='4472C4', end_color='4472C4', fill_type='solid')\nws['A1'].fill = header_fill\nws['A1'].font = Font(color='FFFFFF', bold=True)\nws['A1'].alignment = Alignment(horizontal='center')\n\n# 保存\nwb.save('output.xlsx')\n```\n\n### 格式化规则（财务场景）\n- 蓝色字体：硬编码输入值\n- 黑色字体：公式/计算\n- 绿色字体：同文件内链接\n- 红色字体：外部链接\n- 黄色背景：需要关注的假设\n\n---\n\n## PowerPoint (.pptx)\n\n### 读取\n```python\nfrom pptx import Presentation\nprs = Presentation('file.pptx')\nfor slide in prs.slides:\n    for shape in slide.shapes:\n        if hasattr(shape, 'text'):\n            print(shape.text)\n```\n\n### 创建\n```python\nfrom pptx import Presentation\nfrom pptx.util import Inches, Pt\n\nprs = Presentation()\nprs.slide_width = Inches(10)\nprs.slide_height = Inches(7.5)\n\n# 使用空白布局\nslide = prs.slides.add_slide(prs.slide_layouts[6])\ntitle = slide.shapes.title\nsubtitle = slide.placeholders[1]\ntitle.text = '演示标题'\nsubtitle.text = '副标题'\n\nprs.save('output.pptx')\n```\n\n### 设计原则\n- **颜色方案**：选一个大胆的配色，主色占60-70%，1-2个辅助色，1个尖锐强调色\n- **不要默认蓝色**：根据主题选配色\n- **深浅对比**：标题页用深色背景，结论页用浅色背景（\"三明治\"结构）\n- **排版留白**：不要堆满，留呼吸空间\n\n---\n\n## PDF\n\n### 读取\n```python\nfrom pypdf import PdfReader\nreader = PdfReader('file.pdf')\nprint(f'页数: {len(reader.pages)}')\nfor page in reader.pages:\n    print(page.extract_text())\n```\n\n### 合并\n```python\nfrom pypdf import PdfWriter, PdfReader\nwriter = PdfWriter()\nfor pdf_file in ['doc1.pdf', 'doc2.pdf']:\n    reader = PdfReader(pdf_file)\n    for page in reader.pages:\n        writer.add_page(page)\nwith open('merged.pdf', 'wb') as f:\n    writer.write(f)\n```\n\n### 分割\n```python\nreader = PdfReader('input.pdf')\nfor i, page in enumerate(reader.pages):\n    writer = PdfWriter()\n    writer.add_page(page)\n    with open(f'page_{i+1}.pdf', 'wb') as f:\n        writer.write(f)\n```\n\n### 旋转\n```python\npage = reader.pages[0]\npage.rotate(90)  # 顺时针90度\n```\n\n---\n\n## 依赖安装（当前环境状态）\n\n| 依赖 | 状态 |\n|------|------|\n| python-docx | ✅ 已安装 |\n| openpyxl | ✅ 已安装 |\n| python-pptx | ✅ 已安装 |\n| pypdf | ✅ 已安装 |\n| pandoc | ✅ 已安装 |\n| LibreOffice | ✅ 已安装 |\n\n---\n\n## Agent Rules\n\n- 创建文件前先确保目录可写\n- 复杂文档先尝试 python-docx 等库，库无法处理再用 LibreOffice\n- PDF 读取优先用 `pypdf`，文字提取效果差时用 `pandoc`\n- Excel 格式化参照财务规范（蓝/黑/绿/红字体 + 黄色背景）\n- LibreOffice 路径：`soffice` 或 `libreoffice`（已安装）\n- 收到文件路径时，先检查文件是否存在：`pathlib.Path(path).exists()`\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7bcaearb90wwcjbr9gpv32s5831k39\",\n  \"slug\": \"openclaw-office-toolkit\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1775039294136\n}\n\nFile v1.0.0:skill-card.md\n\n## Description:\n\nOffice Toolkit helps agents read, create, and edit Word, Excel, PowerPoint, CSV, and PDF documents using common Python document libraries plus Pandoc and LibreOffice when needed.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[axelhu](https://clawhub.ai/user/axelhu)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to inspect, generate, format, convert, and update Office documents and PDFs during document automation workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Privileged and unpinned setup commands can modify host system packages.\n\nMitigation: Review setup commands before installing, prefer a virtual environment, avoid --break-system-packages, and only use sudo apt install with trusted OS package sources.\n\nRisk: Document editing workflows can overwrite or damage existing files.\n\nMitigation: Keep backups before editing existing documents and verify outputs with the appropriate Office or PDF tooling.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/axelhu/skills/openclaw-office-toolkit)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown with inline code blocks and file-operation guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May produce or modify Office document files when the agent applies the guidance.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release metadata and artifact _meta.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.","readmeExcerpt":"Skill: Office Toolkit Owner: axelhu Summary: 处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-01T10:28:14.136Z | auto - Initial release of office-toolkit, providing tools for reading, creating, and editing Word (.docx), Excel (.xlsx/.csv), PowerPoint (.pp","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"pip install --break-system-packages python-docx openpyxl python-pptx pypdf\nsudo apt install libreoffice-writer libreoffice-calc libreoffice-impress pandoc"},{"language":"python","snippet":"from docx import Document\ndoc = Document('file.docx')\nfor para in doc.paragraphs:\n    print(para.text)\n\n# 带格式提取\nimport subprocess\nresult = subprocess.run(['pandoc', '--track-changes=all', 'file.docx', '-t', 'markdown'], \n    capture_output=True, text=True)\nprint(result.stdout)"},{"language":"python","snippet":"from docx import Document\nfrom docx.shared import Pt, Inches\n\ndoc = Document()\n# 标题\ndoc.add_heading('文档标题', 0)\n\n# 段落\np = doc.add_paragraph('正文内容')\np.runs[0].bold = True  # 加粗\np.runs[0].font.size = Pt(12)\np.runs[0].font.name = 'Arial'\n\n# 引用\ndoc.add_paragraph('引用内容', style='Intense Quote')\n\n# 表格\ntable = doc.add_table(rows=2, cols=3)\ntable.style = 'Light Grid Accent 1'\ntable.rows[0].cells[0].text = '表头1'\ntable.rows[0].cells[1].text = '表头2'\n\ndoc.save('output.docx')"},{"language":"python","snippet":"import openpyxl\nwb = openpyxl.load_workbook('file.xlsx')\nws = wb.active\nfor row in ws.iter_rows(values_only=True):\n    print(row)"},{"language":"python","snippet":"import openpyxl\nfrom openpyxl.styles import Font, PatternFill, Alignment\n\nwb = openpyxl.Workbook()\nws = wb.active\nws.title = '数据'\n\n# 写入\nws['A1'] = '姓名'\nws['B1'] = '年龄'\nws['A2'] = '张三'\nws['B2'] = 25\n\n# 格式化\nheader_fill = PatternFill(start_color='4472C4', end_color='4472C4', fill_type='solid')\nws['A1'].fill = header_fill\nws['A1'].font = Font(color='FFFFFF', bold=True)\nws['A1'].alignment = Alignment(horizontal='center')\n\n# 保存\nwb.save('output.xlsx')"},{"language":"python","snippet":"from pptx import Presentation\nprs = Presentation('file.pptx')\nfor slide in prs.slides:\n    for shape in slide.shapes:\n        if hasattr(shape, 'text'):\n            print(shape.text)"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: office-toolkit\ndescription: \"处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Requires: python-docx, openpyxl, python-pptx, pypdf, pandoc, LibreOffice（验证用）。\"\nmetadata: {\"openclaw\":{\"emoji\":\"📄\",\"requires\":{\"anyBins\":[]}}}\n---\n\n# office-toolkit\n\n处理 Office 文档：Word（.docx）、Excel（.xlsx/.csv）、PPT（.pptx）、PDF。\n\n## 环境要求\n\n```bash\npip install --break-system-packages python-docx openpyxl python-pptx pypdf\nsudo apt install libreoffice-writer libreoffice-calc libreoffice-impress pandoc\n```\n\n## 快速参考\n\n| 任务 | 库/命令 |\n|------|---------|\n| 读 Word | `python-docx` 或 `pandoc -t markdown` |\n| 创建/编辑 Word | `python-docx` |\n| 读 Excel | `openpyxl` 或 `pandas` |\n| 创建/编辑 Excel | `openpyxl` |\n| 读 PPT | `python-pptx` |\n| 创建/编辑 PPT | `python-pptx` |\n| 读 PDF | `pypdf` 或 `pandoc` |\n| PDF 格式验证 | LibreOffice `soffice` |\n| PDF 转图片 | `pdftoppm` (poppler-utils) |\n\n---\n\n## Word (.docx)\n\n### 读取\n```python\nfrom docx import Document\ndoc = Document('file.docx')\nfor para in doc.paragraphs:\n    print(para.text)\n\n# 带格式提取\nimport subprocess\nresult = subprocess.run(['pandoc', '--track-changes=all', 'file.docx', '-t', 'markdown'], \n    capture_output=True, text=True)\nprint(result.stdout)\n```\n\n### 创建\n```python\nfrom docx import Document\nfrom docx.shared import Pt, Inches\n\ndoc = Document()\n# 标题\ndoc.add_heading('文档标题', 0)\n\n# 段落\np = doc.add_paragraph('正文内容')\np.runs[0].bold = True  # 加粗\np.runs[0].font.size = Pt(12)\np.runs[0].font.name = 'Arial'\n\n# 引用\ndoc.add_paragraph('引用内容', style='Intense Quote')\n\n# 表格\ntable = doc.add_table(rows=2, cols=3)\ntable.style = 'Light Grid Accent 1'\ntable.rows[0].cells[0].text = '表头1'\ntable.rows[0].cells[1].text = '表头2'\n\ndoc.save('output.docx')\n```\n\n### 编辑现有文档\n1. 解压 → 修改 XML → 重新打包（推荐用 python-docx 直接修改）\n2. 复杂格式建议用 LibreOffice 打开编辑\n\n---\n\n## Excel (.xlsx)\n\n### 读取\n```python\nimport openpyxl\nwb = openpyxl.load_workbook('file.xlsx')\nws = wb.active\nfor row in ws.iter_rows(values_only=True):\n    print(row)\n```\n\n### 创建/编辑\n```python\nimport openpyxl\nfrom openpyxl.styles import Font, PatternFill, Alignment\n\nwb = openpyxl.Workbook()\nws = wb.active\nws.title = '数据'\n\n# 写入\nws['A1'] = '姓名'\nws['B1'] = '年龄'\nws['A2'] = '张三'\nws['B2'] = 25\n\n# 格式化\nheader_fill = PatternFill(start_color='4472C4', end_color='4472C4', fill_type='solid')\nws['A1'].fill = header_fill\nws['A1'].font = Font(color='FFFFFF', bold=True)\nws['A1'].alignment = Alignment(horizontal='center')\n\n# 保存\nwb.save('output.xlsx')\n```\n\n### 格式化规则（财务场景）\n- 蓝色字体：硬编码输入值\n- 黑色字体：公式/计算\n- 绿色字体：同文件内链接\n- 红色字体：外部链接\n- 黄色背景：需要关注的假设\n\n---\n\n## PowerPoint (.pptx)\n\n### 读取\n```python\nfrom pptx import Presentation\nprs = Presentation('file.pptx')\nfor slide in prs.slides:\n    for shape in slide.shapes:\n        if hasattr(shape, 'text'):\n            print(shape.text)\n```\n\n### 创建\n```python\nfrom pptx import Presentation\nfrom pptx.util import Inches, Pt\n\nprs = Presentation()\nprs.slide_width = Inches(10)\nprs.slide_height = Inches(7.5)\n\n# 使用空白布局\nslide = prs.slides.a"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7bcaearb90wwcjbr9gpv32s5831k39\",\n  \"slug\": \"openclaw-office-toolkit\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1775039294136\n}"},{"path":"skill-card.md","content":"## Description:\n\nOffice Toolkit helps agents read, create, and edit Word, Excel, PowerPoint, CSV, and PDF documents using common Python document libraries plus Pandoc and LibreOffice when needed.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[axelhu](https://clawhub.ai/user/axelhu)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to inspect, generate, format, convert, and update Office documents and PDFs during document automation workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Privileged and unpinned setup commands can modify host system packages.\n\nMitigation: Review setup commands before installing, prefer a virtual environment, avoid --break-system-packages, and only use sudo apt install with trusted OS package sources.\n\nRisk: Document editing workflows can overwrite or damage existing files.\n\nMitigation: Keep backups before editing existing documents and verify outputs with the appropriate Office or PDF tooling.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/axelhu/skills/openclaw-office-toolkit)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown with inline code blocks and file-operation guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May produce or modify Office document files when the agent applies the guidance.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release metadata and artifact _meta.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require... Skill: Office Toolkit Owner: axelhu Summary: 处理 Office 文档（Word/Excel/PPT/PDF）的技能。当用户要求读取、创建、编辑 Word 文档（.docx）、Excel 表格（.xlsx/.csv）、PPT（.pptx）或 PDF 时使用。基于 python-docx、openpyxl、python-pptx、pypdf 库。Require... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-01T10:28:14.136Z | auto - Initial release of office-toolkit, providing tools for reading, creating, and editing Word (.docx), Excel (.xlsx/.csv), PowerPoint (.pp","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":796,"uniquenessScore":55,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T02:32:53.436Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T19:36:07.001Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}