
Cloud Spanner Basics
Helps an agent design Spanner schemas, write queries and client code, and manage instances via gcloud.
- Repository
- google/skills
- Stars
- 21,782
- Licence
- Apache-2.0
- Files
- 11 files
What it does
Once installed, the agent knows Google Cloud Spanner's conventions: how to pick primary keys that avoid hotspots, when to use interleaved parent-child tables, how to write gcloud, client library, Terraform and PostgreSQL-dialect code, and how to look at SPANNER_SYS statistics to find slow queries. It is instructed to ask for your explicit approval before making any real database schema or data change, and to output the command rather than run it. Its reference files are guides, not executable tools.
Great for
- Developers designing or reviewing a Cloud Spanner schema
- Engineers diagnosing slow Spanner queries
- Teams writing Spanner client code or Terraform for Spanner instances
Skip it if
- Non-Spanner databases such as Cloud SQL, Postgres or MySQL, where the guidance does not apply
- Unattended automation that expects changes without confirmation, since the skill requires approval for DDL and DML
- Production work without review: the skill tells the agent to assume resources exist when it cannot verify them, which can yield DDL that fails or targets the wrong project
Try asking
- “Design a primary key for a multi-tenant orders table in Spanner that avoids hotspots”
- “Write a Python client library query to list the top CPU-heavy queries from the last hour”
- “Generate the gcloud command to add a secondary index to my Spanner database, for my approval”
- “Review my Terraform for a Spanner instance and suggest sizing and naming fixes”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 11 original files, the Apache-2.0 licence and an attribution note.
spanner-basics.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip spanner-basics.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip spanner-basics.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent your project, instance and database names and point it at your current DDL so it does not assume the schema.
- Keep the approval step: review every generated gcloud or DDL command before running it, especially DROP statements.
- Ask for the SPANNER_SYS query first when diagnosing performance, so the agent works from real statistics.
What's inside
- references/attribution.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
- SKILL.md
Redistributed unmodified from google/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.