New to Claude Skills? Learn how to install them →

google on GitHub

Cloud SQL Basics

Free

Manage your Cloud SQL resources effortlessly.

by google17.6k stars on google/skills
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Cloud SQL Basics does

Cloud SQL Basics provides a streamlined way to create and manage Cloud SQL instances for MySQL, PostgreSQL, and SQL Server on Google Cloud. This skill automates the setup process and handles essential database management tasks such as backups, high availability, and secure connectivity. By leveraging Cloud SQL, developers can focus on building applications without worrying about the underlying database infrastructure.

The skill includes detailed instructions for enabling the necessary APIs and creating database instances through the command line. Users can quickly set up a new Cloud SQL instance, configure users, and create databases with straightforward Bash commands. This makes it an excellent resource for developers looking to integrate relational databases into their applications without the overhead of manual management.

In addition to instance creation, Cloud SQL Basics provides references for core concepts, command-line interface (CLI) usage, client library connections, and security practices. These resources ensure that users have comprehensive guidance on managing their Cloud SQL environments effectively. Whether you are a developer or a designer, this skill equips you with the knowledge to utilize Cloud SQL efficiently.

This skill is particularly beneficial for teams adopting cloud-based solutions and looking to implement best practices in database management. With its focus on automation and security, Cloud SQL Basics is an essential tool for anyone working with relational databases in the cloud.

When to use it

Use this skill when you need to quickly set up and manage Cloud SQL instances for your applications.

When not to use it

This skill may not be suitable if you require advanced database configurations or custom setups not covered by standard Cloud SQL features.

What you can build with it

Setting Up a New Database

Quickly create a new Cloud SQL instance and database for your application using simple command-line instructions.

Automating Database Management

Utilize the skill to automate backups and updates, ensuring your database remains secure and up-to-date.

Integrating with Application Code

Leverage the provided references to connect your application to Cloud SQL using various programming languages.

How to install Cloud SQL Basics

View source

1. Install with the skills CLI

npx skills add google/skills/cloud-sql-basics --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google

Cloud SQL Basics

Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL, and SQL Server. It automates time-consuming tasks like patches, updates, backups, and replicas, while providing high performance and availability for your applications.

Prerequisites

Ensure you have the necessary IAM permissions to create and manage Cloud SQL instances. The Cloud SQL Admin (roles/cloudsql.admin) role provides full access to Cloud SQL resources.

Quick Start (PostgreSQL)

  1. Enable the API:

    gcloud services enable sqladmin.googleapis.com --quiet
    
  2. Create an Instance:

    gcloud sql instances create INSTANCE_NAME \
      --database-version=POSTGRES_18 \
      --cpu=2 \
      --memory=7680MiB \
      --region=REGION \
      --quiet
    
  3. Set a password for the default user:

    Because this is a Cloud SQL for PostgreSQL instance, the default admin user is postgres:

    gcloud sql users set-password postgres \
      --instance=INSTANCE_NAME --password=PASSWORD \
      --quiet
    
  4. Create a database:

    gcloud sql databases create DATABASE_NAME \
      --instance=INSTANCE_NAME \
      --quiet
    
  5. Get the instance connection name:

    You need the instance connection name (which is formatted as PROJECT_ID:REGION:INSTANCE_NAME) to connect using the Cloud SQL Auth Proxy. Retrieve it with the following command:

    gcloud sql instances describe INSTANCE_NAME \
      --format="value(connectionName)" \
      --quiet
    
  6. Connect to the instance:

    The Cloud SQL Auth Proxy must be running to be able to connect to the instance. In a separate terminal, start the proxy using the connection name:

    ./cloud-sql-proxy INSTANCE_CONNECTION_NAME
    

    With the proxy running, connect using psql in another terminal:

    psql "host=127.0.0.1 port=5432 user=postgres dbname=DATABASE_NAME password=PASSWORD sslmode=disable"
    

Reference Directory

  • Core Concepts: Cloud SQL editions (Enterprise & Enterprise Plus), instance architecture, read pools, high availability (HA), and supported database engines.

  • CLI Usage: Essential gcloud sql commands for instance, database, and user management.

  • Client Libraries & Connectors: Connecting to Cloud SQL using Python, Java, Node.js, and Go.

  • MCP Usage: Using the Cloud SQL remote MCP server and Gemini CLI extension.

  • Infrastructure as Code: Terraform configuration for instances, databases, and users.

  • IAM & Security: Predefined roles, SSL/TLS certificates, and Auth Proxy configuration.

  • Disaster Recovery & Backups: Backup types, Point-in-Time Recovery (PITR), replicas, read pools comparison, and Enterprise Plus Advanced DR.

If you need product information not found in these references, use the Developer Knowledge MCP server search_documents tool.

Frequently asked questions about Cloud SQL Basics

Similar skills