Build Google Apps Script automation for Sheets and Workspace. Custom menus, triggers (onEdit / time-driven / form submit), dialogs, sidebars, email batches, PDF export, external API. Use whenever the user wants to automate a Google Sheet, build a Sheets menu / sidebar / dialog, hit a Sheets row from email or a webhook, schedule a Sheets workflow, or asks 'how do I script this in Sheets'.
This skill guides the generation of Google Apps Script automation for Google Sheets and Workspace apps. It addresses the common need to add custom menus, dialogs, sidebars, triggers, email notifications, PDF exports, and external API calls to spreadsheets, producing code that a user pastes into Extensions > Apps Script. The scripts run server-side on Google's infrastructure within a documented free-tier quota.
The skill defines a clear workflow: understand the automation goal, generate a script following a standard structure template (header comment, configuration constants, an `onOpen()` menu setup, and functions), provide step-by-step installation instructions, and warn users about the one-time Google OAuth consent screen that unverified scripts trigger. It captures a set of critical, non-obvious rules: underscore-suffixed functions are private and silently fail when called from client-side HTML; bulk range reads/writes are roughly 70x faster than cell-by-cell access; the V8 runtime is now the only runtime and lacks browser APIs like `fetch`, `setTimeout`, and `crypto`, so Apps Script equivalents (`UrlFetchApp.fetch`, `Utilities.sleep`, `Utilities.computeDigest`) must be used. It also covers `SpreadsheetApp.flush()`, simple versus installable triggers, custom spreadsheet-function limitations, quota tables, and a modal progress-dialog pattern.
Target users are spreadsheet power users, analysts, and developers who want to automate Google Sheets workflows without deep Apps Script expertise. Use cases include report generation menus, on-edit and time-driven automations, form-submit handlers, data-entry sidebars, and scheduled email or PDF distribution. The skill is marked claude-code-only.
Scripts run server-side on Google's infrastructure. You install by opening the Sheet, going to Extensions > Apps Script, deleting existing code, pasting the script, saving, and reloading the spreadsheet so `onOpen()` runs.
Unverified scripts show a Google OAuth consent screen. Users must click Advanced > Go to [Project Name] (unsafe) > Allow. This is a one-time step per user, and the skill instructs warning users about it.
Functions ending with an underscore are private and cannot be called from client-side HTML via `google.script.run`. The call simply does nothing with no error, so public function names are required for menu items and dialog callbacks.
The V8 runtime supports modern JavaScript (const/let, arrow functions, classes, async). Browser APIs like `fetch`, `setTimeout`/`setInterval`, `FormData`, `URL`, and `crypto` are not available; use Apps Script equivalents such as `UrlFetchApp.fetch()` and `Utilities.sleep()`.
Yes. The skill documents quotas including 6-minute per-execution runtime, daily email recipient caps (100 free / 1,500 Workspace), URL fetch limits, and a 30-second cap on custom spreadsheet functions.
Quick Setup:
.claude/skills/Repository
jezweb/claude-skills