Przejdź do treści
Biblioteka skilli
Dane i analityka · Budowanie i kod

spanner-basics

/spanner-basics

Pomaga tworzyć instancje i bazy Cloud Spanner w Google Cloud, projektować wydajne schematy i klucze główne, pisać zapytania SQL i kod klienta oraz diagnozować wydajność.

Repozytorium
skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
11
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Pomaga tworzyć instancje i bazy Cloud Spanner w Google Cloud, projektować wydajne schematy i klucze główne, pisać zapytania SQL i kod klienta oraz diagnozować wydajność.

Oryginalny opis (EN)

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.

Jak działa

  1. Attribution
  2. Core Principles
  3. Safety
  4. Common Workflows
  5. Reference Directory
Sekcje z nagłówków SKILL.md, w oryginale · 54 linii, 432 słów
Podgląd SKILL.md
---
name: spanner-basics
metadata:
  version: "1.1.2"
  category: Databases
description: >-
  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.
---

# 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](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: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

1.  Use `gcloud spanner databases ddl update` to apply schema updates (such as CREATE, ALTER, or DROP tables and indexes).
2.  Reference [schema-design.md](references/schema-design.md) for guidelines on primary key selection and interleaved tables.

### Diagnosing Performance Issues

1.  Use `SPANNER_SYS` tables to identify slow or resource-intensive queries.
2.  For example, query `SPANNER_SYS.QUERY_STATS_TOP_HOUR` to find queries with the highest CPU usage.

## Reference Directory

- [Core Concepts](references/core-concepts.md): Explanation of Spanner internals, architecture, and design.
- [CLI Usage](references/cli-usage.md): Essential `gcloud spanner` command-line operations for managing instances and databases.
- [IAM Security](references/iam-security.md): Roles, permissions, and data governance best practices for Spanner.
- [Client Library Usage](references/client-library-usage.md): Using Google Cloud client libraries for Spanner (Java, Go, Python, Node.js).
- [Terraform Usage](references/terraform-usage.md): Infrastructure as Code examples for provisioning Spanner instances and databases.
- [MCP Usage](references/mcp-usage.md): Using the Spanner remote MCP server.
- [PostgreSQL Dialect](references/postgresql-dialect.md): Best practices and examples for using the PostgreSQL interface in Spanner.
- [Queues Usage](references/queues-usage.md): Cloud Spanner Queues: mental model, design constraints, and links related to transactional message queues.
- [Schema Design](references/schema-design.md): 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.
Pliki w paczce (11)
  • SKILL.md 4 KB
  • references/attribution.md 2 KB
  • references/cli-usage.md 1 KB
  • references/client-library-usage.md 4 KB
  • references/core-concepts.md 1 KB
  • references/iam-security.md 1 KB
  • references/mcp-usage.md 2 KB
  • references/postgresql-dialect.md 1 KB
  • references/queues-usage.md 11 KB
  • references/schema-design.md 3 KB
  • references/terraform-usage.md 1 KB

Wersje

W bazie nie ma innych skilli o nazwie spanner-basics.

Migawka bazy z 28.10.2026 · wersja paczki 4197a9e2f91f (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100bigtable-basics
    Pomaga zakładać instancje i tabele Bigtable, projektować wydajne schematy i klucze wierszy, pisać zapytania SQL lub kod klienta (Java, Go, Python) oraz diagnozować problemy z wydajnością i hotspotami.
  • 100bigtable-basics
    Pomaga zakładać instancje i tabele Bigtable, projektować schematy i klucze wierszy, pisać zapytania SQL i kod klienta w Java, Go lub Python oraz diagnozować hotspoty.
  • 100bigtable-basics
    Pomaga zakładać instancje i tabele Bigtable, projektować schematy i klucze wierszy, pisać zapytania SQL i kod klienta w Java, Go lub Python oraz diagnozować hotspoty.
  • 100gcp-cloud-sql
    Tworzy bazy Cloud SQL i Spanner w Google Cloud z wysoką dostępnością, kopiami zapasowymi i zabezpieczeniami.
  • 100gcp-cloud-sql
    Tworzy bazy Cloud SQL i Spanner w Google Cloud z wysoką dostępnością, kopiami zapasowymi i zabezpieczeniami.
  • 90atlas-spanner
    Wyjaśnia specyfikę Atlas dla Google Cloud Spanner: dialekty, emulator, transakcje w plikach migracji i zmiany, których Spanner nie wykona na miejscu.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.