cloud-sql-basics — скилл для Claude Code: установка
Скилл помогает создавать и объяснять Cloud SQL для MySQL, PostgreSQL и SQL Server. Пригодится при настройке базы в Google Cloud.
npx skills add google/skills --skill cloud-sql-basics -a claude-codeЧто делает cloud-sql-basics
cloud-sql-basics ориентирует агента по Cloud SQL: созданию инстанса и базы данных для MySQL, PostgreSQL или SQL Server. Он также описывает резервные копии, реплики, высокую доступность и защищённое подключение для реляционных баз данных.
Внутри есть пошаговый сценарий для PostgreSQL через gcloud: включение API, создание инстанса и базы, настройка пароля пользователя postgres, получение имени подключения и работа через Cloud SQL Auth Proxy. В справочных материалах есть команды CLI, подключения из Python, Java, Node.js и Go, Terraform, IAM, SSL/TLS, резервное копирование и MCP.
Для работы нужны права IAM с ролью roles/cloudsql.admin, а для примера подключения к PostgreSQL понадобятся Cloud SQL Auth Proxy и psql. Ставить стоит тем, кто управляет Cloud SQL из агента; для обычных локальных баз этот скилл лишний.
Какие задачи решает
- создать инстанс Cloud SQL для PostgreSQL
- настроить базу и пароль пользователя
postgres - получить имя подключения к инстансу
- подключиться к Cloud SQL через Auth Proxy
- найти команды для IAM, Terraform и резервных копий
Примеры запросов агенту
- Создай инстанс Cloud SQL для PostgreSQL и базу `DATABASE_NAME`.
- Включи API, настрой пользователя `postgres` и покажи команду подключения через `cloud-sql-proxy`.
- Объясни, как описать инстанс Cloud SQL и базу в Terraform.
Как установить cloud-sql-basics
1Через Skills CLI (Vercel)
npx skills add google/skills --skill cloud-sql-basics -a claude-code2Вручную: положить файлы
~/.claude/skills/cloud-sql-basics/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cloud-sql-basics/
1Через Skills CLI (Vercel)
npx skills add google/skills --skill cloud-sql-basics -a codex2Вручную: положить файлы
.agents/skills/cloud-sql-basics/SKILL.mdДля всех проектов — ~/.agents/skills/
Вручную: положить файлы
.cursor/skills/cloud-sql-basics/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install google/skills cloud-sql-basics2Вручную: положить файлы
.github/skills/cloud-sql-basics/SKILL.md1Через Skills CLI (Vercel)
npx skills add google/skills --skill cloud-sql-basics -a gemini-cli2Командой платформы
gemini skills install https://github.com/google/skills --path skills/cloud/cloud-sql-basicsВручную: положить файлы
.devin/skills/cloud-sql-basics/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Похожие
Вопросы о cloud-sql-basics
Как установить cloud-sql-basics в Claude Code?
Выполните npx skills add google/skills --skill cloud-sql-basics -a claude-code. Файл скилла появится в ~/.claude/skills/cloud-sql-basics/SKILL.md.
Что делает cloud-sql-basics?
Скилл помогает агенту создавать и объяснять ресурсы Cloud SQL для MySQL, PostgreSQL и SQL Server. Он подсказывает команды для инстансов, баз, пользователей и подключений.
Что нужно для работы с Cloud SQL через этот скилл?
Нужны права IAM с ролью roles/cloudsql.admin. Для подключения к примеру PostgreSQL также нужны Cloud SQL Auth Proxy и psql.
Исходный текст
SKILL.md · Apache-2.0
---
name: cloud-sql-basics
metadata:
version: "1.0.1"
category: Databases
description: >-
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.
---
# 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.
## 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:cloud-sql-basics)"`
and append `agent-skills/1.0 (skill:cloud-sql-basics)` to `User-Agent` headers.
## 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:**
```bash
gcloud services enable sqladmin.googleapis.com --quiet
```
2. **Create an Instance:**
```bash
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`:
```bash
gcloud sql users set-password postgres \
--instance=INSTANCE_NAME --password=PASSWORD \
--quiet
```
4. **Create a database:**
```bash
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:
```bash
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:
```bash
./cloud-sql-proxy INSTANCE_CONNECTION_NAME
```
With the proxy running, connect using `psql` in another terminal:
```bash
psql "host=127.0.0.1 port=5432 user=postgres dbname=DATABASE_NAME password=PASSWORD sslmode=disable"
```
## Reference Directory
- [Core Concepts](references/core-concepts.md): Cloud SQL editions (Enterprise
& Enterprise Plus), instance architecture, read pools, high availability (HA),
and supported database engines.
- [CLI Usage](references/cli-usage.md): Essential `gcloud sql` commands for
instance, database, and user management.
- [Client Libraries & Connectors](references/client-library-usage.md):
Connecting to Cloud SQL using Python, Java, Node.js, and Go.
- [MCP Usage](references/mcp-usage.md): Using the Cloud SQL remote MCP
server and Gemini CLI extension.
- [Infrastructure as Code](references/iac-usage.md): Terraform
configuration for instances, databases, and users.
- [IAM & Security](references/iam-security.md): Predefined roles, SSL/TLS
certificates, and Auth Proxy configuration.
- [Disaster Recovery & Backups](references/dr-backups.md): 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.*
© google · Apache-2.0 · google/skills