
Gws Script
Manage Google Apps Script projects from the terminal—create projects, read and update script content, list execution processes, and pull metrics—using the `gws` CLI.
Overview
gws-script is an agent skill for the Build phase that manages Google Apps Script projects via the `gws script` CLI—create projects, sync content, list processes, and read execution metrics.
Install
npx skills add https://github.com/googleworkspace/cli --skill gws-scriptWhat is this skill?
- CLI surface: `gws script <resource> <method>` for Apps Script API v1 operations
- Project lifecycle: create empty projects, get metadata, get/update full project content (HEAD version used for triggers
- Process visibility: list user processes and per-script execution processes with type and status
- Execution metrics: getMetrics for runs and active users
- Companion `+push` helper skill uploads local files to a remote Apps Script project
- Apps Script API resources documented: processes (2 list methods) and projects (create, get, getContent, getMetrics, upda
- Skill metadata version 0.22.5
Adoption & trust: 10.5k installs on skills.sh; 26.9k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need to create or maintain Apps Script projects from an agent or terminal without clicking through the script editor for every metadata or content change.
Who is it for?
Builders who already use Google Workspace automation and want repeatable, agent-invokable Apps Script project operations alongside other `gws` skills.
Skip if: Teams without `gws` installed, without Workspace OAuth setup, or who only need one-off edits entirely inside the Apps Script web UI.
When should I use this skill?
You need to manage Google Apps Script projects (create, read/update content, processes, metrics) via `gws script` after gws-shared auth is in place.
What do I get? / Deliverables
Your agent runs documented `gws script` commands against projects, processes, and metrics, and can chain to gws-script-push when local files must land in a remote project.
- Executed Apps Script API operations (project records, updated HEAD content, process listings, metrics queries)
- Agent-ready command sequences for ongoing project maintenance
Recommended Skills
Journey fit
Apps Script is product automation glue; the canonical shelf is Build → integrations because you wire Google Workspace behavior into your stack before or alongside shipping. Subphase integrations covers third-party and workspace APIs; this skill is the Apps Script control plane, not generic frontend or backend app code.
How it compares
Use as a CLI integration skill for the Apps Script API—not as a substitute for writing Apps Script business logic inside SKILL.md.
Common Questions / FAQ
Who is gws-script for?
Solo builders and small teams automating Google Workspace with Apps Script who standardize on the `gws` CLI and want their coding agent to manage projects and content programmatically.
When should I use gws-script?
During Build integrations when you create or update script projects, inspect running processes, pull execution metrics, or prepare a project before pushing local code with gws-script-push.
Is gws-script safe to install?
Treat it like any tool that uses your Google credentials: review the Security Audits panel on this Prism page, confirm OAuth scope in gws-shared, and avoid running agent-generated commands against production projects without review.
Workflow Chain
Then invoke: gws script push
SKILL.md
READMESKILL.md - Gws Script
# script (v1) > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. ```bash gws script <resource> <method> [flags] ``` ## Helper Commands | Command | Description | |---------|-------------| | [`+push`](../gws-script-push/SKILL.md) | Upload local files to an Apps Script project | ## API Resources ### processes - `list` — List information about processes made by or on behalf of a user, such as process type and current status. - `listScriptProcesses` — List information about a script's executed processes, such as process type and current status. ### projects - `create` — Creates a new, empty script project with no script files and a base manifest file. - `get` — Gets a script project's metadata. - `getContent` — Gets the content of the script project, including the code source and metadata for each script file. - `getMetrics` — Get metrics data for scripts, such as number of executions and active users. - `updateContent` — Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project. - `deployments` — Operations on the 'deployments' resource - `versions` — Operations on the 'versions' resource ### scripts - `run` — ## Discovering Commands Before calling any API method, inspect it: ```bash # Browse resources and methods gws script --help # Inspect a method's required params, types, and defaults gws schema script.<resource>.<method> ``` Use `gws schema` output to build your `--params` and `--json` flags.