gcp-console
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGCP Console Skill
GCP Console Skill
Overview
概述
Enables Claude to access the Google Cloud Console to view Compute Engine instances, Cloud Run services, Cloud SQL databases, and monitor billing and resource usage across GCP projects.
让Claude能够访问Google Cloud Console,查看Compute Engine实例、Cloud Run服务、Cloud SQL数据库,并跨GCP项目监控账单和资源使用情况。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/gcp-console/install.sh | bashOr manually:
bash
cp -r skills/gcp-console ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/gcp-console/install.sh | bash或手动安装:
bash
cp -r skills/gcp-console ~/.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 GCP_EMAIL "your-email@example.com"
undefinedcanifi-env set GCP_EMAIL "your-email@example.com"
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
功能
- View Compute Engine VMs
- Check Cloud Run services
- Monitor Cloud SQL instances
- View GKE clusters
- Check Cloud Functions
- Monitor billing and costs
- 查看Compute Engine虚拟机
- 检查Cloud Run服务
- 监控Cloud SQL实例
- 查看GKE集群
- 检查Cloud Functions
- 监控账单和成本
Usage Examples
使用示例
Example 1: Check Compute Engine
示例1:检查Compute Engine
User: "What VMs are running in GCP?"
Claude: I'll check your Compute Engine instances.
- Opens console.cloud.google.com via Playwright MCP
- Logs into Google account
- Compute Engine VMs:
- prod-instance-1: n2-standard-2, Running (us-central1)
- prod-instance-2: n2-standard-2, Running (us-central1)
- dev-instance: e2-medium, Stopped
- Monthly estimate: $145
- All running instances healthy用户:"我的GCP中有哪些运行中的虚拟机?"
Claude:我将检查您的Compute Engine实例。
- 通过Playwright MCP打开console.cloud.google.com
- 登录Google账户
- Compute Engine虚拟机:
- prod-instance-1: n2-standard-2,运行中(us-central1)
- prod-instance-2: n2-standard-2,运行中(us-central1)
- dev-instance: e2-medium,已停止
- 月度预估费用:$145
- 所有运行中的实例状态健康Example 2: Check Cloud Run
示例2:检查Cloud Run
User: "How are my Cloud Run services?"
Claude: I'll check Cloud Run.
- Views Cloud Run section
- Services:
- my-api: Active, 4 instances, 12k req/day
- image-processor: Active, 0-5 instances, autoscaling
- webhook-handler: Active, 1 instance min
- Last deployments successful
- No errors in last 24h用户:"我的Cloud Run服务状态如何?"
Claude:我将检查Cloud Run。
- 查看Cloud Run板块
- 服务列表:
- my-api: 活跃状态,4个实例,每日12000次请求
- image-processor: 活跃状态,0-5个实例,自动扩缩容
- webhook-handler: 活跃状态,最小1个实例
- 最近部署均成功
- 过去24小时无错误Example 3: View Billing
示例3:查看账单
User: "What's my GCP bill?"
Claude: I'll check Billing.
- Views Billing section
- Current month: $234.56
- Breakdown:
- Compute Engine: $145.00
- Cloud Run: $34.50
- Cloud SQL: $42.00
- Cloud Storage: $8.06
- Other: $5.00
- Budget alert: 60% of $400
- Credits remaining: $150用户:"我的GCP账单是多少?"
Claude:我将检查账单情况。
- 查看账单板块
- 当前月度费用:$234.56
- 费用明细:
- Compute Engine: $145.00
- Cloud Run: $34.50
- Cloud SQL: $42.00
- Cloud Storage: $8.06
- 其他: $5.00
- 预算警报:已达$400预算的60%
- 剩余 credits:$150Authentication Flow
认证流程
- Navigate to console.cloud.google.com via Playwright MCP
- Enter Google account email
- Enter password
- Handle 2FA if enabled
- Select project if multiple
- Maintain session for console access
- 通过Playwright MCP导航至console.cloud.google.com
- 输入Google账户邮箱
- 输入密码
- 若启用则处理双因素认证(2FA)
- 若有多个项目则选择对应项目
- 维护会话以访问控制台
Error Handling
错误处理
- Login Failed: Retry credentials
- 2FA Required: Complete verification
- Project Access: Check IAM permissions
- Session Expired: Re-authenticate
- Rate Limited: Wait and retry
- Quota Exceeded: Check quotas
- 登录失败:重试凭证
- 需要2FA:完成验证
- 项目访问问题:检查IAM权限
- 会话过期:重新认证
- 速率限制:等待后重试
- 配额超限:检查配额情况
Self-Improvement Instructions
自我改进说明
After each interaction:
- Track resource patterns
- Note cost trends
- Log service usage
- Document UI changes
Suggest updates when:
- GCP Console updates
- New services added
- Pricing changes
- Features evolve
每次交互后:
- 追踪资源使用模式
- 记录成本趋势
- 日志服务使用情况
- 记录UI变化
在以下情况时建议更新:
- GCP Console更新
- 添加新服务
- 定价变更
- 功能演进
Notes
说明
- Google's cloud platform
- Strong data/ML services
- Global infrastructure
- Kubernetes origin (GKE)
- BigQuery for analytics
- Firebase integration
- Competitive pricing
- Google的云平台
- 强大的数据/ML服务
- 全球化基础设施
- Kubernetes起源(GKE)
- BigQuery用于分析
- Firebase集成
- 具有竞争力的定价