gcp-examples-expert
Generate production-ready Google Cloud code examples from official repositories including ADK samples, Genkit templates, Vertex AI notebooks, and Gemini patterns. Use when asked to "show ADK example" or "provide GCP starter kit". Trigger with relevant phrases based on skill purpose.
What this skill does
# GCP Examples Expert
## Overview
Generate production-ready Google Cloud Platform code examples sourced from official repositories including ADK samples, Agent Starter Pack, Firebase Genkit, Vertex AI samples, Generative AI examples, and AgentSmithy. This skill maps user requirements to the appropriate GCP framework and delivers working code with security, monitoring, and deployment best practices baked in.
## Prerequisites
- Google Cloud project with billing enabled and Vertex AI API activated
- `gcloud` CLI authenticated with appropriate IAM roles (Vertex AI User, Cloud Run Developer)
- Node.js 18+ for Genkit/TypeScript examples or Python 3.10+ for ADK/Vertex AI examples
- Firebase CLI for Genkit deployments (`npm install -g firebase-tools`)
- API keys or service account credentials configured via Secret Manager (never hardcoded)
## Instructions
1. Identify the target framework by matching the request to one of six categories: ADK agents, Agent Starter Pack, Genkit flows, Vertex AI training, Generative AI multimodal, or AgentSmithy orchestration
2. Select the appropriate source repository and code pattern from `${CLAUDE_SKILL_DIR}/references/code-example-categories.md`
3. Adapt the template to the specified programming language (TypeScript, Python, or Go)
4. Configure security settings: IAM least-privilege service accounts, VPC Service Controls, Model Armor for prompt injection protection
5. Add monitoring instrumentation: Cloud Monitoring dashboards, alerting policies, structured logging, OpenTelemetry tracing
6. Set auto-scaling parameters with appropriate min/max instance counts for the deployment target
7. Include cost optimization: select Gemini 2.5 Flash for simple tasks, Gemini 2.5 Pro for complex reasoning, batch predictions for bulk workloads
8. Generate deployment configuration for the target platform (Cloud Run, Firebase Functions, or Vertex AI Endpoints)
9. Provide Terraform or IaC templates for reproducible infrastructure provisioning
10. Cite the source repository and link to official documentation for each pattern used
See `${CLAUDE_SKILL_DIR}/references/workflow.md` for the phased workflow and `${CLAUDE_SKILL_DIR}/references/best-practices-applied.md` for the full best-practices checklist.
## Output
- Complete, runnable code example with imports, configuration, and error handling
- Deployment configuration (Cloud Run service YAML, Firebase function config, or Terraform module)
- Environment variable template listing required secrets and API keys
- Monitoring setup: dashboard JSON, alerting policy definitions, log-based metrics
- Cost estimate guidance based on model selection and expected throughput
- Source repository citation and documentation links
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Invalid GCP project or API not enabled | Vertex AI API disabled or project ID misconfigured | Run `gcloud services enable aiplatform.googleapis.com`; verify project ID in `gcloud config list` |
| Permission denied on Vertex AI resources | Service account missing required IAM roles | Grant `roles/aiplatform.user` and `roles/run.developer`; check VPC-SC perimeter allows access |
| Model not available in region | Requested Gemini model not deployed in specified location | Use `us-central1` or `europe-west4` where Gemini models are available; check regional availability docs |
| Quota exceeded for API calls | Rate limit hit on Vertex AI prediction endpoint | Request quota increase via Cloud Console; implement exponential backoff with jitter |
| Dependency version conflict | Incompatible versions of AI SDK, Genkit, or provider packages | Pin versions in `package.json` or `requirements.txt`; use lockfile to ensure reproducibility |
See `${CLAUDE_SKILL_DIR}/references/errors.md` for additional error scenarios.
## Examples
**Scenario 1: ADK Agent with Code Execution** -- Create a production ADK agent using `google/adk-samples` patterns. Enable Code Execution Sandbox with 14-day state TTL, configure Memory Bank for persistent context, apply VPC Service Controls and IAM least-privilege. Deploy to Vertex AI Agent Engine.
**Scenario 2: Genkit RAG Flow** -- Implement a retrieval-augmented generation system using Firebase Genkit. Define a retriever with text-embedding-gecko embeddings, connect to a vector database, build a RAG flow with Zod-validated input/output schemas. Deploy to Cloud Run with auto-scaling (2-10 instances).
**Scenario 3: Gemini Multimodal Analysis** -- Analyze video content using the `generative-ai` repository patterns. Create a multimodal prompt combining video URIs with text questions using Gemini 2.5 Pro. Include safety filter configuration, token counting for cost estimation, and structured output parsing.
See `${CLAUDE_SKILL_DIR}/references/example-interactions.md` for detailed interaction examples.
## Resources
- [google/adk-samples](https://github.com/google/adk-samples) -- ADK agent creation patterns
- [GoogleCloudPlatform/agent-starter-pack](https://github.com/GoogleCloudPlatform/agent-starter-pack) -- production agent templates
- [genkit-ai/genkit](https://github.com/genkit-ai/genkit) -- RAG flows, tool calling, evaluation
- [GoogleCloudPlatform/vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) -- model training, tuning, deployment
- [GoogleCloudPlatform/generative-ai](https://github.com/GoogleCloudPlatform/generative-ai) -- Gemini multimodal, function calling, grounding
- [GoogleCloudPlatform/agentsmithy](https://github.com/GoogleCloudPlatform/agentsmithy) -- multi-agent orchestration
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.