google-cloud-run
Skill13 starsChanged 26 days agoMITView on GitHub
Verification Tier: code_example_tested | Last Verified: 2026-11-18 Official Docs: https://cloud.google.com/run/docs/authenticating/service-to-service
- Reads credentials
- Installs packages
In this repository140 other files it gives its agents.
- algoliaSkill
- anthropic-mcpSkill
- anthropicSkill
- argo-cdSkill
- auth0Skill
- aws-bedrockSkill
- aws-dynamodbSkill
- aws-lambdaSkill
- aws-s3Skill
- azure-blob-storageSkill
- azure-openaiSkill
- better-authSkill
- better-sqlite3Skill
- biomeSkill
- braintreeSkill
- bullmqSkill
- caddySkill
- chromadbSkill
- clerkSkill
- cloudflare-d1Skill
- cloudflare-r2Skill
- cloudflareSkill
- cloudflare-workersSkill
- cloudinarySkill
- cohereSkill
- convexSkill
- datadogSkill
- deepgramSkill
- deepseekSkill
- deno-deploySkill
- digitaloceanSkill
- discordSkill
- dockerSkill
- drizzleSkill
- elevenlabsSkill
- eslintSkill
- expressSkill
- fastapiSkill
- firebaseSkill
- flySkill
- geminiSkill
- github-actionsSkill
- githubSkill
- gitSkill
- google-cloud-storageSkill
- google-maps-platformSkill
- grafanaSkill
- groqSkill
- helmSkill
- honoSkill
- inngestSkill
- jaegerSkill
- jwtSkill
- kafkaSkill
- kubernetesSkill
- langchainSkill
- langfuseSkill
- langgraphSkill
- lemon-squeezySkill
- linearSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Use gcloud run services proxy for authenticated local testing against private services instead of opening them to allUsers.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Cloud Run Skill
Verification Tier:
code_example_tested| Last Verified: 2026-11-18
Official Docs: https://cloud.google.com/run/docs/authenticating/service-to-service
Overview
Google Cloud Run executes stateless HTTP containers with automatic scale-to-zero and IAM-enforced service-to-service authentication via Google-signed OIDC Identity Tokens.
Installation
npm install google-auth-libraryAuthentication (Service-to-Service OIDC)
For private Cloud Run services (--no-allow-unauthenticated):
- Grant the caller's service account the
roles/run.invokerIAM role on the target service. - Fetch a Google-signed OIDC Identity Token whose
audienceis set to the exact target Cloud Run service root URL (e.g.,https://billing-service-xyz.a.run.app) usinggoogle-auth-library(auth.getIdTokenClient(targetAudience)) or the GCP metadata server. - Pass
Authorization: Bearer <ID_TOKEN>.
Core Concepts
- Container Contract: Listen on
0.0.0.0andNumber(process.env.PORT) || 8080. Never hardcode port3000ignoringPORT. - Graceful Shutdown (
SIGTERM): Cloud Run sendsSIGTERMand allows up to 10 seconds to drain in-flight requests and flush logs/DB connections beforeSIGKILL. - CPU Allocation: Background async work after returning an HTTP response is throttled unless CPU is configured as always-allocated (
--no-cpu-throttling).
Error Handling & Rate Limits
- Retry transient
503cold-start / scaling responses with jittered backoff. - Use
gcloud run services proxyfor authenticated local testing against private services instead of opening them toallUsers.
Security Best Practices
- Assign a dedicated least-privilege runtime service account per Cloud Run service (never use the overly broad Compute Engine default service account).
- Mount secrets via Google Secret Manager integration instead of committing secrets in container images.
AI Pitfalls
- Sending an OAuth2 Access Token instead of an OIDC Identity Token with
audience = targetServiceUrl(results in HTTP401/403). - Binding HTTP servers to
localhost/127.0.0.1instead of0.0.0.0, causing Cloud Run startup health checks to fail. - Spawning fire-and-forget promises after sending the HTTP response with default request-based CPU throttling.
Production Checklist
- Server binds to
0.0.0.0onprocess.env.PORT || 8080 SIGTERMhandler closes HTTP server and flushes connections cleanly- Private service callers hold
roles/run.invokerand send OIDC ID tokens with exact target URL audience - Dedicated least-privilege runtime service account attached
References
Related skills
docker— depends ongoogle-cloud-storage— works well withgoogle-maps-platform— works well with
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

