diff --git a/.claude/skills/gws-sync.md b/.claude/skills/gws-sync.md deleted file mode 100644 index 615f872..0000000 --- a/.claude/skills/gws-sync.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -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_TMP_DIR="$(mktemp -d)" -gws generate-skills --output-dir "$GWS_TMP_DIR" -``` - -### 2. Filter upstream output - -Remove curated-out categories before diffing: - -```bash -rm -rf "$GWS_TMP_DIR"/recipe-* "$GWS_TMP_DIR"/persona-* -``` - -These categories are intentionally excluded: recipes are short step-by-step procedures -Claude can compose from service/helper skills; personas are thin wrappers that overlap heavily. - -### 3. 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 | - -### 4. Inventory current skills - -List all directories in `gws/skills/` to get the current vendored set. - -### 5. Diff upstream vs current - -For each upstream skill directory: - -1. Read its `SKILL.md` frontmatter to get `metadata.openclaw.requires.skills` (default to `[]` if missing) -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). - -### 6. 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. - -### 7. 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/`. - -### 8. Bump version - -After applying changes, bump the patch version in `gws/.claude-plugin/plugin.json`. - -### 9. Cleanup - -```bash -rm -rf "${GWS_TMP_DIR:?}" -``` - -### 10. Summary - -Report what was added, updated, and removed. diff --git a/gws/.claude-plugin/plugin.json b/gws/.claude-plugin/plugin.json index 8734cda..b1b8176 100644 --- a/gws/.claude-plugin/plugin.json +++ b/gws/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "gws", - "version": "2.0.0", + "version": "2.1.0", "description": "Google Workspace CLI skills for Gmail, Calendar, Drive, Docs, Sheets, Slides, Meet, and Tasks", "author": { "name": "cblecker" diff --git a/gws/README.md b/gws/README.md index 2a41715..dba0466 100644 --- a/gws/README.md +++ b/gws/README.md @@ -42,15 +42,39 @@ Multi-step productivity workflows: - `gws-workflow-weekly-digest` - Weekly activity summary - `gws-workflow-file-announce` - Share files with notifications -## 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. +## Syncing Skills with Upstream + +This plugin carries a curated subset of skills from the upstream +[gws CLI repository](https://github.com/googleworkspace/cli). The upstream +generates skills via `gws generate-skills` and publishes them under `skills/` +in the repo. We carry 28 of ~74 available skills (core services, helpers, +and workflows — no personas or recipes). + +### Process + +1. Check the installed CLI version (`gws --version`) against the latest + [upstream release](https://github.com/googleworkspace/cli/releases). + Update the CLI if needed. +2. For each local skill in `gws/skills/*/SKILL.md`, fetch the matching + file from `googleworkspace/cli` `skills/` on the `main` branch. +3. Overwrite the local file with the upstream content. Do not add local + customizations — take upstream wholesale. +4. Bump the plugin version in `.claude-plugin/plugin.json` (minor for + content-only updates). +5. Validate: `claude plugin validate ./gws` + +### Guidelines + +- **Go pure upstream.** Local customizations (extra sections, modified + tips) create merge debt and tend to duplicate what the Claude Code + harness already handles (e.g., effort-level scaling via `CLAUDE_EFFORT`). +- **Frontmatter must match upstream format.** Version lives inside + `metadata.version`, not as a top-level field. YAML arrays use block + style (`- gws`), not inline (`["gws"]`). +- **New upstream skills** (chat, forms, keep, people, classroom, events, + script, admin-reports, modelarmor, personas, recipes) can be pulled in + by creating the corresponding `skills//` directory and copying + the upstream SKILL.md. No other files are needed per skill. ## Links diff --git a/gws/skills/gws-calendar-agenda/SKILL.md b/gws/skills/gws-calendar-agenda/SKILL.md index 5e777fe..89259ff 100644 --- a/gws/skills/gws-calendar-agenda/SKILL.md +++ b/gws/skills/gws-calendar-agenda/SKILL.md @@ -1,12 +1,13 @@ --- name: gws-calendar-agenda -version: 1.0.0 description: "Google Calendar: Show upcoming events across all calendars." metadata: + version: 0.22.5 openclaw: category: "productivity" requires: - bins: ["gws"] + bins: + - gws cliHelp: "gws calendar +agenda --help" --- diff --git a/gws/skills/gws-calendar-insert/SKILL.md b/gws/skills/gws-calendar-insert/SKILL.md index bd0aeb2..dd2989d 100644 --- a/gws/skills/gws-calendar-insert/SKILL.md +++ b/gws/skills/gws-calendar-insert/SKILL.md @@ -1,12 +1,13 @@ --- name: gws-calendar-insert -version: 1.0.0 description: "Google Calendar: Create a new event." metadata: + version: 0.22.5 openclaw: category: "productivity" requires: - bins: ["gws"] + bins: + - gws cliHelp: "gws calendar +insert --help" --- @@ -33,18 +34,20 @@ gws calendar +insert --summary --start