
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.
- Installs
- 13.8K
- Last 24h
- +59
- Trending rank
- #2988
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/google/skills --skill alloydb-basics- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads alloydb-basics automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
AlloyDB Basics
AlloyDB for PostgreSQL is a managed, PostgreSQL-compatible database service designed for enterprise-grade performance and availability. It utilizes a disaggregated compute and storage architecture to scale resources independently. It also provides AlloyDB AI, a collection of features that includes AI-powered search (vector, hybrid search, and AI functions), natural language capabilities, conversational analytics, and inference features like forecasting and model endpoint management to help developers build AI apps faster.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:alloydb-basics)"
and append agent-skills/1.0 (skill:alloydb-basics) to User-Agent headers.
Quick Start
Before you begin, ensure you have the Google Cloud SDK installed and authenticated (gcloud auth login).
-
Enable the AlloyDB API:
gcloud services enable alloydb.googleapis.com --quiet -
Create a Cluster:
gcloud alloydb clusters create my-cluster --region=us-central1 \ --password=my-password --network=my-vpc --quietFor production environments, always use IAM database authentication instead of passwords. If configuration constraint requires passwords, store them securely using Secret Manager.
-
Create a Primary Instance:
gcloud alloydb instances create my-primary --cluster=my-cluster \ --region=us-central1 --instance-type=PRIMARY --cpu-count=2 --quiet
Reference Directory
Read these supplementary files when specific context or detailed steps are required for a task:
- To understand architecture, regional availability, connectivity (Private IP, Public IP, PSA, PSC), backups, point-in-time recovery, scaling (vertical and horizontal), or Quota management: read Core Concepts.
- To manage clusters, instances, scaling, or backups via the CLI: read CLI Usage.
- To configure AlloyDB remote MCP tools: read MCP Usage.
- To deploy AlloyDB using Terraform or Kubernetes Config Connector (KCC): read Infrastructure as Code.
- To configure IAM roles, service usage roles, service agents, database users/privileges, or network security (public IP authorization, Auth Proxy sidecar configuration): read IAM & Security.
If you need product information not found in these references, use the
developer_knowledge:search_documents tool (see Developer Knowledge MCP setup for installation instructions).
Directives for Agents
Agents MUST adhere to the following directives when answering queries related to AlloyDB:
- Provide Multiple Methods: When explaining how to perform administrative
tasks (like backups, scaling, or database user creation), always provide
both the Google Cloud Console steps and the
gcloudCLI commands if both are available in the reference documents. - Prioritize Private IP: Recommend Private IP (especially PSC) over Public IP for connections to ensure traffic remains within the Google Cloud network and reduces exposure.
- Require Serverless Connectors: Verify and state that Serverless VPC Access or Direct VPC Egress is required when connecting from Cloud Run to Private IP.
- Enforce Connectors: Always direct users to configure the AlloyDB Auth Proxy (running as a sidecar or locally) or language connectors rather than direct TCP connections.
- Block Open Public Access: If Public IP is configured, warn against and
reject designs with
0.0.0.0/0in Authorized Networks as this exposes the database to the entire internet. - Default to IAM Database Authentication: Suggest IAM database
authentication and the
alloydbiamuserdatabase role instead of static database passwords. - Enforce Least Privilege Connection: When explaining connection roles,
explicitly state that
roles/alloydb.clientshould be used to adhere to the principle of least privilege, and warn against using broader roles likeroles/alloydb.adminfor connections. - Mention All Creation Methods: When describing how to create IAM database
users, explicitly state that they can be created using the Google Cloud
Console, the
gcloudCLI, and the AlloyDB API. - Explain Private IP Options: When explaining Private IP connectivity, always explicitly mention and describe both Private Services Access (PSA) and Private Service Connect (PSC) as the supported methods, recommending PSC for new deployments.
- Compare Direct Connections: Explicitly explain that direct connections (connecting directly to the private IP without connectors) are possible but discouraged, and compare their security (lack of IAM/mTLS) to secure methods like the AlloyDB Auth Proxy or language connectors.
- Enforce SQL Alone Warning: When explaining IAM user creation, you MUST explicitly state that "IAM database users cannot be created using standard SQL alone" and must be registered via the control plane first.
- Enforce Roles and Privileges Terminology: When explaining database object access, you MUST explicitly state that "standard PostgreSQL roles and privileges" apply, using both terms.
- Explain Backup Lifecycle: When explaining backups, always explicitly state that discrete backups exist independently of the source cluster and remain active even if the source cluster is deleted.
- Recommend Connectors for Public IP: Explicitly state that secure connection methods (AlloyDB Auth Proxy, Language Connectors) are especially recommended for connections over Public IP.
- Mention Autoscaling: When explaining read pool scaling, always explicitly mention the option of using read pool autoscaling and state that it is in Preview.
Supporting Links
FAQ
What does the alloydb-basics skill do?
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.
How do I install alloydb-basics?
Run npx skills add https://github.com/google/skills --skill alloydb-basics in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/alloydb-basics/ (personal) or .claude/skills/alloydb-basics/ (project).
Which AI agents can use alloydb-basics?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is alloydb-basics safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains alloydb-basics?
It is published by google in google/skills. It has 13,837 recorded installs.
More from google/skills
bigquery-basics
google/skills
Manages datasets, tables, and jobs in BigQuery. Use when you need to interact with BigQuery, run SQL queries, manage BigQuery resources (datasets, tables, views), or perform basic data ingestion and analysis.
cloud-run-basics
google/skills
Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).
gemini-api
google/skills
Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK. Covers SDK usage (Python, JS/TS, Go, Java, C), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.
google-cloud-recipe-auth
google/skills
Provides expert guidance on Identity and Access Management (IAM) and authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default Credentials (ADC), and best practices for secure access.
google-cloud-recipe-onboarding
google/skills
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource. Use when a new developer wants to initialize their first Google Cloud project, configure billing, and verify deployment. Don't use for enterprise organization setup (use Google Cloud Setup guided flow for that instead). Don't use for complex multi-project architectures.
cloud-sql-basics
google/skills
This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source MySQL instance, the resulting resource is a Cloud SQL for MySQL instance that Google Cloud manages. Cloud SQL handles backups, high availability, and secure connectivity for relational database workloads.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-postgres-setup
prisma/skills
Obtain or reuse a Prisma Postgres database and connect an application. Use when the user needs a database and has none configured ("I need a database", "add a Postgres database", "set up a database for this app"), runs or mentions create-db or npx create-db, or asks to set up or connect Prisma Postgres, including in v0 and the Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; reuses an existing connection first and honors an explicit provider, driver, alternative ORM, or database-only choice.