
Cloud SQL Basics
FreeManage Cloud SQL instances effortlessly.
Free · Opens the source repo
What Cloud SQL Basics does
Cloud SQL Basics is a skill designed for developers and system administrators who need to create and manage relational database instances on Google Cloud. This skill simplifies the process of working with MySQL, PostgreSQL, and SQL Server databases by automating essential tasks such as instance creation, backups, and ensuring high availability. With Cloud SQL, users can focus on building applications without worrying about the underlying database management complexities.
The skill provides a comprehensive set of commands to get started with Cloud SQL quickly. Users can enable the necessary APIs, create instances with specified configurations, set passwords for default users, and create databases—all through straightforward command-line instructions. This makes it particularly useful for those who prefer working in a terminal environment and need a reliable way to manage their database resources.
In addition to the core functionalities, the skill includes reference materials that cover various aspects of Cloud SQL. Users can access information on instance architecture, high availability, and supported database engines, as well as essential CLI commands for managing databases and users. The references also provide guidance on connecting to Cloud SQL using different programming languages, Infrastructure as Code practices, and security configurations, ensuring that users have all the information they need at their fingertips.
Cloud SQL Basics is ideal for teams looking to streamline their database management processes in a cloud environment. Whether you are deploying applications that require robust database solutions or managing existing databases, this skill offers the tools necessary to enhance your workflow and maintain high-performance database operations.
When to use it
Use this skill when you need to quickly create and manage Cloud SQL instances for applications requiring relational databases.
When not to use it
This skill may not be suitable for non-Google Cloud environments or for users needing advanced database optimization features not covered in the basic commands.
What you can build with it
Quick Database Setup
Easily create a new Cloud SQL instance for PostgreSQL in just a few command-line steps.
Automated Backups
Leverage Cloud SQL's automated backup features to ensure your data is always safe without manual effort.
Secure Connectivity
Use the Cloud SQL Auth Proxy to securely connect to your database instances from local or cloud environments.
How to install Cloud SQL Basics
View source1. Install with the skills CLI
npx skills add davila7/claude-code-templates/cloud-sql-basics --agent claude-code2. 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 davila7Cloud 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)
-
Enable the API:
gcloud services enable sqladmin.googleapis.com --quiet -
Create an Instance:
gcloud sql instances create INSTANCE_NAME \ --database-version=POSTGRES_18 \ --cpu=2 \ --memory=7680MiB \ --region=REGION \ --quiet -
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 -
Create a database:
gcloud sql databases create DATABASE_NAME \ --instance=INSTANCE_NAME \ --quiet -
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 -
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_NAMEWith the proxy running, connect using
psqlin another terminal:psql "host=127.0.0.1 port=5432 user=postgres dbname=DATABASE_NAME password=PASSWORD sslmode=disable"
Reference Directory
-
Core Concepts: Instance architecture, high availability (HA), and supported database engines.
-
CLI Usage: Essential
gcloud sqlcommands 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.
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
ClickHouse Logs Queries
Efficiently manage Supabase logs with ClickHouse SQL.
EF Core D2 Database Diagram Generator
Visualize your EF Core models as D2 diagrams effortlessly.
Safe SQL Execution
Ensure secure SQL execution in Supabase applications.
Oracle to PostgreSQL Migration
Identify migration risks between Oracle and PostgreSQL.
SSMA Console
Streamline Oracle to SQL Server migrations with ease.
SQL Performance Optimization
Enhance SQL query efficiency across all databases.
