About google-workspace
google-workspace is a skill for managing Gmail, Calendar, Drive, Tasks, and Chat across three named accounts. It provides scripts for common operations and supports account selection explicitly or from context.
Key features
- 01Gmail listing, search, reading, and sending
- 02Calendar event search and management
- 03Drive file browsing and creation
- 04Google Tasks management
- 05Chat spaces and message operations
- 06Three-account selection and cross-account actions
Use cases
- 01Finding unread mail in a selected account
- 02Scheduling or updating a calendar event
- 03Searching for and uploading Drive files
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ krishagel/ geoffrey --skill google-workspaceAfter installing, type/google-workspacein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
bun.lockpackage.jsonauth/GOOGLE_CLOUD_SETUP.mdoauth_setup.jstoken_manager.jscalendar/create_event.jslist_events.jssearch_events.jsupdate_event.jschat/get_eod_messages.jslist_spaces.jsread_messages.jssend_message.jsdocs/create_doc.jsedit_doc.jsread_doc.jsdrive/create_file.jsdownload_file.jslist_files.jsread_file.jsgmail/get_unread_summary.jslist_messages.jsread_message.jssearch_messages.jssend_message.jssend_with_attachment.jssend_with_attachments.jssheets/create_sheet.jsedit_sheet.jsread_sheet.jsDetails
From the project READMEGoogle Workspace Skill
Overview
Unified Google Workspace integration for managing email, calendar, files, and communication across three accounts:
| Alias | Purpose | |
|---|---|---|
psd | Work | PSD district email |
kh | Personal | Personal Gmail |
hrg | Business | Consulting & real estate |
Account Selection
Explicit
- "check my psd email"
- "send email from hrg"
- "kh calendar for tomorrow"
Inferred
Geoffrey will infer the appropriate account from context:
- Work-related →
psd - Personal matters →
kh - Business/real estate →
hrg
Available Operations
Gmail
| Script | Description | Example |
|---|---|---|
list_messages.js | List inbox, unread, by label | "show unread psd emails" |
read_message.js | Get full message content | "read that email" |
send_message.js | Compose and send | "send email to John about..." |
send_with_attachment.js | Send with file attachment | "email report with PDF attached" |
search_messages.js | Search with Gmail operators | "find emails from Sarah last week" |
get_unread_summary.js | Unread count + top messages | "how many unread emails?" |
Calendar
| Script | Description | Example |
|---|---|---|
list_events.js | Get upcoming events | "what's on my calendar today" |
create_event.js | Schedule new events | "schedule meeting tomorrow at 2pm" |
update_event.js | Modify existing events | "move that meeting to 3pm" |
search_events.js | Find by criteria | "find meetings with Mike" |
Drive
| Script | Description | Example |
|---|---|---|
list_files.js | Browse/search files | "find budget spreadsheet" |
read_file.js | Get file content | "show me that document" |
create_file.js | Create new docs/sheets | "create a new spreadsheet" |
upload_file.js | Upload local file | "upload this to drive" |
Tasks
| Script | Description | Example |
|---|---|---|
list_tasks.js | Get task lists | "show my google tasks" |
create_task.js | Add new task | "add task to google tasks" |
complete_task.js | Mark done | "complete that task" |
Chat
| Script | Description | Example |
|---|---|---|
list_spaces.js | Get available spaces | "list chat spaces" |
send_message.js | Post to space | "send message to team chat" |
read_messages.js | Get chat history | "show recent chat messages" |
Usage Patterns
Running Scripts
All scripts use the token_manager for authentication:
const { getAuthClient } = require('./auth/token_manager');
async function main() {
const account = process.argv[2] || 'psd';
const auth = await getAuthClient(account);
// Use auth with Google API
const gmail = google.gmail({ version: 'v1', auth });
// ...
}
Output Format
All scripts return JSON:
{
"success": true,
"account": "psd",
"data": { ... },
"metadata": {
"timestamp": "2024-01-15T10:30:00Z",
"count": 5
}
}
Error Handling
{
"error": "Token expired",
"account": "psd",
"action": "Run: node token_manager.js refresh psd"
}
Setup Required
Before using this skill:
- Complete Google Cloud Console setup (see
auth/GOOGLE_CLOUD_SETUP.md) - Add credentials to
~/Library/Mobile Documents/com~apple~CloudDocs/Geoffrey/secrets/.env - Authenticate all three accounts
- For PSD account: allowlist OAuth app in Google Admin
Cross-Account Operations
Some operations work across accounts:
- "Forward this to my personal email"
- "Copy this file to my work drive"
- "Add to both calendars"
Gmail Search Operators
Support standard Gmail search:
from:- senderto:- recipientsubject:- subject linehas:attachment- with attachmentsafter:/before:- date rangeis:unread- unread onlylabel:- by label
Example: "search psd email for from:[email protected] after:2024-01-01 has:attachment"
Notes
- Access tokens expire after 1 hour (auto-refreshed)
- Refresh tokens don't expire unless revoked
- All API calls are rate-limited by Google
- Keep API has limited availability (may not be enabled)