
关于
轻量级 Google Slides 集成,带独立 OAuth 认证。无需 MCP 服务器。完整读写访问。
name: google-slides-automation description: "轻量级 Google Slides 集成,带独立 OAuth 认证。无需 MCP 服务器。完整的读写访问权限。" license: Apache-2.0 risk: critical source: community metadata: author: sanjay3290 version: "1.0"
Google Slides
轻量级 Google Slides 集成,带独立 OAuth 认证。无需 MCP 服务器。完整的读写访问权限。
需要 Google Workspace 账户。 不支持个人 Gmail 账户。
何时使用
- 你需要从本地自动化创建、检查或修改 Google Slides 演示文稿。
- 任务涉及读取幻灯片文本、添加/删除幻灯片或批量更新演示文稿内容。
- 你想要在不使用 MCP 服务器的情况下对 Workspace 文档进行 Slides 自动化。
首次设置
使用 Google 进行认证(打开浏览器):
python scripts/auth.py login
检查认证状态:
python scripts/auth.py status
需要时登出:
python scripts/auth.py logout
读取命令
所有操作通过 scripts/slides.py。如果未登录,首次使用时会自动认证。
# Get all text content from a presentation
python scripts/slides.py get-text "1abc123xyz789"
python scripts/slides.py get-text "https://docs.google.com/presentation/d/1abc123xyz789/edit"
# Find presentations by search query
python scripts/slides.py find "quarterly report"
python scripts/slides.py find "project proposal" --limit 5
# Get presentation metadata (title, slide count, slide object IDs)
python scripts/slides.py get-metadata "1abc123xyz789"
写入命令
# Create a new empty presentation
python scripts/slides.py create "Q4 Sales Report"
# Add a blank slide to the end
python scripts/slides.py add-slide "1abc123xyz789"
# Add a slide with a specific layout
python scripts/slides.py add-slide "1abc123xyz789" --layout TITLE_AND_BODY
# Add a slide at a specific position (0-based index)
python scripts/slides.py add-slide "1abc123xyz789" --layout TITLE --at 0
# Find and replace text across all slides
python scripts/slides.py replace-text "1abc123xyz789" "old text" "new text"
python scripts/slides.py replace-text "1abc123xyz789" "Draft" "Final" --match-case
# Delete a slide by object ID (use get-metadata to find IDs)
python scripts/slides.py delete-slide "1abc123xyz789" "g123abc456"
# Batch update (advanced - for formatting, inserting shapes, images, etc.)
python scripts/slides.py batch-update "1abc123xyz789" '[{"replaceAllText":{"containsText":{"text":"foo"},"replaceText":"bar"}}]'
幻灯片布局
add-slide --layout 可用的布局:
BLANK- 空白幻灯片(默认)TITLE- 标题幻灯片TITLE_AND_BODY- 带正文的标题TITLE_AND_TWO_COLUMNS- 带两列文本的标题TITLE_ONLY- 仅标题栏SECTION_HEADER- 章节分隔符ONE_COLUMN_TEXT- 单列文本MAIN_POINT- 要点突出BIG_NUMBER- 大数字展示
演示文稿 ID 格式
你可以使用以下任一格式:
- 直接演示文稿 ID:
1abc123xyz789 - 完整 Google Slides URL:
https://docs.google.com/presentation/d/1abc123xyz789/edit
脚本会自动从 URL 中提取 ID。
输出格式
get-text
返回所有幻灯片中提取的文本,包括:
- 演示文稿标题
- 每张幻灯片上形状/文本框中的文本
- 包含单元格内容的表格数据
find
返回匹配的演示文稿列表:
{
"presentations": [
{"id": "1abc...", "name": "Q4 Report", "modifiedTime": "2024-01-15T..."}
],
"nextPageToken": "..."
}
get-metadata
返回演示文稿详情:
{
"presentationId": "1abc...",
"title": "My Presentation",
"slideCount": 15,
"pageSize": {"width": {...}, "height": {...}},
"hasMasters": true,
"hasLayouts": true
}
Token 管理
Token 使用系统密钥环安全存储:
- macOS:Keychain
- Windows:Windows Credential Locker
- Linux:Secret Service API(GNOME Keyring、KDE Wallet 等)
服务名称:google-slides-skill-oauth
使用 Google 的云函数自动刷新过期的 token。
限制
- 仅在任务明确符合上述描述范围时使用此技能。
- 不要将输出视为环境特定验证、测试或专家审查的替代品。
- 如果缺少必需的输入、权限、安全边界或成功标准,请停下来要求澄清。
兼容工具
Claude CodeCursor
标签
前端开发