From 656d7a8e506bba7e0326d747af987dd4c494899f Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Tue, 17 Mar 2026 11:21:07 -0700 Subject: [PATCH 1/2] feat(gws): add Google Workspace CLI plugin Vendor curated gws generate-skills output as a managed plugin with SessionStart hook, 61 skills (7 services, 12 helpers, 6 workflows, 2 personas, 33 recipes), and a /gws-sync curation skill for ongoing upstream synchronization. Skills are scoped to current OAuth grants (Gmail, Calendar, Drive, Docs, Sheets, Slides, Meet). Assisted-by: Claude:claude-opus-4-6 --- .claude-plugin/marketplace.json | 5 + .claude/skills/gws-sync.md | 91 ++++++++++++ .markdownlint-cli2.jsonc | 3 + CLAUDE.md | 1 + README.md | 1 + gws/.claude-plugin/plugin.json | 10 ++ gws/README.md | 69 +++++++++ gws/hooks/hooks.json | 15 ++ gws/skills/gws-calendar-agenda/SKILL.md | 55 +++++++ gws/skills/gws-calendar-insert/SKILL.md | 55 +++++++ gws/skills/gws-calendar/SKILL.md | 108 ++++++++++++++ gws/skills/gws-docs-write/SKILL.md | 49 +++++++ gws/skills/gws-docs/SKILL.md | 48 ++++++ gws/skills/gws-drive-upload/SKILL.md | 52 +++++++ gws/skills/gws-drive/SKILL.md | 137 ++++++++++++++++++ gws/skills/gws-gmail-forward/SKILL.md | 55 +++++++ gws/skills/gws-gmail-reply-all/SKILL.md | 62 ++++++++ gws/skills/gws-gmail-reply/SKILL.md | 58 ++++++++ gws/skills/gws-gmail-send/SKILL.md | 57 ++++++++ gws/skills/gws-gmail-triage/SKILL.md | 50 +++++++ gws/skills/gws-gmail-watch/SKILL.md | 58 ++++++++ gws/skills/gws-gmail/SKILL.md | 59 ++++++++ gws/skills/gws-meet/SKILL.md | 51 +++++++ gws/skills/gws-shared/SKILL.md | 81 +++++++++++ gws/skills/gws-sheets-append/SKILL.md | 51 +++++++ gws/skills/gws-sheets-read/SKILL.md | 47 ++++++ gws/skills/gws-sheets/SKILL.md | 53 +++++++ gws/skills/gws-slides/SKILL.md | 43 ++++++ .../gws-workflow-email-to-task/SKILL.md | 47 ++++++ .../gws-workflow-file-announce/SKILL.md | 50 +++++++ gws/skills/gws-workflow-meeting-prep/SKILL.md | 47 ++++++ .../gws-workflow-standup-report/SKILL.md | 46 ++++++ .../gws-workflow-weekly-digest/SKILL.md | 46 ++++++ gws/skills/gws-workflow/SKILL.md | 44 ++++++ gws/skills/persona-exec-assistant/SKILL.md | 35 +++++ gws/skills/persona-team-lead/SKILL.md | 36 +++++ .../recipe-backup-sheet-as-csv/SKILL.md | 25 ++++ .../recipe-batch-invite-to-event/SKILL.md | 25 ++++ gws/skills/recipe-block-focus-time/SKILL.md | 24 +++ .../recipe-bulk-download-folder/SKILL.md | 25 ++++ gws/skills/recipe-compare-sheet-tabs/SKILL.md | 25 ++++ .../recipe-copy-sheet-for-new-month/SKILL.md | 25 ++++ .../recipe-create-doc-from-template/SKILL.md | 29 ++++ .../recipe-create-events-from-sheet/SKILL.md | 24 +++ .../recipe-create-expense-tracker/SKILL.md | 26 ++++ .../recipe-create-gmail-filter/SKILL.md | 26 ++++ gws/skills/recipe-create-meet-space/SKILL.md | 25 ++++ .../recipe-create-presentation/SKILL.md | 25 ++++ .../recipe-create-shared-drive/SKILL.md | 25 ++++ .../recipe-create-vacation-responder/SKILL.md | 25 ++++ .../recipe-draft-email-from-doc/SKILL.md | 25 ++++ gws/skills/recipe-email-drive-link/SKILL.md | 25 ++++ gws/skills/recipe-find-free-time/SKILL.md | 25 ++++ gws/skills/recipe-find-large-files/SKILL.md | 24 +++ .../recipe-forward-labeled-emails/SKILL.md | 27 ++++ .../SKILL.md | 34 +++++ .../recipe-label-and-archive-emails/SKILL.md | 25 ++++ gws/skills/recipe-log-deal-update/SKILL.md | 25 ++++ .../recipe-organize-drive-folder/SKILL.md | 26 ++++ .../recipe-plan-weekly-schedule/SKILL.md | 26 ++++ gws/skills/recipe-post-mortem-setup/SKILL.md | 25 ++++ gws/skills/recipe-reschedule-meeting/SKILL.md | 25 ++++ .../recipe-review-meet-participants/SKILL.md | 25 ++++ .../recipe-save-email-attachments/SKILL.md | 26 ++++ gws/skills/recipe-save-email-to-doc/SKILL.md | 29 ++++ .../recipe-schedule-recurring-event/SKILL.md | 24 +++ .../recipe-share-doc-and-notify/SKILL.md | 25 ++++ .../recipe-share-event-materials/SKILL.md | 25 ++++ .../recipe-share-folder-with-team/SKILL.md | 26 ++++ 69 files changed, 2621 insertions(+) create mode 100644 .claude/skills/gws-sync.md create mode 100644 gws/.claude-plugin/plugin.json create mode 100644 gws/README.md create mode 100644 gws/hooks/hooks.json create mode 100644 gws/skills/gws-calendar-agenda/SKILL.md create mode 100644 gws/skills/gws-calendar-insert/SKILL.md create mode 100644 gws/skills/gws-calendar/SKILL.md create mode 100644 gws/skills/gws-docs-write/SKILL.md create mode 100644 gws/skills/gws-docs/SKILL.md create mode 100644 gws/skills/gws-drive-upload/SKILL.md create mode 100644 gws/skills/gws-drive/SKILL.md create mode 100644 gws/skills/gws-gmail-forward/SKILL.md create mode 100644 gws/skills/gws-gmail-reply-all/SKILL.md create mode 100644 gws/skills/gws-gmail-reply/SKILL.md create mode 100644 gws/skills/gws-gmail-send/SKILL.md create mode 100644 gws/skills/gws-gmail-triage/SKILL.md create mode 100644 gws/skills/gws-gmail-watch/SKILL.md create mode 100644 gws/skills/gws-gmail/SKILL.md create mode 100644 gws/skills/gws-meet/SKILL.md create mode 100644 gws/skills/gws-shared/SKILL.md create mode 100644 gws/skills/gws-sheets-append/SKILL.md create mode 100644 gws/skills/gws-sheets-read/SKILL.md create mode 100644 gws/skills/gws-sheets/SKILL.md create mode 100644 gws/skills/gws-slides/SKILL.md create mode 100644 gws/skills/gws-workflow-email-to-task/SKILL.md create mode 100644 gws/skills/gws-workflow-file-announce/SKILL.md create mode 100644 gws/skills/gws-workflow-meeting-prep/SKILL.md create mode 100644 gws/skills/gws-workflow-standup-report/SKILL.md create mode 100644 gws/skills/gws-workflow-weekly-digest/SKILL.md create mode 100644 gws/skills/gws-workflow/SKILL.md create mode 100644 gws/skills/persona-exec-assistant/SKILL.md create mode 100644 gws/skills/persona-team-lead/SKILL.md create mode 100644 gws/skills/recipe-backup-sheet-as-csv/SKILL.md create mode 100644 gws/skills/recipe-batch-invite-to-event/SKILL.md create mode 100644 gws/skills/recipe-block-focus-time/SKILL.md create mode 100644 gws/skills/recipe-bulk-download-folder/SKILL.md create mode 100644 gws/skills/recipe-compare-sheet-tabs/SKILL.md create mode 100644 gws/skills/recipe-copy-sheet-for-new-month/SKILL.md create mode 100644 gws/skills/recipe-create-doc-from-template/SKILL.md create mode 100644 gws/skills/recipe-create-events-from-sheet/SKILL.md create mode 100644 gws/skills/recipe-create-expense-tracker/SKILL.md create mode 100644 gws/skills/recipe-create-gmail-filter/SKILL.md create mode 100644 gws/skills/recipe-create-meet-space/SKILL.md create mode 100644 gws/skills/recipe-create-presentation/SKILL.md create mode 100644 gws/skills/recipe-create-shared-drive/SKILL.md create mode 100644 gws/skills/recipe-create-vacation-responder/SKILL.md create mode 100644 gws/skills/recipe-draft-email-from-doc/SKILL.md create mode 100644 gws/skills/recipe-email-drive-link/SKILL.md create mode 100644 gws/skills/recipe-find-free-time/SKILL.md create mode 100644 gws/skills/recipe-find-large-files/SKILL.md create mode 100644 gws/skills/recipe-forward-labeled-emails/SKILL.md create mode 100644 gws/skills/recipe-generate-report-from-sheet/SKILL.md create mode 100644 gws/skills/recipe-label-and-archive-emails/SKILL.md create mode 100644 gws/skills/recipe-log-deal-update/SKILL.md create mode 100644 gws/skills/recipe-organize-drive-folder/SKILL.md create mode 100644 gws/skills/recipe-plan-weekly-schedule/SKILL.md create mode 100644 gws/skills/recipe-post-mortem-setup/SKILL.md create mode 100644 gws/skills/recipe-reschedule-meeting/SKILL.md create mode 100644 gws/skills/recipe-review-meet-participants/SKILL.md create mode 100644 gws/skills/recipe-save-email-attachments/SKILL.md create mode 100644 gws/skills/recipe-save-email-to-doc/SKILL.md create mode 100644 gws/skills/recipe-schedule-recurring-event/SKILL.md create mode 100644 gws/skills/recipe-share-doc-and-notify/SKILL.md create mode 100644 gws/skills/recipe-share-event-materials/SKILL.md create mode 100644 gws/skills/recipe-share-folder-with-team/SKILL.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 3f2d969..424aa67 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -17,6 +17,11 @@ "name": "github", "source": "./github", "strict": true + }, + { + "name": "gws", + "source": "./gws", + "strict": true } ] } diff --git a/.claude/skills/gws-sync.md b/.claude/skills/gws-sync.md new file mode 100644 index 0000000..ac52928 --- /dev/null +++ b/.claude/skills/gws-sync.md @@ -0,0 +1,91 @@ +--- +name: gws-sync +description: "Sync upstream gws CLI skills into the gws plugin. Use when asked to: sync gws skills, update gws plugin, refresh google workspace skills, curate gws, add new gws skills." +user_invocable: true +--- + +# Sync GWS Skills + +Synchronize upstream `gws generate-skills` output with the curated skill set in `gws/skills/`. + +## Process + +### 1. Generate upstream skills + +```bash +gws generate-skills --output-dir "$TMPDIR/gws-skills-upstream" +``` + +### 2. Check current OAuth scopes + +```bash +gws auth status --format json +``` + +Extract the `scopes` array. Map scopes to services: + +| Scope pattern | Service | +|---|---| +| `gmail` | Gmail | +| `calendar` | Calendar | +| `drive` | Drive | +| `documents` | Docs | +| `spreadsheets` | Sheets | +| `presentations` | Slides | +| `meetings` | Meet | +| `chat` | Chat | +| `classroom` | Classroom | +| `forms` | Forms | +| `tasks` | Tasks | +| `admin.reports` | Admin Reports | + +### 3. Inventory current skills + +List all directories in `gws/skills/` to get the current vendored set. + +### 4. Diff upstream vs current + +For each upstream skill directory: + +1. Read its `SKILL.md` frontmatter to get the `metadata.openclaw.requires.skills` list +2. Check if ALL required service skills have matching OAuth scopes +3. Categorize: + - **New + scoped**: upstream skill not in current set, all required services have scopes + - **New + unscoped**: upstream skill not in current set, missing required service scopes + - **Updated**: exists in both, content differs (compare file contents) + - **Removed**: in current set but not in upstream + - **Unchanged**: identical in both + +Always include `gws-shared` regardless of scopes (it has no service dependency). + +### 5. Present findings + +Use AskUserQuestion to present: +- New scoped skills (recommended for inclusion) +- New unscoped skills (available if scopes are added) +- Updated skills (recommend updating) +- Removed skills (recommend removing) + +Let the user select which to add/update/remove. + +### 6. Apply changes + +For each selected skill: +- Copy the `SKILL.md` from the upstream temp directory to `gws/skills//SKILL.md` +- Create the directory if it doesn't exist + +For removals, delete the skill directory from `gws/skills/`. + +### 7. Bump version + +After applying changes, bump the patch version in `gws/.claude-plugin/plugin.json`. + +### 8. Cleanup + +```bash +rm -rf "$TMPDIR/gws-skills-upstream" +``` + +### 9. Summary + +Report what was added, updated, and removed. diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 4664c3d..2c60a48 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -1,5 +1,8 @@ { // Combined markdownlint rule configuration and CLI settings + "ignores": [ + "gws/skills/**" // Vendored upstream gws generate-skills output + ], "config": { "default": true, "MD013": false, // Line length diff --git a/CLAUDE.md b/CLAUDE.md index bd99afa..9f44487 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,6 +11,7 @@ Personal Claude Code plugin marketplace ├── git/ # Custom plugin: git workflows & safety ├── gofmt/ # Custom plugin: Go formatting hooks ├── github/ # MCP wrapper: GitHub tools +├── gws/ # Custom plugin: Google Workspace CLI skills ├── sequential-thinking/ # MCP wrapper: chain-of-thought reasoning └── CLAUDE.md ``` diff --git a/README.md b/README.md index 935ee30..9242726 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ claude plugin marketplace add cblecker/claude-plugins |----------------------------------------------|--------------------------------------------------------------------------------------------------| | [git](./git) | Dynamic git instructions via SessionStart hook with mainline detection, conventional commits, fork handling, and safety guardrails | | [github](./github) | GitHub MCP server with all toolsets and insiders mode enabled | +| [gws](./gws) | Google Workspace CLI skills for Gmail, Calendar, Drive, Docs, Sheets, Slides, and Meet | ## License diff --git a/gws/.claude-plugin/plugin.json b/gws/.claude-plugin/plugin.json new file mode 100644 index 0000000..fe145f8 --- /dev/null +++ b/gws/.claude-plugin/plugin.json @@ -0,0 +1,10 @@ +{ + "name": "gws", + "version": "1.0.0", + "description": "Google Workspace CLI skills for Gmail, Calendar, Drive, Docs, Sheets, Slides, and Meet", + "author": { + "name": "cblecker" + }, + "homepage": "https://github.com/googleworkspace/cli", + "keywords": ["google-workspace", "gws", "gmail", "calendar", "drive", "docs", "sheets", "slides", "meet"] +} diff --git a/gws/README.md b/gws/README.md new file mode 100644 index 0000000..a50cf84 --- /dev/null +++ b/gws/README.md @@ -0,0 +1,69 @@ +# gws - Google Workspace CLI Plugin + +Claude Code plugin providing Google Workspace CLI (`gws`) skills for Gmail, Calendar, Drive, Docs, Sheets, Slides, and Meet. + +## Prerequisites + +- **gws CLI**: Install with `npm install -g @googleworkspace/cli` +- **OAuth configured**: Run `gws auth login` and grant scopes for desired services + +## Included Skills + +### Service Skills + +Core API access for each Google Workspace service: + +- `gws-gmail` - Send, read, and manage email +- `gws-calendar` - Manage calendar events +- `gws-drive` - File and folder operations +- `gws-docs` - Document operations +- `gws-sheets` - Spreadsheet operations +- `gws-slides` - Presentation operations +- `gws-meet` - Meeting space management + +### Helper Skills + +Streamlined commands for common operations: + +- `gws-gmail-send`, `gws-gmail-triage`, `gws-gmail-reply`, `gws-gmail-reply-all`, `gws-gmail-forward`, `gws-gmail-watch` +- `gws-calendar-insert`, `gws-calendar-agenda` +- `gws-drive-upload` +- `gws-sheets-append`, `gws-sheets-read` +- `gws-docs-write` + +### Workflows + +Multi-step productivity workflows: + +- `gws-workflow` - Cross-service workflow patterns +- `gws-workflow-standup-report` - Generate daily standup reports +- `gws-workflow-meeting-prep` - Prepare for upcoming meetings +- `gws-workflow-email-to-task` - Convert emails to actionable tasks +- `gws-workflow-weekly-digest` - Weekly activity summary +- `gws-workflow-file-announce` - Share files with notifications + +### Personas + +Role-based skill bundles: + +- `persona-exec-assistant` - Executive assistant workflows +- `persona-team-lead` - Team leadership workflows + +### Recipes + +Pre-built task automations using scoped services (~33 recipes covering email management, calendar scheduling, document creation, spreadsheet operations, and more). + +## Updating Skills + +To sync with the latest upstream `gws` skills: + +```text +/gws-sync +``` + +This runs the curation skill which compares upstream skills against your OAuth scopes and presents new, updated, or removed skills for review. + +## Links + +- [gws CLI repository](https://github.com/googleworkspace/cli) +- [Claude Code plugins documentation](https://code.claude.com/docs/en/plugins) diff --git a/gws/hooks/hooks.json b/gws/hooks/hooks.json new file mode 100644 index 0000000..2cc42f3 --- /dev/null +++ b/gws/hooks/hooks.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "command -v gws >/dev/null 2>&1 && echo 'You have access to the Google Workspace CLI (gws). Use gws skills for Google Workspace operations. Run gws schema .. to discover API parameters.' || echo 'WARNING: gws CLI not found. Install with: npm install -g @googleworkspace/cli'", + "timeout": 5 + } + ] + } + ] + } +} diff --git a/gws/skills/gws-calendar-agenda/SKILL.md b/gws/skills/gws-calendar-agenda/SKILL.md new file mode 100644 index 0000000..5e777fe --- /dev/null +++ b/gws/skills/gws-calendar-agenda/SKILL.md @@ -0,0 +1,55 @@ +--- +name: gws-calendar-agenda +version: 1.0.0 +description: "Google Calendar: Show upcoming events across all calendars." +metadata: + openclaw: + category: "productivity" + requires: + bins: ["gws"] + cliHelp: "gws calendar +agenda --help" +--- + +# calendar +agenda + +> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. + +Show upcoming events across all calendars + +## Usage + +```bash +gws calendar +agenda +``` + +## Flags + +| Flag | Required | Default | Description | +|------|----------|---------|-------------| +| `--today` | — | — | Show today's events | +| `--tomorrow` | — | — | Show tomorrow's events | +| `--week` | — | — | Show this week's events | +| `--days` | — | — | Number of days ahead to show | +| `--calendar` | — | — | Filter to specific calendar name or ID | +| `--timezone` | — | — | IANA timezone override (e.g. America/Denver). Defaults to Google account timezone. | + +## Examples + +```bash +gws calendar +agenda +gws calendar +agenda --today +gws calendar +agenda --week --format table +gws calendar +agenda --days 3 --calendar 'Work' +gws calendar +agenda --today --timezone America/New_York +``` + +## Tips + +- Read-only — never modifies events. +- Queries all calendars by default; use --calendar to filter. +- Uses your Google account timezone by default; override with --timezone. + +## See Also + +- [gws-shared](../gws-shared/SKILL.md) — Global flags and auth +- [gws-calendar](../gws-calendar/SKILL.md) — All manage calendars and events commands diff --git a/gws/skills/gws-calendar-insert/SKILL.md b/gws/skills/gws-calendar-insert/SKILL.md new file mode 100644 index 0000000..bd0aeb2 --- /dev/null +++ b/gws/skills/gws-calendar-insert/SKILL.md @@ -0,0 +1,55 @@ +--- +name: gws-calendar-insert +version: 1.0.0 +description: "Google Calendar: Create a new event." +metadata: + openclaw: + category: "productivity" + requires: + bins: ["gws"] + cliHelp: "gws calendar +insert --help" +--- + +# calendar +insert + +> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. + +create a new event + +## Usage + +```bash +gws calendar +insert --summary --start