spanner-data — скилл для Claude Code: что делает и как установить
Скилл для изучения структуры Google Cloud Spanner и запуска SQL-запросов. Помогает просматривать таблицы, графы и выполнять выборки данных.
npx skills add cline/skills --skill spanner-data -a claude-codeЧто делает spanner-data
Скилл даёт агенту доступ к базе Google Cloud Spanner через набор Node.js-скриптов. Внутри лежат инструменты для выборки данных (execute_sql_dql), внесения изменений (execute_sql), а также чтения схемы таблиц (list_tables) и графов (list_graphs). Запросы к базе принимаются на диалекте GoogleSQL.
Информация о таблицах и графах возвращается в формате JSON. Скрипты умеют отдавать как базовые списки имён (simple), так и полные описания колонок и индексов (detailed). Переменные окружения подтягиваются автоматически из файлов .env.
Для запуска обязательно требуется установленный Node.js, без которого скрипты не сработают. Если подключение к Spanner не настроено в окружении, агент сразу завершит команду с ошибкой.
Какие задачи решает
- получить структуру таблиц базы Spanner с типами колонок и индексами
- проверить граф связей между узлами и рёбрами
- выполнить DQL-выборку данных на диалекте GoogleSQL
- запустить DML-скрипт для обновления записей в базе
Примеры запросов агенту
- Покажи подробную схему таблицы
Usersиз базы Spanner - Выполни DQL-запрос
SELECT * FROM Orders LIMIT 10к Spanner - Выгрузи список пользовательских графов в формате simple
Как установить spanner-data
1Через Skills CLI (Vercel)
npx skills add cline/skills --skill spanner-data -a claude-code2Вручную: положить файлы
~/.claude/skills/spanner-data/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/spanner-data/
1Через Skills CLI (Vercel)
npx skills add cline/skills --skill spanner-data -a codex2Вручную: положить файлы
.agents/skills/spanner-data/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add cline/skills --skill spanner-data -a cursor2Вручную: положить файлы
.cursor/skills/spanner-data/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install cline/skills spanner-data2Вручную: положить файлы
.github/skills/spanner-data/SKILL.md1Через Skills CLI (Vercel)
npx skills add cline/skills --skill spanner-data -a gemini-cli2Командой платформы
gemini skills install https://github.com/cline/skills --path skills/spanner-dataВручную: положить файлы
.devin/skills/spanner-data/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add cline/skills --skill spanner-data -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о spanner-data
Как установить spanner-data в Claude Code?
Выполните команду npx skills add cline/skills --skill spanner-data -a claude-code. Описание скилла запишется в ~/.claude/skills/spanner-data/SKILL.md.
Что делает скилл spanner-data?
Он позволяет исследовать схему базы данных Spanner, выгружать описания таблиц и графов в JSON, а также выполнять запросы на чтение и запись.
Какой диалект SQL поддерживается в spanner-data?
Инструменты скилла рассчитаны на диалект GoogleSQL для Spanner, поэтому передаваемые запросы должны соответствовать этому синтаксису.
Исходный текст
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