From 4b832ffed54b46428192d793d47bb49e6e6c7671 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 16 Mar 2026 02:00:53 -0500 Subject: [PATCH] Add gws skill; update blocklist and known_marketplaces plugins Co-Authored-By: Claude Sonnet 4.6 --- plugins/blocklist.json | 2 +- plugins/known_marketplaces.json | 2 +- sessions/1636882.json | 1 + skills/gws/SKILL.md | 98 +++++++++++++++++++++++ skills/gws/examples-calendar.md | 45 +++++++++++ skills/gws/examples-drive.md | 41 ++++++++++ skills/gws/examples-gmail.md | 34 ++++++++ skills/gws/examples-sheets.md | 136 ++++++++++++++++++++++++++++++++ 8 files changed, 357 insertions(+), 2 deletions(-) create mode 100644 sessions/1636882.json create mode 100644 skills/gws/SKILL.md create mode 100644 skills/gws/examples-calendar.md create mode 100644 skills/gws/examples-drive.md create mode 100644 skills/gws/examples-gmail.md create mode 100644 skills/gws/examples-sheets.md diff --git a/plugins/blocklist.json b/plugins/blocklist.json index 669b671..df0de1f 100644 --- a/plugins/blocklist.json +++ b/plugins/blocklist.json @@ -1,5 +1,5 @@ { - "fetchedAt": "2026-03-15T06:00:47.530Z", + "fetchedAt": "2026-03-16T06:30:48.027Z", "plugins": [ { "plugin": "code-review@claude-plugins-official", diff --git a/plugins/known_marketplaces.json b/plugins/known_marketplaces.json index f5ad3da..3d34af7 100644 --- a/plugins/known_marketplaces.json +++ b/plugins/known_marketplaces.json @@ -13,6 +13,6 @@ "repo": "anthropics/claude-code" }, "installLocation": "/home/cal/.claude/plugins/marketplaces/claude-code-plugins", - "lastUpdated": "2026-03-15T07:00:48.362Z" + "lastUpdated": "2026-03-16T07:00:48.787Z" } } \ No newline at end of file diff --git a/sessions/1636882.json b/sessions/1636882.json new file mode 100644 index 0000000..9debb5f --- /dev/null +++ b/sessions/1636882.json @@ -0,0 +1 @@ +{"pid":1636882,"sessionId":"cd9dce66-bb03-423d-b42a-9222213941a9","cwd":"/mnt/NV2/Development/paper-dynasty/card-creation","startedAt":1773618059537} \ No newline at end of file diff --git a/skills/gws/SKILL.md b/skills/gws/SKILL.md new file mode 100644 index 0000000..2fe90ca --- /dev/null +++ b/skills/gws/SKILL.md @@ -0,0 +1,98 @@ +--- +name: gws +description: Google Workspace CLI for Drive, Sheets, Gmail, and Calendar. USE WHEN user mentions "spreadsheet", "google sheets", "google drive", "gmail", "google calendar", "gws", or wants to read/write/create Google Workspace documents. +--- + +# GWS - Google Workspace CLI + +**SCOPE**: Use when interacting with Google Drive, Sheets, Gmail, or Calendar via the `gws` CLI. + +## When to Activate + +- "update the spreadsheet", "read the sheet", "add a row" +- "create a spreadsheet", "make a Google Sheet" +- "check my email", "search Gmail" +- "list my Drive files", "find a file in Drive" +- "check my calendar", "list events" +- Any task involving a Google Sheets spreadsheet ID + +## Quick Reference + +All commands run via Bash. Output is JSON by default. Add `--format table` for human-readable output. + +### Sheets (most common) + +```bash +# Read a range +gws sheets +read --spreadsheet "$ID" --range 'Sheet1!A1:D10' + +# Append a row +gws sheets +append --spreadsheet "$ID" --values 'val1,val2,val3' + +# Append multiple rows +gws sheets +append --spreadsheet "$ID" --json-values '[["a","b"],["c","d"]]' + +# Update specific cells +gws sheets spreadsheets values update \ + --params "{\"spreadsheetId\": \"$ID\", \"range\": \"Sheet1\u0021A1:B2\", \"valueInputOption\": \"USER_ENTERED\"}" \ + --json '{"values": [["new1","new2"],["new3","new4"]]}' + +# Create a spreadsheet +gws sheets spreadsheets create --json '{"properties": {"title": "My Sheet"}}' + +# Clear a range +gws sheets spreadsheets values clear \ + --params "{\"spreadsheetId\": \"$ID\", \"range\": \"Sheet1\u0021A1:Z100\"}" +``` + +### Drive + +```bash +# List files +gws drive files list --params '{"pageSize": 10}' + +# Search files +gws drive files list --params '{"q": "name contains \"keyword\""}' +``` + +### Gmail + +```bash +# Unread messages +gws gmail users messages list --params '{"userId": "me", "q": "is:unread"}' +``` + +### Calendar + +```bash +# Upcoming events +gws calendar events list --params '{"calendarId": "primary", "maxResults": 5}' +``` + +## Critical Gotchas + +1. **`!` in ranges** — In double-quoted JSON, use `\u0021` instead of `!` (bash history expansion breaks it). Single-quoted JSON is safe: `'Sheet1!A1:B2'` +2. **`--params` vs `--json`** — URL/query params (spreadsheetId, range, valueInputOption) go in `--params`. Request body (values, properties) goes in `--json` +3. **valueInputOption** — Required for writes. Use `USER_ENTERED` (parses formulas/numbers) or `RAW` (literal strings) +4. **Helpers vs raw API** — `+read` and `+append` are convenient shortcuts. For updates, batch operations, or clearing, use the raw `spreadsheets values` subcommands + +## Auth & Config + +- OAuth credentials encrypted in OS keyring +- Config dir: `~/.config/gws/` +- Authenticated scopes: drive, gmail, calendar, sheets +- Add `--dry-run` to any command to validate without sending +- Introspect any API method: `gws schema sheets.spreadsheets.values.update` + +## Output Formats + +`--format json` (default) | `--format table` | `--format csv` | `--format yaml` + +## Detailed Examples (load on demand) + +| Product | File | +|---------|------| +| Sheets | `~/.claude/skills/gws/examples-sheets.md` — batch update/get, add/rename/delete tabs, formatting, freeze rows | +| Drive | `~/.claude/skills/gws/examples-drive.md` — search, MIME filters, folder listing, pagination | +| Gmail | `~/.claude/skills/gws/examples-gmail.md` — search filters, read messages | +| Calendar | `~/.claude/skills/gws/examples-calendar.md` — date ranges, create events, all-day events | diff --git a/skills/gws/examples-calendar.md b/skills/gws/examples-calendar.md new file mode 100644 index 0000000..534908b --- /dev/null +++ b/skills/gws/examples-calendar.md @@ -0,0 +1,45 @@ +# GWS Calendar Examples & Reference + +Load when working with Google Calendar. + +## List Upcoming Events + +```bash +gws calendar events list --params '{"calendarId": "primary", "maxResults": 5}' +``` + +## List Events in a Date Range + +```bash +gws calendar events list --params '{ + "calendarId": "primary", + "timeMin": "2026-03-15T00:00:00Z", + "timeMax": "2026-03-22T00:00:00Z", + "singleEvents": true, + "orderBy": "startTime" +}' +``` + +## Create an Event + +```bash +gws calendar events insert \ + --params '{"calendarId": "primary"}' \ + --json '{ + "summary": "Team Meeting", + "start": {"dateTime": "2026-03-20T14:00:00-05:00"}, + "end": {"dateTime": "2026-03-20T15:00:00-05:00"} + }' +``` + +## Create an All-Day Event + +```bash +gws calendar events insert \ + --params '{"calendarId": "primary"}' \ + --json '{ + "summary": "Day Off", + "start": {"date": "2026-03-20"}, + "end": {"date": "2026-03-21"} + }' +``` diff --git a/skills/gws/examples-drive.md b/skills/gws/examples-drive.md new file mode 100644 index 0000000..dc138b5 --- /dev/null +++ b/skills/gws/examples-drive.md @@ -0,0 +1,41 @@ +# GWS Drive Examples & Reference + +Load when working with Google Drive. + +## List Files + +```bash +gws drive files list --params '{"pageSize": 10}' +``` + +## Search by Name + +```bash +gws drive files list --params '{"q": "name contains \"keyword\""}' +``` + +## Search by MIME Type + +```bash +# Find all spreadsheets +gws drive files list --params '{"q": "mimeType=\"application/vnd.google-apps.spreadsheet\""}' + +# Find all folders +gws drive files list --params '{"q": "mimeType=\"application/vnd.google-apps.folder\""}' +``` + +## List Files in a Specific Folder + +```bash +gws drive files list --params '{"q": "\"FOLDER_ID\" in parents"}' +``` + +## Pagination + +```bash +# Auto-paginate (NDJSON, one line per page) +gws drive files list --params '{"pageSize": 100}' --page-all + +# Limit pages +gws drive files list --params '{"pageSize": 100}' --page-all --page-limit 3 +``` diff --git a/skills/gws/examples-gmail.md b/skills/gws/examples-gmail.md new file mode 100644 index 0000000..c71e9ac --- /dev/null +++ b/skills/gws/examples-gmail.md @@ -0,0 +1,34 @@ +# GWS Gmail Examples & Reference + +Load when working with Gmail. + +## List Unread Messages + +```bash +gws gmail users messages list --params '{"userId": "me", "q": "is:unread"}' +``` + +## Search with Filters + +```bash +# From a specific sender in the last week +gws gmail users messages list --params '{"userId": "me", "q": "from:someone@example.com newer_than:7d"}' + +# With attachment +gws gmail users messages list --params '{"userId": "me", "q": "has:attachment filename:pdf"}' + +# Labeled messages +gws gmail users messages list --params '{"userId": "me", "q": "label:important"}' +``` + +## Read a Message + +```bash +gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID"}' +``` + +## Read Message (minimal format, faster) + +```bash +gws gmail users messages get --params '{"userId": "me", "id": "MESSAGE_ID", "format": "minimal"}' +``` diff --git a/skills/gws/examples-sheets.md b/skills/gws/examples-sheets.md new file mode 100644 index 0000000..7b1bd1b --- /dev/null +++ b/skills/gws/examples-sheets.md @@ -0,0 +1,136 @@ +# GWS Sheets Examples & Reference + +Load when working with Google Sheets. Contains verbose JSON shapes and less common patterns. + +## Batch Update (write to multiple ranges at once) + +```bash +gws sheets spreadsheets values batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\", \"valueInputOption\": \"USER_ENTERED\"}" \ + --json '{ + "data": [ + {"range": "Sheet1\u0021A1:C1", "values": [["Header1", "Header2", "Header3"]]}, + {"range": "Sheet1\u0021A2:C4", "values": [ + ["row1a", "row1b", "row1c"], + ["row2a", "row2b", "row2c"], + ["row3a", "row3b", "row3c"] + ]} + ] + }' +``` + +## Batch Get (read multiple ranges at once) + +```bash +gws sheets spreadsheets values batchGet \ + --params "{\"spreadsheetId\": \"$ID\", \"ranges\": [\"Sheet1\u0021A1:C1\", \"Sheet1\u0021A5:C10\"]}" +``` + +## Get Spreadsheet Metadata (sheet names, grid size) + +```bash +gws sheets spreadsheets get \ + --params "{\"spreadsheetId\": \"$ID\", \"includeGridData\": false}" +``` + +Useful to discover sheet names before reading/writing. + +## Add a New Sheet Tab + +```bash +gws sheets spreadsheets batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\"}" \ + --json '{ + "requests": [ + {"addSheet": {"properties": {"title": "NewTab", "index": 1}}} + ] + }' +``` + +## Delete a Sheet Tab + +```bash +# Get the sheetId first from spreadsheets get, then: +gws sheets spreadsheets batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\"}" \ + --json '{ + "requests": [ + {"deleteSheet": {"sheetId": 123456789}} + ] + }' +``` + +## Rename a Sheet Tab + +```bash +gws sheets spreadsheets batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\"}" \ + --json '{ + "requests": [ + {"updateSheetProperties": { + "properties": {"sheetId": 0, "title": "Draft Board"}, + "fields": "title" + }} + ] + }' +``` + +## Auto-resize Columns + +```bash +gws sheets spreadsheets batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\"}" \ + --json '{ + "requests": [ + {"autoResizeDimensions": { + "dimensions": { + "sheetId": 0, + "dimension": "COLUMNS", + "startIndex": 0, + "endIndex": 10 + } + }} + ] + }' +``` + +## Format Header Row (bold, background color) + +```bash +gws sheets spreadsheets batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\"}" \ + --json '{ + "requests": [ + { + "repeatCell": { + "range": {"sheetId": 0, "startRowIndex": 0, "endRowIndex": 1}, + "cell": { + "userEnteredFormat": { + "backgroundColor": {"red": 0.2, "green": 0.4, "blue": 0.8}, + "textFormat": {"bold": true, "foregroundColor": {"red": 1, "green": 1, "blue": 1}} + } + }, + "fields": "userEnteredFormat(backgroundColor,textFormat)" + } + } + ] + }' +``` + +## Freeze Header Row + +```bash +gws sheets spreadsheets batchUpdate \ + --params "{\"spreadsheetId\": \"$ID\"}" \ + --json '{ + "requests": [ + {"updateSheetProperties": { + "properties": { + "sheetId": 0, + "gridProperties": {"frozenRowCount": 1} + }, + "fields": "gridProperties.frozenRowCount" + }} + ] + }' +```