Designs Google Cloud architecture, deploys to Cloud Run/GKE, builds BigQuery data pipelines, and optimizes GCP costs. Outputs Terraform IaC and cost-saving recommendations.
Ships in 10-platform. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
需要为创业公司或企业设计可扩展、成本可控的 Google Cloud 架构,并产出基础设施即代码(IaC)时使用。典型场景:
不该用边界:
四种核心架构模式:
步骤 2 架构设计:
python scripts/architecture_designer.py --input requirements.json --output design.json
输出含 recommended_pattern、service_stack、estimated_monthly_cost_usd、pros/cons。
步骤 3 成本优化:
python scripts/cost_optimizer.py --resources current_setup.json --monthly-spend 2000
输出含按服务的成本拆分、右调建议、承诺使用折扣(CUD)、持续使用折扣(SUD)分析、潜在月度节省。详细估算用 GCP 定价计算器。
步骤 4 生成 IaC:
python scripts/deployment_manager.py --app-name my-app --pattern serverless_web --region us-central1
步骤 6 安全核查:
gcloud projects get-iam-policy $PROJECT_ID --format=json
gcloud iam service-accounts list --project=$PROJECT_ID
gcloud access-context-manager perimeters list --policy=$POLICY_ID
安全清单:IAM 遵循最小权限(优先预定义角色而非基础角色);GKE 用 Workload Identity;敏感 API 配 VPC Service Controls;客户管理密钥用 Cloud KMS;为所有管理活动开启 Cloud Audit Logs;用组织策略限制公开访问;所有凭据走 Secret Manager。
部署失败排错:
gcloud run services describe my-app-api --region us-central1
gcloud logging read "resource.type=cloud_run_revision" --limit=20
gcloud run deploy my-app-api --image gcr.io/$PROJECT_ID/my-app:latest --region us-central1
常见原因:IAM 权限错误(核对服务账号角色与 --allow-unauthenticated);配额超限(IAM & Admin > Quotas 申请提升);容器启动失败(查容器日志与健康检查);区域/API 未启用(gcloud services enable)。
Cloud Run + Firestore 的 Terraform(节选):
resource "google_cloud_run_v2_service" "api" {
name = "${var.environment}-${var.app_name}-api"
location = var.region
template {
containers {
image = "gcr.io/${var.project_id}/${var.app_name}:latest"
resources { limits = { cpu = "1000m", memory = "512Mi" } }
env { name = "FIRESTORE_PROJECT", value = var.project_id }
}
scaling { min_instance_count = 0, max_instance_count = 10 }
}
}
resource "google_firestore_database" "default" {
project = var.project_id
name = "(default)"
location_id = var.region
type = "FIRESTORE_NATIVE"
}
gcloud CLI 部署:
gcloud run deploy my-app-api \
--image gcr.io/$PROJECT_ID/my-app:latest \
--region us-central1 --platform managed --allow-unauthenticated \
--memory 512Mi --cpu 1 --min-instances 0 --max-instances 10
gcloud firestore databases create --location=us-central1
Cloud Build CI/CD(cloudbuild.yaml 节选): 用 gcr.io/cloud-builders/docker 构建并推送 gcr.io/$PROJECT_ID/my-app:$COMMIT_SHA,再用 cloud-sdk 执行 gcloud run deploy。创建触发器:
gcloud builds triggers create github \
--repo-name=my-app --repo-owner=my-org \
--branch-pattern="^main$" --build-config=cloudbuild.yaml
避免以下反模式:
| 反模式 | 为何失败 | 更优做法 |
|---|---|---|
| 生产用默认 VPC | 无隔离、共享防火墙规则 | 自建带私有子网的 VPC |
| 过度预置 GKE 节点池 | 闲置容量浪费成本 | 用 GKE Autopilot 或集群自动扩缩 |
| 密钥存环境变量 | Console/日志可见 | Secret Manager + Workload Identity |
| 忽略持续使用折扣 | 漏掉 20–30% 自动节省 | 按稳定基线右调 VM |
| SaaS 单区域部署 | 单区故障即全停 | 多区域 + Cloud Load Balancing |
| 重负载用 BigQuery 按需计费 | 规模化成本不可控 | 用 BigQuery slots(统一费率) |
| 用 Cloud Functions 跑长任务 | 9 分钟超时、冷启动 | >60s 任务改用 Cloud Run |
完整模式与最佳实践见 references/architecture_patterns.md、references/service_selection.md、references/best_practices.md。
采编自 alirezarezvani/claude-skills(MIT 许可)。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/10-platform:gcp-cloud-architectfrom 10-platform
npx claudepluginhub findscripter/everything-skills --plugin 10-platform66 skills in this plugin
/agentmail-email-infra当 AI 智能体需要真实邮箱完成注册/验证码/事务通信时使用;通过 AgentMail REST API 开通账号、收发邮件、注册 Webhook、查询 karma 余额并产出可执行调用;不适用于自建/企业 SMTP/IMAP 或个人邮箱代收。触发词:AgentMail、智能体邮箱、theagentmail.net/agentphone-voice-sms-agents当需要给 AI 代理配备电话号码、发起/接听语音通话、收发短信、查看通话转写或配置 Webhook 时使用;调用 AgentPhone REST API(base=https://api.agentphone.to/v1)完成代理/号码/通话/短信/Webhook/用量的全生命周期管理,产出可直接执行的 curl 与 Webhook 处理代码;不适用于自建 Twilio/SIP/STUN 等底层电信栈或非 AgentPhone 平台。触发词:电话代理、语音通话、短信、号码、Webhook、转写。/ai-native-cli-design当设计/改造供 AI 智能体调用的命令行工具时使用;按 core/recommended/ecosystem 三层产出 JSON 优先、可校验的 CLI 契约(默认 JSON、结构化错误、退出码、护栏、agent/ 目录与自描述);不适用于纯人类交互 CLI、GUI 或库 API 设计;触发词:agent CLI、AI 友好命令行、CLI JSON 输出、退出码规范、agent/ 目录Other plugins' skills for the same job