spanner-basics
하는 일
이 스킬은 전 세계적으로 일관성을 보장하는 Google 데이터베이스인 Cloud Spanner를 사용하도록 돕습니다. 여러 리전에 걸쳐 강한 일관성과 확장성이 필요한 팀을 위한 스킬입니다.
사용하는 경우
- ✓Cloud Spanner 인스턴스나 데이터베이스를 프로비저닝하고 싶을 때.
- ✓핫스팟을 피하는 기본 키나 스키마를 설계해야 할 때.
- ✓Spanner 쿼리나 클라이언트 코드가 느려서 원인을 진단해야 할 때.
스킬 링크
https://github.com/google/skills/blob/main/skills/cloud/spanner-basics/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“주문 앱을 위한 Cloud Spanner 스키마를 설계하고, 핫스팟을 만들 수 있는 기본 키가 있으면 경고해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
인스턴스와 데이터베이스를 설정하는 방법을 설명하고, 순차적으로 증가하는 기본 키처럼 핫스팟을 만들 수 있는 키를 경고합니다. 에뮬레이터가 아닌 데이터베이스를 바꾸기 전에는 승인을 요청합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Spanner Basics
This skill provides core workflows and guidance for administering and developing with Cloud Spanner on Google Cloud, a fully managed, mission-critical database service offering global transactional consistency and automatic, synchronous replication for high availability.
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:spanner-basics)"
and append agent-skills/1.0 (skill:spanner-basics) to User-Agent headers.
Core Principles
- Performance First: Spanner scales horizontally. Efficiency is tied to Primary Key design. Always warn against using monotonically increasing/decreasing values (like sequential timestamps) as the first part of a primary key to avoid hotspots.
- Schema Design: Prefer interleaved tables for strongly related parent-child data that is frequently accessed together.
Safety
[!CAUTION] CRITICAL INSTRUCTION: You MUST obtain explicit user confirmation before making any non-emulator database changes (DML or DDL) or destructive operations (such as dropping tables, indexes, or any other Spanner resources). Do not execute them automatically; instead, output the command (e.g.,
gcloud spanner databases ddl update) and ask for explicit user approval. When database access is unavailable or authentication fails, do not block on trying to verify the existence of the instance, database, or table. Assume the provided resources exist and directly generate the DDL commands.
Common Workflows
Schema Evolution & DDL
- Use
gcloud spanner databases ddl updateto apply schema updates (such as CREATE, ALTER, or DROP tables and indexes). - Reference schema-design.md for guidelines on primary key selection and interleaved tables.
Diagnosing Performance Issues
- Use
SPANNER_SYStables to identify slow or resource-intensive queries. - For example, query
SPANNER_SYS.QUERY_STATS_TOP_HOURto find queries with the highest CPU usage.
Reference Directory
- Core Concepts: Explanation of Spanner internals, architecture, and design.
- CLI Usage: Essential
gcloud spannercommand-line operations for managing instances and databases. - IAM Security: Roles, permissions, and data governance best practices for Spanner.
- Client Library Usage: Using Google Cloud client libraries for Spanner (Java, Go, Python, Node.js).
- Terraform Usage: Infrastructure as Code examples for provisioning Spanner instances and databases.
- MCP Usage: Using the Spanner remote MCP server.
- PostgreSQL Dialect: Best practices and examples for using the PostgreSQL interface in Spanner.
- Queues Usage: Cloud Spanner Queues: mental model, design constraints, and links related to transactional message queues.
- Schema Design: Guidelines on primary key selection and interleaved tables for performance.
If you need product information that's not found in these references, use the
search_documents tool of the Developer Knowledge MCP server.
자주 묻는 질문
실서비스 데이터베이스를 확인 없이 바꾸나요?
아닙니다. DML이나 DDL 변경, 파괴적인 작업 전에는 명시적인 확인이 필요합니다.
Spanner에서 핫스팟이란 무엇인가요?
많은 쓰기가 키 범위의 같은 부분에 몰리는 현상으로, 흔히 순차적인 기본 키 때문에 생깁니다.
부모-자식 테이블 구조를 지원하나요?
네. 강하게 연관되어 함께 자주 읽는 데이터에는 인터리브 테이블을 제안합니다.
상세 정보
작성자의 원본 설명
Assists in provisioning instances and databases, designing performant schemas, and querying data in Cloud Spanner on Google Cloud. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.
repo: google/skills
인기도
- GitHub 스타
- 22k
- 순위
- #10351
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
finding-google-skills
22k에이전트가 호스팅, 데이터베이스, 저장소, 로그인, AI 모델 제공처럼 설정 작업에 맞는 Google 가이드를 찾도록 돕습니다.
gcloud
22k에이전트가 Google Cloud gcloud 명령을 작성하고 확인하도록 돕습니다. 플래그를 추측하지 않도록 무엇이든 실행하기 전에 정확한 문법을 확인합니다.
google-cloud-recipe-auth
22k에이전트가 Google Cloud의 신원과 접근 권한을 안내합니다. 사람과 서비스가 어떻게 로그인하고 어떤 권한을 받는지 포함합니다.
google-cloud-recipe-onboarding
22k새 개발자가 Google Cloud에서 프로젝트 선택, 결제 연결, 첫 리소스 배포 같은 첫 단계를 밟도록 안내합니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.