Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Google Workspace

БесплатноЗапускает вложенные скриптыНе проверен

Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration via gws CLI (googleworkspace/cli). Uses OAuth2 with automatic token refresh via bridge script…

granietот graniet★ 209 звёзд на GitHub

Об этом скилле

Kheish Compatibility

This skill is repo-local and stays inactive until explicitly activated.

When the original instructions refer to legacy tool names, use these Kheish mappings:

  • terminal => bash
  • web_extract => web_fetch, plus web_search when discovery is needed
  • search_files => grep_search and glob_search
  • browser_* tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly

When the instructions mention local helper files, resolve them from ${KHEISH_SKILL_DIR}.

Google Workspace

Gmail, Calendar, Drive, Contacts, Sheets, and Docs — powered by gws (Google's official Rust CLI). The skill provides a backward-compatible Python wrapper that handles OAuth token refresh and delegates to gws.

Architecture

google_api.py  →  gws_bridge.py  →  gws CLI
(argparse compat)  (token refresh)    (Google APIs)
  • setup.py handles OAuth2 (headless-compatible, works on CLI/Telegram/Discord)
  • gws_bridge.py refreshes the Kheish token and injects it into gws via GOOGLE_WORKSPACE_CLI_TOKEN
  • google_api.py provides the same CLI interface as v1 but delegates to gws

References

  • references/gmail-search-syntax.md — Gmail search operators (is:unread, from:, newer_than:, etc.)

Scripts

  • scripts/setup.py — OAuth2 setup (run once to authorize)
  • scripts/gws_bridge.py — Token refresh bridge to gws CLI
  • scripts/google_api.py — Backward-compatible API wrapper (delegates to gws)

Prerequisites

Install gws:

cargo install google-workspace-cli
# or via npm (recommended, downloads prebuilt binary):
npm install -g @googleworkspace/cli
# or via Homebrew:
brew install googleworkspace-cli

Verify: gws --version

First-Time Setup

The setup is fully non-interactive — you drive it step by step so it works on CLI, Telegram, Discord, or any platform.

Define a shorthand first:

GWORKSPACE_SKILL_DIR=".agents/skills/productivity/google-workspace"
PYTHON_BIN="${PYTHON_BIN:-python3}"
GSETUP="$PYTHON_BIN $GWORKSPACE_SKILL_DIR/scripts/setup.py"

Step 0: Check if already set up

$GSETUP --check

If it prints AUTHENTICATED, skip to Usage — setup is already done.

Step 1: Triage — ask the user what they need

Question 1: "What Google services do you need? Just email, or also Calendar/Drive/Sheets/Docs?"

  • Email only → Use the himalaya skill instead — simpler setup.
  • Calendar, Drive, Sheets, Docs (or email + these) → Continue below.

Partial scopes: Users can authorize only a subset of services. The setup script accepts partial scopes and warns about missing ones.

Question 2: "Does your Google account use Advanced Protection?"

  • No / Not sure → Normal setup.
  • Yes → Workspace admin must add the OAuth client ID to allowed apps first.

Step 2: Create OAuth credentials (one-time, ~5 minutes)

Tell the user:

  1. Go to https://console.cloud.google.com/apis/credentials
  2. Create a project (or use an existing one)
  3. Enable the APIs you need (Gmail, Calendar, Drive, Sheets, Docs, People)
  4. Credentials → Create Credentials → OAuth 2.0 Client ID → Desktop app
  5. Download JSON and tell me the file path
$GSETUP --client-secret /path/to/client_secret.json

Step 3: Get authorization URL

$GSETUP --auth-url

Send the URL to the user. After authorizing, they paste back the redirect URL or code.

Step 4: Exchange the code

$GSETUP --auth-code "THE_URL_OR_CODE_THE_USER_PASTED"

Step 5: Verify

$GSETUP --check

Should print AUTHENTICATED. Token refreshes automatically from now on.

Usage

All commands go through the API script:

GWORKSPACE_SKILL_DIR=".agents/skills/productivity/google-workspace"
PYTHON_BIN="${PYTHON_BIN:-python3}"
GAPI="$PYTHON_BIN $GWORKSPACE_SKILL_DIR/scripts/google_api.py"

Gmail

$GAPI gmail search "is:unread" --max 10
$GAPI gmail get MESSAGE_ID
$GAPI gmail send --to [email protected] --subject "Hello" --body "Message text"
$GAPI gmail send --to [email protected] --subject "Report" --body "<h1>Q4</h1>" --html
$GAPI gmail reply MESSAGE_ID --body "Thanks, that works for me."
$GAPI gmail labels
$GAPI gmail modify MESSAGE_ID --add-labels LABEL_ID

Calendar

$GAPI calendar list
$GAPI calendar create --summary "Standup" --start 2026-03-01T10:00:00+01:00 --end 2026-03-01T10:30:00+01:00
$GAPI calendar create --summary "Review" --start ... --end ... --attendees "[email protected],[email protected]"
$GAPI calendar delete EVENT_ID

Drive

$GAPI drive search "quarterly report" --max 10
$GAPI drive search "mimeType='application/pdf'" --raw-query --max 5

Contacts

$GAPI contacts list --max 20

Sheets

$GAPI sheets get SHEET_ID "Sheet1!A1:D10"
$GAPI sheets update SHEET_ID "Sheet1!A1:B2" --values '[["Name","Score"],["Alice","95"]]'
$GAPI sheets append SHEET_ID "Sheet1!A:C" --valu
Полный SKILL.md на GitHub

Установить Google Workspace в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/gmail-search-syntax.mdscripts/google_api.pyscripts/gws_bridge.pyscripts/setup.py

FAQ

Что делает скилл Google Workspace?

Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration via gws CLI (googleworkspace/cli). Uses OAuth2 with automatic token refresh via bridge script. Requires gws binary.

Как установить скилл Google Workspace?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Google Workspace запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить Google Workspace с