Google's official skill for driving the gcloud CLI safely from an agent: validate every command against its own help text, cap the output, and refuse the operations that should never run unattended.
Google Cloud Spanner BasicsSkill
Summary
Google's official Spanner skill: provision instances, design primary keys that do not hotspot, write SQL and client-library code, and diagnose slow queries — with DDL and DML gated behind your approval.
Features
- Warns against monotonic primary keys that create write hotspots
- Prefers interleaved tables for parent-child data accessed together
- Requires explicit user confirmation before any non-emulator DDL, DML or destructive operation
- Covers instance and database provisioning, schema evolution, queries and client-library code
- Performance diagnosis workflow for slow queries and index problems
- Generates DDL without blocking when database access or auth is unavailable
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Design a Spanner schema for orders and order line items, and explain why you chose that primary key.
Description
Cloud Spanner gives you global transactional consistency and synchronous replication, and charges for it in a currency most developers are not used to paying: schema design. Get the primary key wrong and the database scales horizontally into a single hot split. Google's official skill exists mostly to stop an agent from making that mistake on your behalf.
What it insists on
- Primary keys first. The skill actively warns against monotonically increasing or decreasing values — sequential timestamps, auto-increment IDs — as the leading component of a primary key, because in Spanner that concentrates every write on one server rather than spreading it.
- Interleaving where it earns its keep. For strongly related parent-child data that is read together, it prefers interleaved tables, which co-locate the rows.
- Confirmation before change. DDL and DML against any non-emulator database, and every destructive operation such as dropping a table or index, must be approved by you explicitly. The agent outputs the command —
gcloud spanner databases ddl updateand friends — and waits rather than running it.
What it covers
Provisioning instances and databases; schema evolution and DDL; writing queries and client-library code; and diagnosing performance problems, which in Spanner usually means tracing a slow query back to a key design or a missing index rather than to the query text.
There is a pragmatic touch worth noting: when database access is unavailable or authentication fails, the skill does not stall trying to confirm that an instance or table exists. It assumes the resources you named are real and generates the DDL, which is the right call for an agent that would otherwise spend its turn failing to authenticate.
Getting it
Part of Google's official agent-skills catalogue at github.com/google/skills, under Apache-2.0. Pairs naturally with the gcloud CLI skill from the same repository.
Related Skills
Convex's official top-level agent skill — routes an agent to the right convex-* skill for the task and to a served capability catalogue that stays current without a reinstall.
Official Shopify skill for theme development in Liquid — teaches an agent the modern theme architecture of sections, blocks and snippets, and validates generated templates and schemas.
Shopify's official skill for writing Admin GraphQL queries and mutations — it searches the live API docs and validates every operation against the schema before handing you code.