MR
Mayur Rathi
@sickn33
⭐ 47.3k GitHub stars

gcp-cloud-functions

gcp-cloud-functions is an engineering AI skill with a core value of Deploy serverless functions on Google Cloud Functions. It helps developers solve real-world problems in the engineering domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Deploy serverless functions on Google Cloud Functions. Configure triggers and manage deployments. Use when implementing serverless workloads on GCP.

Last verified on: 2026-10-06

Quick Facts

Category engineering
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 47.3k
Last Verified 2026-10-06
Risk Level Low
mkdir -p ./skills/gcp-cloud-functions && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/gcp-cloud-functions/SKILL.md -o ./skills/gcp-cloud-functions/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# GCP Cloud Functions


Build and deploy event-driven serverless applications with Google Cloud Functions (Gen1 and Gen2).


When to Use


- Processing webhooks, API endpoints, or lightweight HTTP backends

- Reacting to events from Pub/Sub, Cloud Storage, Firestore, or Eventarc

- Running scheduled tasks (cron) without maintaining a server

- Building data-processing pipelines triggered by file uploads

- Prototyping microservices before committing to Cloud Run or GKE


Prerequisites


- Google Cloud SDK (`gcloud`) installed and authenticated

- APIs enabled: Cloud Functions, Cloud Build, Artifact Registry, Cloud Run (Gen2)

- IAM role `roles/cloudfunctions.developer` (or `roles/run.developer` for Gen2)


bash
gcloud services enable cloudfunctions.googleapis.com cloudbuild.googleapis.com \
  artifactregistry.googleapis.com run.googleapis.com eventarc.googleapis.com

Gen1 vs Gen2 Comparison


| Feature | Gen1 | Gen2 (recommended) |

|---------|------|---------------------|

| Runtime | Cloud Functions infra | Built on Cloud Run |

| Max timeout | 9 minutes | 60 minutes |

| Max memory | 8 GB | 32 GB |

| Concurrency | 1 request/instance | Up to 1000/instance |

| Traffic splitting | No | Yes |

| Eventarc triggers | No | Yes |


Deploy an HTTP Function (Gen2)


bash
# Python HTTP function
gcloud functions deploy hello-http \
  --gen2 --region=us-central1 --runtime=python312 \
  --trigger-http --allow-unauthenticated \
  --entry-point=hello_http \
  --memory=256Mi --timeout=60s \
  --min-instances=0 --max-instances=100 \
  --set-env-vars=APP_ENV=production --source=.

# Node.js HTTP function
gcloud functions deploy hello-node \
  --gen2 --region=us-central1 --runtime=nodejs20 \
  --trigger-http --allow-unauthenticated \
  --entry-point=helloNode --memory=256Mi --source=.

Deploy a Pub/Sub Triggered Function


bash
gcloud pubsub topics create order-events

gcloud functions deploy process-order \
  --gen2 --region=us-central1 --runtime=python312 \
  --trigger-topic=order-events \
  --entry-point=process_order \
  --memory=512Mi --timeout=120s --retry \
  --service-account=order-processor@${PROJECT_ID}.iam.gserviceaccount.com \
  --source=.

Deploy a Cloud Storage Triggered Function


bash
gcloud functions deploy process-upload \
  --gen2 --region=us-central1 --runtime=python312 \
  --trigger-event-filters="type=google.cloud.storage.object.v1.finalized" \
  --trigger-event-filters="bucket=my-upload-bucket" \
  --entry-point=process_upload \
  --memory=1Gi --timeout=300s --source=.

Deploy a Scheduled Function


bash
gcloud functions deploy daily-cleanup \
  --gen2 --region=us-central1 --runtime=python312 \
  --trigger-http --no-allow-unauthenticated \
  --entry-point=daily_cleanup --source=.

gcloud scheduler jobs create http daily-cleanup-job \
  --schedule="0 2 * * *" \
  --uri="https://us-central1-${PROJECT_ID}.cloudfunctions.net/daily-cleanup" \
  --http-method=POST \
  --oidc-service-account-email=scheduler-sa@${PROJECT_ID}.iam.gserviceaccount.com \
  --location=us-central1

Python Function Examples


python
# main.py
import functions_framework
import base64, json
from flask import jsonify
from google.cloud import firestore

@functions_framework.http
def hello_http(request):
    """HTTP Cloud Function."""
    name = request.args.get("name", "World")
    return jsonify({"message": f"Hello, {name}!", "status": "ok"}), 200

@functions_framework.cloud_event
def process_order(cloud_event):
    """Triggered by a Pub/Sub message."""
    data = base64.b64decode(cloud_event.data["message"]["data"]).decode("utf-8")
    order = json.loads(data)
    db = firestore.Client()
    db.collection("orders").document(order["id"]).set({
        "status": "processing", "items": order["items"], "total": order["total"],
    })

@functions_framework.cloud_event
def process_upload(cloud_event):
    """Triggered when a file is uploaded to Cloud Storage."""
    data = cloud_event.data
    bucket_name, file_name = data

🎯 Best For

  • Claude users
  • AI users

💡 Use Cases

  • Using gcp-cloud-functions in daily workflow
  • Automating repetitive engineering tasks

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply gcp-cloud-functions to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

How do I install gcp-cloud-functions?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/gcp-cloud-functions/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills