Official agent skill

Spanner Basics

by google in google/skills

Assists in provisioning instances and databases, designing performant schemas, and querying data in Spanner.

OfficialApache-2.0Auto-check passedDatabases

Install Spanner Basics

skills CLI
$ npx skills add google/skills --skill spanner-basics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills spanner-basics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/spanner-basics .claude/skills/spanner-basics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spanner-basics
GitHub stars
21k
Token cost
~855 tokens
SKILL.md length
364 words
Files
10 (incl. references)
Skills in repo
145
Repo updated
First seen
Licence
Apache-2.0

At a glance

Assists in provisioning instances and databases, designing performant schemas, and querying data in Spanner.

  • Works in 2 steps: Use gcloud spanner databases ddl update… → Reference schema-design.md for…
  • Designing primary keys
  • SKILL.md covers Core Principles, Safety, Common Workflows and Reference Directory
  • Calls gcloud

What it does

Spanner Basics is an agent skill from google/skills, published by the product's own GitHub organization. Assists in provisioning instances and databases, designing performant schemas, and querying data in Spanner. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/cli-usage.md`, `references/client-library-usage.md` and `references/core-concepts.md`).

It sits in Databases, covering SQL. It works with SQL and Google Cloud. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Designing primary keys
  • Writing SQL queries
  • Client library code
  • Diagnosing performance issues

Example prompts

  • “Use the spanner-basics skill to assist in provisioning instances and databases, designing performant schemas, and querying data in Spanner”
  • “/spanner-basics”

Requirements

  • Node.js

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  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 for guidelines on primary key selection and interleaved tables.

What it can do on your machine

Read from SKILL.md and the folder at commit 8a1ac05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gcloud, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spanner Basics loads about 855 tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 364 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~855
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 8a1ac05, republished under its Apache-2.0 licence (© google). 364 words, ~855 tokens.

Download SKILL.mdSave it as .claude/skills/spanner-basics/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
spanner-basics
description
Assists in provisioning instances and databases, designing performant schemas, and querying data in Spanner. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.
metadata.version
1.1.0
metadata.category
Databases

Spanner Basics

This skill provides core workflows and guidance for administering and developing with Google Cloud Spanner, a fully managed, mission-critical database service offering global transactional consistency and automatic, synchronous replication for high availability.

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 for guidelines on primary key selection and interleaved tables.
Show full SKILL.md (156 more words)Show less
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: Explanation of Spanner internals, architecture, and design.
  • CLI Usage: Essential gcloud spanner command-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.

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills/cloud/spanner-basics of google/skills.

  • SKILL.md
  • references/cli-usage.md
  • references/client-library-usage.md
  • references/core-concepts.md
  • references/iam-security.md
  • references/mcp-usage.md
  • references/postgresql-dialect.md
  • references/queues-usage.md
  • references/schema-design.md
  • references/terraform-usage.md

Open the folder on GitHubat commit 8a1ac05

Compare with similar skills

Spanner Basics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spanner Basics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spanner Basics this skillgoogle/skills21k—~855Automated safety check: PassApache-2.0
Cxas Configurable DashboardsGoogleCloudPlatform/cxas-scrapi106—~1.8kAutomated safety check: PassApache-2.0
GCP Cloud SQLsickn33/agentic-awesome-skills47k2 repos~2.4kAutomated safety check: PassMIT
Imaging Data CommonsK-Dense-AI/scientific-agent-skills48k1 repos~7.8kAutomated safety check: PassMIT
Cloud SQL Basicsdavila7/claude-code-templates32k—~810Automated safety check: PassMIT
Firebaseericrisco/rsc-harness156—~3.3kAutomated safety check: PassMIT

Similar skills

  • Cxas Configurable Dashboards

    GoogleCloudPlatform/cxas-scrapi

    Author, validate, and manage Contact Center AI (CCAI) Insights Configurable Dashboards.

    106 GitHub stars~1.8k tokensUpdated today
    DatabasesAuto-check passed
  • GCP Cloud SQL

    sickn33/agentic-awesome-skills

    Provision Cloud SQL and Spanner databases. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.4k tokens
    DatabasesAuto-check passed
  • Imaging Data Commons

    K-Dense-AI/scientific-agent-skills

    Queries and downloads public cancer imaging data from NCI Imaging Data Commons.

    48k GitHub starsUsed in 1 repo~7.8k tokens
    DatabasesAuto-check passed
  • Cloud SQL Basics

    davila7/claude-code-templates

    Creates and manages Cloud SQL instances for MySQL, PostgreSQL, and SQL Server.

    32k GitHub stars~810 tokensUpdated today
    DatabasesAuto-check passed
  • Firebase

    ericrisco/rsc-harness

    A skill your agent uses when building on Firebase — Firestore data modeling, Security Rules, Auth and custom claims, Cloud Functions, Storage, modular Web/Admin SDK imports — including symptoms like…

    156 GitHub stars~3.3k tokensUpdated today
    DatabasesAuto-check passed
  • Smt E2E Dataflow Debugging

    GoogleCloudPlatform/DataflowTemplates

    Debugs logical errors and data discrepancies in Dataflow templates by launching jobs via Terraform and comparing source (e.g.

    1.3k GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed

More from google/skills

All 145 skills in this repo
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5.1k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Official

    Analyzes BigQuery slot use, query costs and execution bottlenecks from INFORMATION_SCHEMA to diagnose slow queries, slot contention and unpartitioned scans.

    21k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Spanner Basics

What does Spanner Basics do?

Assists in provisioning instances and databases, designing performant schemas, and querying data in Spanner. Spanner Basics is an agent skill from google/skills, published by the product's own GitHub organization. Assists in provisioning instances and databases, designing performant schemas, and querying data in Spanner.

When should I use Spanner Basics?

Spanner Basics fits situations like: designing primary keys; writing SQL queries; client library code; diagnosing performance issues.

How do I install Spanner Basics in Claude Code?

Run `npx skills add google/skills --skill spanner-basics -a claude-code`. Or copy the skill folder (skills/cloud/spanner-basics in google/skills) into .claude/skills/spanner-basics in your project. Claude Code loads it when a task matches its description.

How do I install Spanner Basics in Codex?

Run `npx skills add google/skills --skill spanner-basics -a codex`. Or copy the skill folder (skills/cloud/spanner-basics in google/skills) into .agents/skills/spanner-basics in your project. Codex loads it when a task matches its description.

Can I use Spanner Basics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill spanner-basics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spanner-basics, .gemini/skills/spanner-basics, .github/skills/spanner-basics and .opencode/skills/spanner-basics in your project.

What does Spanner Basics need to run?

Going by SKILL.md and its folder, Spanner Basics needs the command-line tools its instructions call (gcloud). Our summary lists: Node.js.

Does Spanner Basics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spanner Basics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spanner Basics use?

Spanner Basics is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spanner Basics use?

About 855 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.3k tokens, read only when the agent opens those files.

What are the alternatives to Spanner Basics?

Skills that share tags, products or a category with Spanner Basics: Cxas Configurable Dashboards (GoogleCloudPlatform/cxas-scrapi, 106 stars), GCP Cloud SQL (sickn33/agentic-awesome-skills, 47k stars), Imaging Data Commons (K-Dense-AI/scientific-agent-skills, 48k stars) and Cloud SQL Basics (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spanner Basics?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 20,994 GitHub stars. The repository holds 145 skills in this directory. The repository was last updated on October 6, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.