Skip to main content
skill CX Codex

spanner-data — Claude Code skill: what it does, how to install

Inspects Google Cloud Spanner schemas and executes custom SQL queries. Useful when an agent needs direct access to database tables and graph definitions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cline/skills --skill spanner-data -a claude-code
Open on GitHub

What spanner-data does

The skill equips coding assistants with Node.js scripts for interacting with Google Cloud Spanner. It supplies dedicated tools to run DQL read queries (execute_sql_dql) and apply DML modifications (execute_sql). Both tools expect the GoogleSQL dialect.

Schema exploration tools inspect user-created objects and return raw JSON. list_tables extracts columns and index details. list_graphs inspects graph structures, including node and edge table definitions. Output switches between minimal name lists and exhaustive property maps.

Without a local Node.js runtime, the scripts cannot execute. If Spanner credentials are not defined in the environment, query calls fail immediately.

What it helps with

  • inspect Spanner table schemas, columns, and indexes as JSON
  • discover graph schema objects such as node and edge tables
  • run GoogleSQL DQL queries to inspect database records
  • apply DML mutations to Spanner tables

Example prompts for the agent

  • Inspect the detailed schema for table Orders in Spanner
  • Run this DQL query on Spanner: SELECT id, status FROM Accounts LIMIT 5
  • List all custom graph schemas in the current Spanner database

How to install spanner-data

1Skills CLI (Vercel)

npx skills add cline/skills --skill spanner-data -a claude-code

2Manually: put the files in place

~/.claude/skills/spanner-data/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/spanner-data/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about spanner-data

How to install spanner-data in Claude Code?

Run npx skills add cline/skills --skill spanner-data -a claude-code. The skill file will be placed in ~/.claude/skills/spanner-data/SKILL.md.

What does the spanner-data skill do?

It provides scripts to inspect database schemas, export table and graph metadata in JSON format, and run GoogleSQL commands.

What prerequisites are required for spanner-data?

The tools require Node.js on the host system and valid Spanner environment variables, which are loaded automatically from .env files.

Source text

SKILL.md · Apache-2.0
---
name: spanner-data
description: Use these skills when you need to explore the database structure, discover schema objects like tables and graphs, and execute custom SQL queries to interact with your data.
---

## Usage

All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values.

**Bash:**
`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'`

**PowerShell:**
`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'`

Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.


## Scripts


### execute_sql

Use this tool to execute DML SQL. Please use the googlesql interface for Spanner.

#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| sql | string | The sql to execute. | Yes |  |


---

### execute_sql_dql

Use this tool to execute DQL SQL. Please use the googlesql interface for Spanner.

#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| sql | string | The sql to execute. | Yes |  |


---

### list_graphs

Lists detailed graph schema information (node tables, edge tables, labels and property declarations) as JSON for user-created graphs. Filters by a comma-separated list of graph names. If names are omitted, lists all graphs. The output can be 'simple' (graph names only) or 'detailed' (full schema).

#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| graph_names | string | Optional: A comma-separated list of graph names. If empty, details for all graphs in user-accessible schemas will be listed. | No | `` |
| output_format | string | Optional: Use 'simple' to return graph names only or use 'detailed' to return the full information schema. | No | `detailed` |


---

### list_tables

Lists detailed schema information (object type, columns, constraints, indexes) as JSON for user-created tables (ordinary or partitioned). Filters by a comma-separated list of names. If names are omitted, lists all tables in user schemas. The output can be 'simple' (table names only) or 'detailed' (full schema).

#### Parameters

| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| table_names | string | Optional: A comma-separated list of table names. If empty, details for all tables in user-accessible schemas will be listed. | No | `` |
| output_format | string | Optional: Use 'simple' to return table names only or use 'detailed' to return the full information schema. | No | `detailed` |


---

© cline · Apache-2.0 · cline/skills

Similar skills

All skills for Data and databases →

From the same set29

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor