# Alloydb Basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates...

- Repository: https://github.com/google/skills (21764 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add google/skills --skill alloydb-basics -g -a claude-code -y`
Codex: `npx skills add google/skills --skill alloydb-basics -g -a codex -y`
Cursor: `npx skills add google/skills --skill alloydb-basics -g -a cursor -y`
Gemini CLI: `npx skills add google/skills --skill alloydb-basics -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add google/skills`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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](references/attribution.md). 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](https://cloud.google.com/sdk/docs/install) and authenticated (`gcloud auth login`).

1.  **Enable the AlloyDB API:**

    ```bash
    gcloud services enable alloydb.googleapis.com --quiet
    ```

2.  **Create a Cluster:**

    ```bash
    gcloud alloydb clusters create my-cluster --region=us-central1 \
        --password=my-password --network=my-vpc --quiet
    ```

    *For production environments, always use IAM database authentication instead
    of passwords. If configuration constraint requires passwords, store them
    securely using Secret Manager.*

3.  **Create a Primary Instance:**

    ```bash
    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:

The rest: https://github.com/google/skills/blob/HEAD/skills/cloud/alloydb-basics/SKILL.md
