skills/google-workspace/SKILL.md
Access Google Workspace APIs (Drive, Docs, Calendar, Gmail, Sheets, Slides, Chat, People) via local helper scripts without MCP. Handles OAuth login and direct API calls.
npx skillsauth add Fatih0234/agent-stuff google-workspaceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for Google Workspace tasks (Gmail, Drive, Calendar, Docs, Sheets, etc.).
scripts/auth.js — OAuth login/status/clear + account enumerationscripts/workspace.js — JavaScript execution based API runnerThis skill is profile-based by email address.
--email <[email protected]>.~/.pi/google-workspace/tokens/.Before running API calls, discover available signed-in accounts:
node scripts/auth.js accounts
Always use exec and always provide --email.
node scripts/workspace.js exec --email [email protected] <<'JS'
const me = await workspace.whoAmI();
const files = await workspace.call('drive', 'files.list', {
pageSize: 5,
fields: 'files(id,name,mimeType)',
});
return { me, files: files.files };
JS
Available inside exec scripts:
auth (authorized OAuth client)google (googleapis root)workspace.accountEmail (selected profile email)workspace.call(service, methodPath, params, {version})workspace.service(service, {version})workspace.whoAmI()Optional flags:
--timeout <ms> (default 30000, max 300000)--scopes s1,s2--script 'return 42'exec script per user request.fields, maxResults, minimal props).Promise.all for independent requests.node scripts/auth.js accounts and choose/confirm an explicit email.node scripts/auth.js accounts to see known profiles.workspace.whoAmI() in the selected profile.--email ...) or re-login that specific profile.If a request fails with unauthorized/forbidden/insufficient permissions:
node scripts/auth.js accounts
node scripts/workspace.js exec --email [email protected] <<'JS'
return await workspace.whoAmI();
JS
node scripts/auth.js login --email [email protected]
--email.node scripts/workspace.js exec --email [email protected] <<'JS'
const gmail = google.gmail({ version: 'v1', auth });
let trash = 0;
let pageToken;
do {
const res = await gmail.users.messages.list({
userId: 'me',
q: 'in:trash',
maxResults: 500,
pageToken,
fields: 'messages/id,nextPageToken',
});
trash += (res.data.messages || []).length;
pageToken = res.data.nextPageToken;
} while (pageToken);
return { currentlyInTrash: trash };
JS
node scripts/auth.js login --email [email protected]
Notes:
credentials.json needed).GOOGLE_WORKSPACE_AUTH_MODE=local and credentials at ~/.pi/google-workspace/credentials.json.node scripts/auth.js accounts
node scripts/auth.js status --email [email protected]
node scripts/auth.js clear --email [email protected]
tools
Allows to interact with web pages by performing actions such as clicking buttons, filling out forms, and navigating links. It works by remote controlling Google Chrome or Chromium browsers using the Chrome DevTools Protocol (CDP). When Claude needs to browse the web, it can use this skill to do so.
development
Use `uv` instead of pip/python/venv. Run scripts with `uv run script.py`, add deps with `uv add`, use inline script metadata for standalone scripts.
documentation
Read this skill before updating changelogs
tools
Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output.