google-chat
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle Chat Skill
Google Chat Skill
Overview
概述
Automates Google Chat operations including direct messaging, space management, threaded conversations, and file sharing through browser automation.
通过浏览器自动化实现Google Chat操作自动化,包括直接消息发送、空间管理、线程对话和文件共享。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/google-chat/install.sh | bashOr manually:
bash
cp -r skills/google-chat ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/google-chat/install.sh | bash或者手动安装:
bash
cp -r skills/google-chat ~/.canifi/skills/Setup
设置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set GOOGLE_EMAIL "your-email@example.com"
canifi-env set GOOGLE_PASSWORD "your-password"
undefinedcanifi-env set GOOGLE_EMAIL "your-email@example.com"
canifi-env set GOOGLE_PASSWORD "your-password"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,由您掌控。 Canifi LifeOS尊重您的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
- 使用CDP模式完成浏览器自动化设置
- 在Playwright控制的Chrome窗口中手动登录该服务
- Claude将使用您的已认证会话,全程不会获取您的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭据仅能在您的本地机器上访问,绝不会被传输。
Capabilities
功能
- Send direct messages
- Create and manage spaces
- Participate in threaded conversations
- Share files from Google Drive
- Search message history
- Manage space membership
- Use smart chips and formatting
- Handle message notifications
- 发送直接消息
- 创建和管理空间
- 参与线程对话
- 从Google Drive共享文件
- 搜索消息历史
- 管理空间成员
- 使用智能芯片和格式设置
- 处理消息通知
Usage Examples
使用示例
Example 1: Send Direct Message
示例1:发送直接消息
User: "Message Sarah on Google Chat about the project deadline"
Claude: I'll send that message.
- Navigate to chat.google.com
- Find or start conversation with Sarah
- Compose message about deadline
- Send message
- Confirm delivery用户:"在Google Chat上给Sarah发送关于项目截止日期的消息"
Claude:我会发送这条消息。
- 导航至chat.google.com
- 找到或启动与Sarah的对话
- 撰写关于截止日期的消息
- 发送消息
- 确认送达Example 2: Create Space
示例2:创建空间
User: "Create a Google Chat space for the Q1 Planning team"
Claude: I'll create that space.
- Click create space
- Name it "Q1 Planning"
- Add team members
- Configure space settings
- Confirm creation用户:"为Q1规划团队创建一个Google Chat空间"
Claude:我会创建这个空间。
- 点击创建空间
- 将其命名为"Q1规划"
- 添加团队成员
- 配置空间设置
- 确认创建完成Example 3: Post in Thread
示例3:在线程中回复
User: "Reply to the budget thread in the Finance space"
Claude: I'll reply to that thread.
- Navigate to Finance space
- Find budget thread
- Compose reply
- Post in thread
- Confirm posted用户:"在财务空间的预算线程中回复"
Claude:我会回复该线程。
- 导航至财务空间
- 找到预算线程
- 撰写回复内容
- 在线程中发布回复
- 确认发布成功Example 4: Share Drive File
示例4:共享云端硬盘文件
User: "Share the proposal document in the Sales space"
Claude: I'll share that file.
- Open Sales space
- Click attach file
- Select from Google Drive
- Share proposal document
- Confirm shared用户:"在销售空间中共享提案文档"
Claude:我会共享该文件。
- 打开销售空间
- 点击附加文件
- 从Google Drive中选择文件
- 共享提案文档
- 确认共享完成Authentication Flow
认证流程
- Navigate to chat.google.com via Playwright MCP
- Sign in with Google credentials from canifi-env
- Handle 2FA if enabled (notify user via iMessage)
- Verify chat access
- Maintain session cookies
- 通过Playwright MCP导航至chat.google.com
- 使用canifi-env中的Google凭据登录
- 若启用了2FA则进行处理(通过iMessage通知用户)
- 验证Chat访问权限
- 保留会话Cookie
Error Handling
错误处理
- Login Failed: Retry Google sign-in flow
- Session Expired: Re-authenticate automatically
- 2FA Required: iMessage for verification code
- Space Not Found: Search by name
- User Not Found: Check email address format
- File Access Denied: Check Drive permissions
- Rate Limited: Implement backoff
- Workspace Restriction: Notify of organization policies
- 登录失败:重试Google登录流程
- 会话过期:自动重新认证
- 需要2FA:通过iMessage发送验证码请求
- 未找到空间:按名称搜索
- 未找到用户:检查邮箱地址格式
- 文件访问被拒绝:检查云端硬盘权限
- 速率限制:实现退避机制
- 工作区限制:通知用户组织政策限制
Self-Improvement Instructions
自我改进说明
When encountering new Google Chat features:
- Document new UI elements
- Add support for new message types
- Log successful space patterns
- Update for Workspace changes
当遇到Google Chat新功能时:
- 记录新的UI元素
- 添加对新消息类型的支持
- 记录成功的空间操作模式
- 根据Workspace更新进行适配
Notes
注意事项
- Part of Google Workspace suite
- Spaces replace classic Hangouts rooms
- Threaded conversations optional per space
- Drive integration for file sharing
- Smart chips for @mentions and dates
- Bots can be added to spaces
- Consumer vs Workspace versions differ
- 属于Google Workspace套件的一部分
- Spaces替代了经典的Hangouts房间
- 线程对话在每个空间中为可选功能
- 与Drive集成实现文件共享
- 智能芯片支持@提及和日期
- 可在空间中添加机器人
- 消费者版本与Workspace版本存在差异