google-spaces-updates
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle Spaces Updates
Google Chat Spaces 更新
Status: Production Ready
Last Updated: 2026-01-09
Post updates to a team Google Chat Space via webhook.
状态:已就绪可用于生产环境
最后更新时间:2026-01-09
通过webhook向团队的Google Chat Space发布更新。
Quick Start
快速开始
1. Setup (first time per project)
1. 首次设置(每个项目一次)
Run or manually create :
/google-spaces-updates setup.claude/settings.jsonjson
{
"project": {
"name": "my-project",
"repo": "github.com/org/my-project"
},
"team": {
"chat_webhook": "https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKEN",
"members": ["Deepinder", "Joshua", "Raquel"]
}
}运行命令或手动创建文件:
/google-spaces-updates setup.claude/settings.jsonjson
{
"project": {
"name": "my-project",
"repo": "github.com/org/my-project"
},
"team": {
"chat_webhook": "https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKEN",
"members": ["Deepinder", "Joshua", "Raquel"]
}
}2. Post an update
2. 发布更新
"Post deployment update to team"
"Tell the team about the new feature"
"Ask the team about the auth approach""向团队发布部署更新"
"告知团队新功能情况"
"向团队咨询认证方案相关问题"How It Works
工作原理
Step 1: Check for project settings
步骤1:检查项目配置
Look for in the current project directory:
.claude/settings.jsonbash
cat .claude/settings.json 2>/dev/null || echo "NOT_FOUND"If NOT_FOUND, ask the user:
"This project doesn't have Google Spaces configured. Would you like me to set it up? I'll need the webhook URL for your team's Google Space."
Then create the file using the template in .
templates/settings-template.json在当前项目目录中查找文件:
.claude/settings.jsonbash
cat .claude/settings.json 2>/dev/null || echo "NOT_FOUND"如果未找到,询问用户:
"该项目尚未配置Google Spaces。是否需要我帮您完成配置?我需要您团队Google Space的webhook URL。"
然后使用中的模板创建该文件。
templates/settings-template.jsonStep 2: Determine update type
步骤2:确定更新类型
Based on the command or context, determine the update type:
| Type | When to use |
|---|---|
| After pushing to production/staging, deploying to Vercel/etc |
| After fixing a bug, especially one reported by team |
| After completing a feature that's ready for review/use |
| When blocked or need team input on a decision |
| For anything else |
根据命令或上下文确定更新类型:
| 类型 | 适用场景 |
|---|---|
| 推送至生产/预发布环境后、部署至Vercel等平台后 |
| 修复bug后,尤其是团队上报的bug |
| 完成可用于评审/使用的功能后 |
| 遇到阻塞或需要团队提供决策输入时 |
| 其他所有场景 |
Step 3: Gather context
步骤3:收集上下文信息
Collect relevant information to include:
bash
undefined收集需要包含的相关信息:
bash
undefinedRecent commits (for context)
最近的提交记录(用于上下文)
git log --oneline -3 2>/dev/null
git log --oneline -3 2>/dev/null
Current branch
当前分支
git branch --show-current 2>/dev/null
git branch --show-current 2>/dev/null
Changed files (if recent changes)
变更文件(如果有最近变更)
git diff --name-only HEAD~1 2>/dev/null | head -10
Also use context from the conversation:
- What was just completed
- Any preview/production URLs
- Relevant file paths
- Who might need to knowgit diff --name-only HEAD~1 2>/dev/null | head -10
同时利用对话中的上下文信息:
- 刚完成的工作内容
- 任何预览/生产环境URL
- 相关文件路径
- 需要知晓的人员Step 4: Format the message
步骤4:格式化消息
Use the appropriate template from directory.
templates/Key formatting rules for Google Chat:
- Use for emphasis (not markdown bold)
*bold* - Use for secondary text
_italic_ - Newlines work as expected
- Keep messages concise but informative
- Include actionable links when relevant
使用目录中的对应模板。
templatesGoogle Chat 关键格式规则:
- 使用表示强调(不要使用Markdown粗体)
*粗体* - 使用表示次要文本
_斜体_ - 换行符可正常使用
- 保持消息简洁但信息完整
- 相关时包含可点击链接
Step 5: Post to webhook
步骤5:通过webhook发布消息
bash
curl -X POST "WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{"text": "MESSAGE_HERE"}'Replace:
- with value from
WEBHOOK_URL→.claude/settings.jsonteam.chat_webhook - with the formatted message (escape quotes properly)
MESSAGE_HERE
bash
curl -X POST "WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{"text": "MESSAGE_HERE"}'替换:
- 为
WEBHOOK_URL中的.claude/settings.json值team.chat_webhook - 为格式化后的消息(需正确转义引号)
MESSAGE_HERE
Step 6: Confirm to user
步骤6:向用户确认
After posting, tell the user:
"Posted update to team chat: [brief summary of what was posted]"
发布完成后,告知用户:
"已向团队聊天发布更新:[发布内容的简要摘要]"
Message Templates
消息模板
Deployment
部署模板
🚀 *Deployed: [PROJECT_NAME]*
[WHAT_CHANGED - 1-2 sentences]
• Branch: `[BRANCH]`
• Commit: `[COMMIT_HASH]`
[• Preview: URL (if applicable)]
[• Production: URL (if applicable)]
_Posted by [USER] via Claude Code_🚀 *已部署:[项目名称]*
[变更内容 - 1-2句话]
• 分支:`[分支名称]`
• 提交记录:`[提交哈希值]`
[• 预览地址:URL(如适用)]
[• 生产地址:URL(如适用)]
_由[用户]通过Claude Code发布_Bug Fix
Bug修复模板
🐛 *Bug Fixed: [PROJECT_NAME]*
*Problem:* [What was broken]
*Solution:* [How it was fixed]
*Files:* [Key files changed]
[• Commit: `[COMMIT_HASH]`]
_Please verify if you reported this issue._🐛 *Bug已修复:[项目名称]*
*问题:* [故障内容]
*解决方案:* [修复方式]
*涉及文件:* [修改的关键文件]
[• 提交记录:`[提交哈希值]`]
_如果您曾反馈过此问题,请帮忙验证修复效果。_Feature Complete
功能完成模板
✨ *Feature Complete: [PROJECT_NAME]*
*[FEATURE_NAME]*
[DESCRIPTION - what it does, 1-2 sentences]
[• Demo: URL]
[• Files: key files]
_Ready for review/testing._✨ *功能完成:[项目名称]*
*[功能名称]*
[功能描述 - 功能用途,1-2句话]
[• 演示地址:URL]
[• 涉及文件:关键文件]
_已准备好进行评审/测试。_Question
问题咨询模板
❓ *Question: [PROJECT_NAME]*
[QUESTION - clear and specific]
*Context:*
[Relevant background - what you're working on, what you've tried]
*Options considered:*
1. [Option A]
2. [Option B]
_@[PERSON] - would appreciate your input_❓ *问题咨询:[项目名称]*
[问题内容 - 清晰明确]
*上下文:*
[相关背景 - 当前正在进行的工作、已尝试的方案]
*已考虑的方案:*
1. [方案A]
2. [方案B]
_@[人员] - 期待您的宝贵意见_Custom
自定义模板
📢 *Update: [PROJECT_NAME]*
[MESSAGE]
_Posted by [USER] via Claude Code_📢 *更新通知:[项目名称]*
[消息内容]
_由[用户]通过Claude Code发布_Setup Command
设置命令
When user runs :
/google-spaces-updates setup- Ask for the Google Spaces webhook URL
- Ask for project name (or detect from package.json/repo)
- Ask for team members (optional)
- Create using the template
.claude/settings.json - Add to
.claude/if not already there.gitignore - Confirm setup is complete
当用户运行命令时:
/google-spaces-updates setup- 询问Google Spaces webhook URL
- 询问项目名称(或从package.json/仓库自动检测)
- 询问团队成员(可选)
- 使用模板创建文件
.claude/settings.json - 若中未包含
.gitignore,则添加进去.claude/ - 确认设置完成
Proactive Suggestions
主动建议
Suggest posting an update when:
- User says "done", "finished", "completed" after significant work
- After a to main/master/production
git push - User mentions team members by name
- User seems blocked and might benefit from team input
Ask: "Would you like me to post an update to the team about this?"
在以下场景建议发布更新:
- 用户在完成重要工作后说"done"、"finished"、"completed"
- 向main/master/production分支执行后
git push - 用户提及团队成员姓名时
- 用户遇到阻塞,可能需要团队提供输入时
询问:"是否需要我向团队发布关于此事的更新?"
When NOT to Use
不适用场景
- Minor refactors, typo fixes
- WIP commits that aren't ready for review
- Internal debugging/testing
- Anything that would just be noise
- 小范围重构、拼写错误修复
- 尚未准备好评审的进行中提交
- 内部调试/测试
- 任何只会产生干扰的内容
Getting a Webhook URL
获取Webhook URL
- Open Google Chat
- Navigate to your Space
- Click Space name → Apps & integrations → Webhooks
- Click Add webhook
- Name it (e.g., "Claude Code Updates")
- Copy the webhook URL
The URL format:
https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKENSecurity: Keep webhook URLs private. Add to .
.claude/settings.json.gitignore- 打开Google Chat
- 进入您的Space
- 点击Space名称 → 应用和集成 → Webhooks
- 点击添加webhook
- 为其命名(例如:"Claude Code 更新")
- 复制webhook URL
URL格式:
https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKEN安全提示:请妥善保管webhook URL,不要公开。将添加到中。
.claude/settings.json.gitignore