技能圖譜SKILLSGROVE
技能圖譜/辦公文件/workspace-dex/open-agent/office

office

安裝

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

簡介

原文描述 · MITOffice document tools - docx, xlsx, pptx, pdf creation/editing
以下 SKILL.md 內容轉載自 workspace-dex/open-agent(提交 f6d5345),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 Shakib S. 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

Office Documents Skill

Overview

Process Word, Excel, PowerPoint, and PDF files using command-line tools.

PDF (pdf)

# Install
pip install pypdf pdfplumber

# Extract text
python -c "
from pypdf import PdfReader
r = PdfReader('file.pdf')
print(f'Pages: {len(r.pages)}')
for p in r.pages:
    print(p.extract_text()[:500])
"

# Merge PDFs
python -c "
from pypdf import PdfWriter, PdfReader
w = PdfWriter()
for f in ['a.pdf', 'b.pdf']:
    r = PdfReader(f)
    for p in r.pages: w.add_page(p)
with open('merged.pdf', 'wb') as out: w.write(out)
"

Excel (xlsx)

# Install
pip install openpyxl pandas

# Create spreadsheet
python -c "
import openpyxl
wb = openpyxl.Workbook()
ws = wb.active
ws['A1'] = 'Name'
ws['B1'] = 'Value'
ws['A2'] = 'Item 1'
ws['B2'] = 100
wb.save('data.xlsx')
"

# Read with pandas
python -c "
import pandas as pd
df = pd.read_excel('data.xlsx')
print(df)
"

Word (docx)

# Install
pip install python-docx

# Create document
python -c "
from docx import Document
doc = Document()
doc.add_heading('Title', 0)
doc.add_paragraph('Content here')
doc.save('doc.docx')
"

PowerPoint (pptx)

# Install  
pip install python-pptx

# Create presentation
python -c "
from pptx import Presentation
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[0])
title = slide.shapes.title
title.text = 'Title'
prs.save('deck.pptx')
"
檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 Shakib S.

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.