Skills

Google Workspace

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

Install

npx skills add yc-software/qm --skill google-workspace -g -a claude-code -y
Repository
yc-software/qm15.6k
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Mediumabout 1,778 tokens
Runs scripts
Yes, review before use

What it does

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

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.

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
Read the whole SKILL.md on GitHub

More in Engineering