写作32k · #9246
recipe-watch-drive-changes
它能做什么
这个助手会在你的 Google 云端硬盘中的文件或文件夹被修改时通知你。你可以选择要监控的内容,以及接收通知的渠道。
适用场景
- ✓当重要文档被修改时收到通知。
- ✓跟踪共享文件夹中的变化。
- ✓在某个特定文件更新时及时知道。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/recipe-watch-drive-changes/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/recipe-watch-drive-changes/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill recipe-watch-drive-changes
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/recipe-watch-drive-changes/SKILL.md -o SKILL.md
可以这样问 AI
“当“Projects”文件夹中的文件“Monthly Report”更新时通知我。”
每周 5 个新技能,1 分钟读完。
工作原理
它的工作方式是为 Google 云端硬盘设置一个“监听”。当你所选的项目发生变化时,Google 云端硬盘会向一个系统发送消息,由该系统提醒你。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Watch for Drive Changes
PREREQUISITE: Load the following skills to execute this recipe:
gws-events
Subscribe to change notifications on a Google Drive file or folder.
Steps
- Create subscription:
gws events subscriptions create --json '{"targetResource": "//drive.googleapis.com/drives/DRIVE_ID", "eventTypes": ["google.workspace.drive.file.v1.updated"], "notificationEndpoint": {"pubsubTopic": "projects/PROJECT/topics/TOPIC"}, "payloadOptions": {"includeResource": true}}' - List active subscriptions:
gws events subscriptions list - Renew before expiry:
gws events +renew --subscription SUBSCRIPTION_ID
常见问题
需要额外安装什么吗?
需要。这个助手要正常工作,你必须先加载 'gws-events' 技能。
我怎么查看哪些通知处于启用状态?
你可以使用 'List active subscriptions' 命令,让助手列出所有启用中的通知。
通知会过期吗?
会的,通知有有效期。你可以在过期前使用 'Renew' 命令进行续订。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9246
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …