google-workspace
The google-workspace skill provides access to Google Workspace CLI (gws) for automating tasks across Drive, Docs, Sheets, Gmail, Calendar, and Chat through structured API calls. Use this skill when working with Google Workspace resources requires programmatic operations like reading documents, listing files, sending emails, or managing calendar events, prioritizing it over generic HTTP requests because it handles authentication and returns machine-readable JSON output by default.
git clone --depth 1 https://github.com/swarmclawai/swarmclaw /tmp/google-workspace && cp -r /tmp/google-workspace/skills/google-workspace ~/.claude/skills/google-workspaceSKILL.md
# 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
1. Start with read/list/get commands before mutating Workspace state.
2. Confirm IDs first: document IDs, spreadsheet IDs, file IDs, message IDs, calendar IDs, space IDs.
3. Do not run interactive auth flows from an agent tool call. If auth is missing, report that `gws` needs to be configured in plugin settings or via a manual terminal login.
4. Keep commands machine-readable. Prefer JSON output and parse it instead of scraping human text.
5. For large list operations, limit the scope first, then page or filter.
## Common Commands
Check installation and health:
```bash
gws doctor
```
Inspect help for a resource or method:
```bash
gws help
gws drive help
gws drive files help
```
Google Docs:
```bash
gws docs get --document-id <DOC_ID>
```
Google Drive:
```bash
gws drive files list --params '{"pageSize":10}'
gws drive files get --file-id <FILE_ID>
```
Google Sheets:
```bash
gws sheets spreadsheets get --spreadsheet-id <SPREADSHEET_ID>
```
Gmail:
```bash
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:
```bash
gws calendar events list --calendar-id primary --params '{"maxResults":10,"singleEvents":true}'
```
Google Chat:
```bash
gws chat spaces messages list --parent spaces/<SPACE_ID>
```
## Tool Usage In SwarmClaw
When using the `google_workspace` tool:
- Put the `gws` command after the binary into `args`, for example:
`{"args":["drive","files","list"],"params":{"pageSize":5}}`
- Use `params` for `--params`
- Use `jsonInput` for `--json`
- Use `pageAll: true` when you intentionally want all pages
- Use `dryRun: true` before risky mutations if you are unsure
## Error Handling
- If `gws` is 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 `gws` manually.
- If a command fails because an ID is missing: switch to a list/search command first and find the right ID.Delegate coding tasks to external coding agents (Claude Code, Codex, Pi, OpenCode) via shell. Use when: (1) building new features or apps in a separate project, (2) reviewing PRs, (3) refactoring large codebases, (4) iterative coding that needs file exploration. NOT for: simple one-liner fixes (just edit directly), reading code (use read/file tools), or work inside the SwarmClaw workspace itself.
GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: local git operations (use git directly), non-GitHub repos, or cloning (use git clone).
Generate or edit images via Gemini 3 Pro Image (Nano Banana Pro). Use when asked to create, generate, or edit images and a Gemini API key is available. Supports text-to-image generation, single-image editing, and multi-image composition (up to 14 images).
Edit or create PDFs with natural-language instructions using the nano-pdf CLI. Use when asked to make a PDF, edit a PDF, add pages, change text in a PDF, or convert content to PDF format.
Generate images via OpenAI Images API (GPT Image, DALL-E 3, DALL-E 2). Supports batch generation with random prompt sampler and HTML gallery output. Use when asked to generate images with OpenAI and an OPENAI_API_KEY is available.
Always-on guidance for solving tasks resourcefully. Teaches agents to escalate through skills, CLI tools, and custom scripts instead of refusing. Applies to any request where the agent lacks a dedicated tool.
Create, edit, improve, or audit skills for SwarmClaw agents. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory. Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
Summarize or extract text/transcripts from URLs, podcasts, YouTube videos, and local files using the summarize CLI. Use when asked to summarize a link, article, video, or file, or to transcribe a YouTube video.