# Google Workspace

Read and act on the user's Gmail, Google Calendar, and Google Tasks through per-user...

- Repository: https://github.com/yc-software/qm (15597 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add yc-software/qm --skill google-workspace -g -a claude-code -y`
Codex: `npx skills add yc-software/qm --skill google-workspace -g -a codex -y`
Cursor: `npx skills add yc-software/qm --skill google-workspace -g -a cursor -y`
Gemini CLI: `npx skills add yc-software/qm --skill google-workspace -g -a gemini-cli -y`

## Description

Read and act on the user's Gmail, Google Calendar, and Google Tasks through per-user OAuth.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Google Workspace

Use this skill when the user asks about Gmail, Google Calendar, or Google Tasks:
schedule, meetings, emails, labels, drafts, replies, or to-do lists and tasks.

This is an OAuth connector. The resolved user's Google OAuth token already lives on
your computer as an environment variable, one per Google API host (the way a logged-in
CLI's cached credential would):

- `$VAULT_TOKEN_GMAIL_GOOGLEAPIS_COM`, for `gmail.googleapis.com`
- `$VAULT_TOKEN_WWW_GOOGLEAPIS_COM`, for `www.googleapis.com` (Calendar and Tasks)

Do not ask the user for a token, log it, or use another principal's. If the variable is
empty or Google returns 401/403, the user either has not connected Google or connected
before this permission existed, tell them to (re)connect it through the product OAuth
flow.

## Gmail

For the `email-voice-profile` task, load that skill and run
`python3 <its dir>/scripts/fetch_sent.py --limit 300` from the directory it reports.

Use the bundled helper for every Gmail operation, it owns MIME construction, encoding,
and reply threading so you only ever handle plain text:

Run these commands with `execute` and an explicit `sandbox_id`, using the absolute
directory reported by the skill read in place of `<skill dir>`. Keep that ID for
preparing body files and running the helper.

```bash
python3 "<skill dir>/scripts/gmail.py" search 'newer_than:7d is:unread'
python3 "<skill dir>/scripts/gmail.py" read MESSAGE_ID [--full]
python3 "<skill dir>/scripts/gmail.py" thread THREAD_ID [--full]
python3 "<skill dir>/scripts/gmail.py" draft --to a@b.com --subject '...' --body-file body.txt
python3 "<skill dir>/scripts/gmail.py" reply MESSAGE_ID --body-file body.txt [--all]
python3 "<skill dir>/scripts/gmail.py" update-draft DRAFT_ID --body-file body.txt
python3 "<skill dir>/scripts/gmail.py" send-draft DRAFT_ID
```

The rest: https://github.com/yc-software/qm/blob/HEAD/skills-seed/google-workspace/SKILL.md
