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..d65bc9f --- /dev/null +++ b/.claude/skills/gws-sync.md @@ -0,0 +1,92 @@ +--- +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. 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 `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). + +### 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 "${GWS_TMP_DIR:?}" +``` + +### 9. Summary + +Report what was added, updated, and removed. diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..7677935 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,3 @@ +reviews: + path_filters: + - "!gws/skills/**" # Vendored upstream gws generate-skills output 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