一键导入
office-document-generator
This skill teaches you how to PROPERLY create or edit binary document formats like PowerPoint (.pptx), Excel (.xlsx), and Word (.docx).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill teaches you how to PROPERLY create or edit binary document formats like PowerPoint (.pptx), Excel (.xlsx), and Word (.docx).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks ClawBot-Plus to add a note, list notes, search notes, or manage note folders.
Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
Create, search, and manage Bear notes via grizzly CLI.
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
BluOS CLI (blu) for discovery, playback, grouping, and volume.
| name | Office Document Generator |
| description | This skill teaches you how to PROPERLY create or edit binary document formats like PowerPoint (.pptx), Excel (.xlsx), and Word (.docx). |
| tags | ["powerpoint","excel","word","pptx","xlsx","docx","documents"] |
You must NEVER use the create_file action or echo commands to create .pptx, .xlsx, or .docx files. Those are binary formats. If you try to write text to them, they will become corrupted!
Instead, when the user asks you to create a presentation, spreadsheet, or document, you must ALWAYS use the run_code action to execute a Python script that relies on native libraries.
run_code exactly like this string:import subprocess
try:
import pptx
except ImportError:
subprocess.run(["pip", "install", "python-pptx", "--user"], check=True)
import pptx
from pptx import Presentation
from pptx.util import Inches, Pt
prs = Presentation()
# Title Slide
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "Project Title"
slide.placeholders[1].text = "Subtitle goes here"
# Content Slide
slide = prs.slides.add_slide(prs.slide_layouts[1])
slide.shapes.title.text = "Features"
tf = slide.shapes.placeholders[1].text_frame
tf.text = "First feature"
tf.add_paragraph().text = "Second feature"
prs.save("Presentation.pptx")
print("Successfully created Presentation.pptx!")
Use pandas and openpyxl.
import subprocess
try:
import pandas as pd
except ImportError:
subprocess.run(["pip", "install", "pandas", "openpyxl", "--user"], check=True)
import pandas as pd
import os
# Create dataframe
df = pd.DataFrame({
"Name": ["Alice", "Bob"],
"Score": [90, 85]
})
df.to_excel("Report.xlsx", index=False)
print("Successfully created Report.xlsx!")
Use python-docx.
import subprocess
try:
import docx
except ImportError:
subprocess.run(["pip", "install", "python-docx", "--user"], check=True)
import docx
doc = docx.Document()
doc.add_heading('Document Title', 0)
doc.add_paragraph('This is a paragraph in the docx file.')
doc.save("Document.docx")
print("Successfully created Document.docx!")
CRITICAL RULE: Always wrap the library import in a try...except ImportError block that runs pip install internally, so the code never fails if the PC doesn't have the library!