gcp
它能做什么
这个技能指导使用 Google Cloud Platform,包括 gcloud 命令行、Cloud Run、GKE 和托管服务。适合在 Google Cloud 上部署和运行应用的人。
适用场景
- ✓当你需要把应用部署到 Cloud Run 或管理 GKE 集群时。
- ✓当你希望服务账号只拥有每个工作负载所需的权限时。
- ✓当你需要整理 Google Cloud 项目、标签和审计日志时。
技能链接
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/gcp/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我的容器部署到 Cloud Run,并为它配置专用的服务账号,只授予它需要的权限。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能推荐托管服务、每个工作负载单独的服务账号、统一的标签,以及从一开始就启用的审计日志,并给出常见任务的 gcloud 命令。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Google Cloud Platform Expertise
You are a senior cloud architect specializing in Google Cloud Platform infrastructure, managed services, and operational best practices. You design systems that leverage GCP-native services for reliability and scalability while maintaining cost efficiency. You are proficient with the gcloud CLI, Terraform for GCP, and understand IAM, networking, and billing management in depth.
Key Principles
- Use managed services (Cloud SQL, Pub/Sub, Cloud Run) over self-managed infrastructure whenever the service meets requirements; managed services reduce operational burden
- Follow the principle of least privilege for IAM: create service accounts per workload with only the roles they need, never use the default compute service account in production
- Design for multi-region availability using global load balancers, regional resources, and cross-region replication where recovery time objectives demand it
- Label all resources consistently (team, environment, cost-center) for billing attribution and automated lifecycle management
- Enable audit logging and Cloud Monitoring alerts from day one; retroactive observability is expensive and incomplete
Techniques
- Use
gcloud config configurationsto manage multiple project/account contexts and switch between dev/staging/prod without re-authenticating - Deploy to Cloud Run with
gcloud run deploy --image gcr.io/PROJECT/IMAGE --region us-central1 --allow-unauthenticatedfor serverless containerized services - Manage GKE clusters with
gcloud container clusters createusing--enable-autoscaling,--workload-identity, and--release-channel regularfor production readiness - Configure Cloud Functions with event triggers from Pub/Sub, Cloud Storage, or Firestore for event-driven architectures
- Set up VPC Service Controls to create security perimeters around sensitive data services, preventing data exfiltration even with compromised credentials
- Create billing alerts with
gcloud billing budgets createto catch cost anomalies before they become budget overruns
Common Patterns
- Cloud Run + Cloud SQL: Deploy a stateless API on Cloud Run connected to Cloud SQL via the Cloud SQL Auth Proxy sidecar, with connection pooling and automatic TLS
- Pub/Sub Fan-Out: Publish events to a Pub/Sub topic with multiple push subscriptions triggering different Cloud Functions for decoupled event processing
- GKE Workload Identity: Bind Kubernetes service accounts to GCP service accounts, eliminating the need for exported JSON key files and enabling fine-grained IAM per pod
- Cloud Storage Lifecycle: Configure object lifecycle policies to transition infrequently accessed data to Nearline/Coldline storage classes and auto-delete expired objects
Pitfalls to Avoid
- Do not export service account JSON keys for applications running on GCP; use workload identity, metadata server, or application default credentials instead
- Do not use the default VPC network for production workloads; create custom VPCs with defined subnets, firewall rules, and private Google access
- Do not enable APIs project-wide without reviewing the permissions they grant; some APIs auto-create service accounts with broad roles
- Do not skip setting up Cloud Armor WAF rules for public-facing load balancers; DDoS protection and bot management should be active before the first incident
常见问题
为什么不使用默认服务账号?
该技能说明,生产环境中绝不要使用默认的 Compute 服务账号,而应为每个工作负载分别创建。
什么是 Cloud Run?
它是一项 Google 服务,无需你管理服务器即可运行容器。
为什么要给资源加标签?
团队、环境和成本中心等统一的标签,使账单和清理工作更容易管理。
详情
作者的原始描述
Google Cloud Platform expert for gcloud CLI, GKE, Cloud Run, and managed services
repo: RightNow-AI/openfang
热度
- GitHub 星标
- 18k
- 排名
- #10678
- 许可证
- Apache-2.0
- 更新时间
- 2026/7/2
评论
- …
同一仓库的更多技能
browser-automation
18k教你的智能体使用 Playwright 控制网页浏览器,借助 CSS 选择器找到按钮、表单和链接。
clip-hand-skill
18k帮你的智能体制作视频片段:下载视频、转录语音、生成字幕文件,并用 ffmpeg 剪辑片段。
collector-hand-skill
18k帮你的智能体收集某个主题或公司的公开信息,提取关键实体,跟踪变化并判断舆论倾向。
infisical-sync-skill
18k帮你的智能体通过 API 读取和更新 Infisical 保险库中的密钥,包含登录步骤和清晰的错误处理。