gcp-patterns

gcp-patterns is a skill for Claude Code, Codex from atstaeff/ai-agents. It costs 17 tokens per session (1,478 once invoked), scanned A, original, MIT.

A guide to designing applications on Google Cloud Platform, Google's cloud-computing service, using serverless services and event-driven systems.

In plain words
What is it for?
Use it when planning, building, or reviewing Google Cloud systems such as Cloud Run services and Pub/Sub-triggered processing.
Why use it?
It helps avoid common design mistakes when services respond to events instead of running as one continuously managed application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/atstaeff/ai-agents/gcp-patterns
Any agent
npx skills add atstaeff/ai-agents --skill gcp-patterns
Clone the repo
git clone --depth 1 https://github.com/atstaeff/ai-agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gcp-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/atstaeff/ai-agents/gcp-patterns.svg)](https://agentmods.dev/skills/atstaeff/ai-agents/gcp-patterns)
Your own site
<a href="https://agentmods.dev/skills/atstaeff/ai-agents/gcp-patterns"><img src="https://agentmods.dev/badge/skills/atstaeff/ai-agents/gcp-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,478 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.01478
Opus 5 $0.00009 $0.00739
Sonnet 5 $0.00003 $0.00296
Haiku 4.5 $0.00002 $0.00148

Measured 5d ago against content hash 7bdd0d871516, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gcp-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gcp-patterns/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GCP Patterns Skill

Instructions for AI

Apply Google Cloud Platform best practices for serverless, event-driven architectures. Use this skill when designing, implementing, or reviewing GCP-based systems.

Core Service Patterns

1. Cloud Run API Service

# main.py — FastAPI on Cloud Run
from fastapi import FastAPI, Depends
from google.cloud import secretmanager

app = FastAPI(title="Order Service")

def get_secret(secret_id: str) -> str:
    client = secretmanager.SecretManagerServiceClient()
    name = f"projects/{PROJECT_ID}/secrets/{secret_id}/versions/latest"
    response = client.access_secret_version(request={"name": name})
    return response.payload.data.decode("UTF-8")

@app.get("/health")
async def health():
    return {"status": "healthy"}

2. Pub/Sub Event Processing

# Cloud Function triggered by Pub/Sub
import functions_framework
from cloudevents.http import CloudEvent
import json

@functions_framework.cloud_event
def process_order_event(cloud_event: CloudEvent) -> None:
    data = json.loads(base64.b64decode(cloud_event.data["message"]["data"]))
    order_id = data["order_id"]
    
    # Process with retry-safe idempotency
    if already_processed(order_id):
        return
    
    process_order(data)
    mark_processed(order_id)

3. BigQuery Analytics Pipeline

from google.cloud import bigquery

def load_to_bigquery(data: list[dict], table_id: str) -> None:
    client = bigquery.Client()
    job_config = bigquery.LoadJobConfig(
        write_disposition=bigquery.WriteDisposition.WRITE_APPEND,
        schema_update_options=[
            bigquery.SchemaUpdateOption.ALLOW_FIELD_ADDITION,
        ],
    )
    job = client.load_table_from_json(data, table_id, job_config=job_config)
    job.result()  # Wait for completion

4. Terraform Module Pattern

# modules/pubsub-topic/main.tf
variable "topic_name" { type = string }
variable "project_id" { type = string }
variable "subscribers" {
  type = list(object({
    name     = string
    endpoint = string
  }))
  default = []
}

resource "google_pubsub_topic" "topic" {
  name    = var.topic_name
  project = var.project_id

  message_retention_duration = "86400s"
}

resource "google_pubsub_topic" "dead_letter" {
  name    = "${var.topic_name}-dlq"
  project = var.project_id

  message_retention_duration = "604800s"  # 7 days retention for dead letters
}

resource "google_pubsub_topic_iam_member" "dead_letter" {
  topic   = google_pubsub_topic.dead_letter.name
  role    = "roles/pubsub.publisher"
  member  = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-pubsub.iam.gserviceaccount.com"
}

resource "google_pubsub_subscription" "sub" {
  for_each = { for s in var.subscribers : s.name => s }

  name  = each.value.name
  topic = google_pubsub_topic.topic.name

  push_config {
    push_endpoint = each.value.endpoint
  }

  dead_letter_policy {
    dead_letter_topic     = google_pubsub_topic.dead_letter.id
    max_delivery_attempts = 5
  }

  retry_policy {
    minimum_backoff = "10s"
    maximum_backoff = "600s"
  }
}

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 206 lines · 17 tokens per session scan A 7bdd0d871516

Subscribe to this mod's changes

gcp-patterns is a skill published in the GitHub repository atstaeff/ai-agents (2 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 1,478 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

gke-reliability

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for disaster recovery setup or full cluster backups (use gke-backup-dr instead).

google/skills · 73 tokens

gke-workload-security

Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running cluster security audits (auditcluster.sh), configuring Workload Identity Federation (impersonation, KSA/GSA binding, and pod setup), enforcing Network Policies (default-deny…

google/skills · 181 tokens

nemo-automodel-launcher-config

Configure NeMo AutoModel job launches for interactive runs, Slurm clusters, and SkyPilot cloud execution.

NVIDIA/skills · 30 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

cloud-architect

Designs cloud architectures, creates migration plans, generates cost optimization recommendations, and produces disaster recovery strategies across AWS, Azure, and GCP. Use when designing cloud architectures, planning migrations, or optimizing multi-cloud deployments. Invoke for Well-Architected Framework, cost…

Jeffallan/claude-skills · 71 tokens