Watch for Google Drive Changes with Claude Code (gws recipe)
Has your assistant subscribe to change notifications on a Google Drive file or folder, using the gws command line.
- Installs
- 30.7K
- on skills.sh
- Stars
- 32K
- on GitHub
- Updated
- Oct 2026
- last repo commit
This is a three-step recipe from the googleworkspace/cli repo, filed under engineering. It creates an event subscription for a Drive resource, lists active subscriptions and renews one before it expires.
It loads gws-events first and runs the gws program for every step. You need a Google Cloud Pub/Sub topic to receive the notices, and the project and topic names in the recipe are placeholders.
It needs setup outside Workspace: a Pub/Sub topic in a Google Cloud project to receive the notices. The example watches a shared drive (//drive.googleapis.com/drives/DRIVE_ID) for google.workspace.drive.file.v1.updated. Step 3 passes --subscription, while gws-events-renew documents --name subscriptions/SUB_ID, and --all with --within to renew everything that expires soon. Check gws events +renew --help before relying on it.
Good for
- Developers who want a notice when a Drive file or shared drive changes
- People whose AI assistant can already run terminal commands and who use the gws command line
Install recipe-watch-drive-changes
Claude Code
- 1
Copy this prompt.
Install the recipe-watch-drive-changes skill in Claude Code. Run this command: npx skills add https://github.com/googleworkspace/cli --skill recipe-watch-drive-changes --skill gws-events --skill gws-shared Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
This installs 3 skills: the recipe, the gws skills it loads (gws-events) and gws-shared, which those skills tell the agent to read for sign-in and safety rules. The skills only wrap the gws program, so install gws first and sign in once with gws auth login. The README says an unverified Google app limits consent to about 25 scopes, so choose only the services you need when you sign in.
From the vendor's docs. Source.
What's in the skill
When it loads
Subscribe to change notifications on a Google Drive file or folder.
Sections in SKILL.md
- Steps
Key facts
- License
- Apache-2.0
- Installs on skills.sh
- 30,651 (Nov 2, 2026)
- GitHub stars
- 32,038 for the whole repo (Nov 2, 2026)
- Last commit
- Oct 30, 2026 (repo)
What it includes
Subscribes to file updates and sends them to a Pub/Sub topic
Runs events subscriptions create for a target resource such as a shared drive, with the event type google.workspace.drive.file.v1.updated and a Pub/Sub topic as the endpoint.
Try: “Subscribe to updates on my shared drive and send them to my Pub/Sub topic.”
Write ·
Create subscriptionShows the subscriptions you have running
Runs events subscriptions list.
Try: “List my active Drive subscriptions.”
Network ·
List active subscriptionsRenews a subscription by its ID
The recipe passes --subscription SUBSCRIPTION_ID. gws-events-renew documents --name subscriptions/SUB_ID to reactivate one subscription, and --all with --within to renew all that expire soon.
Try: “Renew that subscription.”
Write ·
Renew before expiry
From the official docs
Permissions
Medium risk
The assistant can start a subscription that sends Drive change notices to a Pub/Sub topic. Use a topic you control and remove the subscription when you finish.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It sets up a live subscription on a Drive resource
Step 1 creates an event subscription that sends notices to a Google Cloud Pub/Sub topic you name. Subscriptions expire, and step 3 renews them, so list and clean them up when you are done. github.com
File details can be included in each notice
The example turns on includeResource, so each notice can carry the changed resource. Check who can read the topic. github.com
Needs the gws program and a Google sign-in first
The skill only wraps the gws command line. Install gws and run its sign-in before the first use, as the README describes. github.com
Technical details
| Turning on read-only | The skill has no read-only switch. gws-shared tells the agent to confirm write and delete commands with you and to prefer --dry-run for destructive operations. You can also sign in with only the services you need. |
|---|---|
| Talks to | Google Workspace APIs, through the gws program |
| Sign-in and keys | gws keeps your Google sign-in encrypted on your machine, with the key in your operating system keyring, per the README. |
Questions
What does the recipe-watch-drive-changes skill do?
It tells your assistant how to subscribe to Google Drive change notifications, list the subscriptions and renew them. All steps run through the gws command line.
How do I install it?
Use the install box above. It installs this recipe, the gws skills it loads and gws-shared. The gws program itself is a separate install, and you sign in to Google once before the first run.
Do I need an API key?
No key is named in the skill. You need the gws program and a Google account with access to Google Workspace. The README says gws needs a Google Cloud project for OAuth sign-in credentials. gws auth setup creates one but requires the gcloud CLI, so without gcloud you set up OAuth by hand in the Cloud Console.
Does it work in the Claude app or ChatGPT?
The repo documents no route for them. The skill's steps are gws shell commands, so you need an assistant that can run commands on your computer, such as a coding agent.
What do I need besides gws?
A Google Cloud Pub/Sub topic to receive the notices, plus the Drive ID to watch. The recipe has placeholders for both.
Is it safe?
It creates a subscription tied to your Google Cloud project, so use a topic you control. List and remove subscriptions you no longer need. The skill bundles no scripts of its own.
Is this an official Google skill?
No. The README says gws is not an officially supported Google product, although the repo sits under the googleworkspace GitHub organization.
How is it different from gws events +subscribe?
This recipe creates the subscription with the raw API and sends notices to a Pub/Sub topic you already own. The +subscribe helper in gws-events-subscribe streams events as NDJSON, can set up Pub/Sub resources from a --project and can remove them with --cleanup. gws-events-renew says subscriptions expire if not renewed and suggests --all from a cron job.
Information
updated Nov 2, 2026
- Repository
- googleworkspace/cli
- Folder
skills/recipe-watch-drive-changes
Sources
Docs, issue trackers and discussions this page is built from.
Show all 10Hide
- googleworkspace/cli README · github.com
- recipe-watch-drive-changes SKILL.md · github.com
- gws-drive SKILL.md · github.com
- skills CLI commands · github.com
- gws-events-subscribe SKILL.md · github.com
- gws-events-renew SKILL.md · github.com
- gws-events SKILL.md · github.com
- googleworkspace/cli LICENSE · github.com
- recipe-watch-drive-changes on skills.sh · skills.sh
- gws-shared SKILL.md · github.com