google-workspace
关于
This Claude Skill enables developers to interact with Google Workspace APIs using the `gws` CLI tool for automating tasks across Drive, Docs, Sheets, Gmail, Calendar, and Chat. It provides structured JSON output and is preferred over generic HTTP calls for Workspace API operations. Use it when you need to manage or automate Google Workspace resources programmatically.
快速安装
Claude Code
推荐npx skills add swarmclawai/swarmclaw -a claude-code/plugin add https://github.com/swarmclawai/swarmclawgit clone https://github.com/swarmclawai/swarmclaw.git ~/.claude/skills/google-workspace在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Google Workspace CLI
Use gws when the task is about Google Workspace resources or Google Workspace API automation.
Prefer gws over generic HTTP calls when possible because it already knows the Workspace API surface and returns structured JSON by default.
Rules
- Start with read/list/get commands before mutating Workspace state.
- Confirm IDs first: document IDs, spreadsheet IDs, file IDs, message IDs, calendar IDs, space IDs.
- Do not run interactive auth flows from an agent tool call. If auth is missing, report that
gwsneeds to be configured in plugin settings or via a manual terminal login. - Keep commands machine-readable. Prefer JSON output and parse it instead of scraping human text.
- For large list operations, limit the scope first, then page or filter.
Common Commands
Check installation and health:
gws doctor
Inspect help for a resource or method:
gws help
gws drive help
gws drive files help
Google Docs:
gws docs get --document-id <DOC_ID>
Google Drive:
gws drive files list --params '{"pageSize":10}'
gws drive files get --file-id <FILE_ID>
Google Sheets:
gws sheets spreadsheets get --spreadsheet-id <SPREADSHEET_ID>
Gmail:
gws gmail users messages list --user-id me --params '{"maxResults":10}'
gws gmail users messages get --user-id me --message-id <MESSAGE_ID>
Google Calendar:
gws calendar events list --calendar-id primary --params '{"maxResults":10,"singleEvents":true}'
Google Chat:
gws chat spaces messages list --parent spaces/<SPACE_ID>
Tool Usage In SwarmClaw
When using the google_workspace tool:
- Put the
gwscommand after the binary intoargs, for example:{"args":["drive","files","list"],"params":{"pageSize":5}} - Use
paramsfor--params - Use
jsonInputfor--json - Use
pageAll: truewhen you intentionally want all pages - Use
dryRun: truebefore risky mutations if you are unsure
Error Handling
- If
gwsis missing: tell the user to install Google Workspace CLI. - If auth is missing or expired: tell the user to configure the plugin settings or authenticate
gwsmanually. - If a command fails because an ID is missing: switch to a list/search command first and find the right ID.
GitHub 仓库
相关推荐技能
railway-docs
文档Railway Docs Skill可实时获取最新的Railway官方文档,确保回答的准确性。当开发者询问Railway功能特性、工作原理或分享docs.railway.com链接时,应优先使用此技能。它通过专门的LLM优化文档源提供最新信息,避免依赖过时记忆来回答技术问题。
n8n-code-python
文档该Skill为在n8n平台的Python代码节点中编写代码提供专家指导,特别适用于需要使用_input/_json/_node语法、Python标准库或了解n8n中Python限制的场景。它强调JavaScript应作为首选方案,仅当需要特定Python功能或对Python语法更熟悉时才使用Python。Skill提供了快速入门模板和关键注意事项,帮助开发者在n8n中高效编写Python代码。
archon
文档Archon Skill为开发者提供了基于RAG的语义搜索和项目任务管理功能,可通过REST API访问知识库。它支持文档搜索、网站爬取、文件上传和版本控制,适用于技术文档查询和项目管理场景。首次使用时需要配置Archon主机地址,建议在处理外部文档时优先使用该Skill。
n8n-code-javascript
文档这个Skill为n8n工作流中的JavaScript代码节点提供专业指导,涵盖数据处理、HTTP请求和日期操作等核心场景。它详细解释了如何正确使用n8n特有的`$input`/`$json`语法、`$helpers`工具以及DateTime对象,并包含关键的错误排查和模式选择建议。开发者通过该Skill能快速掌握Code节点的正确返回格式、数据访问方法和常见陷阱解决方案。
