No slash command · from duckdb-gdrive
Reads and writes Google Sheets by tab and A1 range using the gdrive DuckDB extension. Supports typed reads (dates, booleans, formulas) and in-place writes via COPY with OVERWRITE/APPEND.
Ships in duckdb-gdrive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
New in v2026.11.13 (not in v2026.11.08 or earlier).
read_csv on a Sheet exports its first tab as text. For any tab, a range,
typed columns, or writing into a Sheet, use the Sheets-API surface:
SELECT * FROM read_sheet_range('gdrive://Finance/sales', 'Actuals!A1:F'); -- A..F, to the last row
SELECT * FROM read_sheet_range('gdrive://Finance/sales', 'Actuals'); -- whole tab
SELECT * FROM read_sheet_range('https://docs.google.com/spreadsheets/d/<id>/edit', '''Q3 plan''!B2:D20', header := false);
COPY forecast TO 'gdrive://Finance/sales' (FORMAT sheet_range, RANGE 'Forecast!A1', OVERWRITE);
COPY new_rows TO 'gdrive://id:<id>' (FORMAT sheet_range, RANGE 'Log!A1', APPEND);
COPY summary TO 'gdrive://Finance/2026/q3-summary' (FORMAT sheet_range, RANGE 'Summary!A1'); -- creates it
Paths: gdrive://… (scheme optional for read_sheet_range), gdrive://id:<id>, or the
browser address. An existing target must be a native Google Sheet (a CSV/xlsx in Drive is
refused, never replaced).
gdrive:// path that names nothing gets a new native Sheet (missing folders too);
its one tab is renamed to the RANGE's tab, written in the same atomic request. OVERWRITE /
APPEND into a new Sheet = a block at the anchor, header included. CREATE false opts out
("no such Sheet"); CREATE takes only true/false.gdrive://id: and browser addresses never create: they must name an existing Sheet..csv .tsv .parquet .json .jsonl .ndjson .xlsx .xls .txt (any case) are refused
for creation — "Drop the extension for a Sheet, or use FORMAT csv / FORMAT parquet". An
existing Sheet with such a name is written into.files_create, one sheets_update, no sheets_get. duckdb-sharepoint's
excel_range does not create workbooks.Tab!A1:F200, Tab!A1:F (open rows), Tab!A:F, Tab!2:5, bare Tab, Tab!B2 (a cell /
the write anchor). Quote a tab with spaces or quotes: 'Q3 plan'!A1, 'It''s'!A1 — inside a
SQL string literal double the quotes: '''Q3 plan''!A1'. A1:B2 with no tab is an error.
header := false (column1, column2, …); empty / duplicate
headers become columnN / name_2. all_varchar := true reads text.read_excel_range: numbers → BIGINT/DOUBLE, date/time
formatted cells → DATE/TIMESTAMP/TIME, booleans → BOOLEAN, mixed → VARCHAR; an error cell
(#DIV/0!) is NULL in a typed column. Formulas read as their results. Trailing empty rows
are dropped. One spreadsheets.get per call (sheets_get in gdrive_stats()).| option | effect |
|---|---|
RANGE 'Tab!A1' | required. Anchor = top-left cell; missing tab is created. Explicit bounds ('Tab!A1:F') must hold the block. |
HEADER true|false | column names as first row (default true) |
| (none) | write the block from the anchor; nothing else cleared — a shorter result leaves old rows below |
OVERWRITE | clear values from the anchor down/right (to the tab edge, or the explicit bounds), then write |
APPEND | values.append below the data at the anchor; header only for a new tab or explicit HEADER true |
'=1+1' stays text (RAW),
NULL = empty cell, DECIMAL/HUGEINT → DOUBLE. LIST/STRUCT/MAP columns are refused — use
to_json(col) or array_to_string(col, ',').batchUpdate (new tab + grid growth + clear + cells).
Larger writes are split and not atomic: on failure the error says "partially written",
re-run with OVERWRITE. Rows are buffered until the query finishes, so a failing query
writes nothing and the Sheet is never trashed.OVERWRITE and APPEND exclude each other;
USE_TMP_FILE is refused. Plain COPY … (FORMAT csv) onto a Sheet stays refused.insufficient OAuth scope … sheet_range: writing needs DRIVE_SCOPE 'https://www.googleapis.com/auth/drive'; drive.readonly reads but cannot write.… is not enabled in the Google Cloud project …: run the printed
gcloud services enable sheets.googleapis.com --project <project>.has no tab 'X': check the tab name (case and spaces matter).no such Sheet on a COPY: an id:/address of nothing, or CREATE false.appeared while the COPY ran: something took the name between the check and the create;
re-run to write into it if it is a Sheet.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub datazoode/duckdb-gdrive --plugin duckdb-gdrive4 skills in this plugin
/gdrive-filesFiles in Google Drive with the gdrive DuckDB extension: the gdrive:// filesystem (paths relative to the secret's root, the id: form, globs with * ? [a-z] ** {a,b}, duplicate-name errors), browser addresses pasted as paths (drive.google.com/file/d/..., docs.google.com/spreadsheets/d/..., folders), reading Parquet/CSV/JSON/anything through it, native Google Sheets and Docs (exported as CSV / text), COPY TO (streamed, appears on close), write_blob / remove_file / move_file / file_size, ATTACH of a .duckdb file (read-only), DuckLake with DATA_PATH on Drive, and the concurrency limits (no atomic create: concurrent writers duplicate). Use when reading or writing files in Google Drive from SQL, querying a Sheet, putting a lakehouse on Drive, or when the user pastes a Drive or Sheets link.
/gdrive-metadataGoogle Drive's metadata as tables with the gdrive DuckDB extension: read_gdrive_files (files under a path, glob or folder with owner, last modifier, size, md5, web_url, revision, custom properties, lock), search_gdrive (Drive's full-text search; hits read back by id), gdrive_drives (Shared Drives and their ids), gdrive_versions and the ?version= path form (read an earlier revision with any reader), gdrive_changes (what changed under a folder since a token -- the mirror / incremental-sync pattern), and gdrive_permissions (who can reach what: direct, inherited, anyone-with-link, domain). Use when listing or inventorying Drive, finding a file, reading an old version, syncing a folder incrementally, or auditing sharing.
/gdrive-setupInstalling and authenticating the gdrive DuckDB extension: INSTALL/LOAD, CREATE SECRET (TYPE gdrive) with PROVIDER credential_chain (the default: gcloud Application Default Credentials, GOOGLE_APPLICATION_CREDENTIALS, a service-account key, or a workload identity federation external_account file), service_account (KEY_FILE), authorization_code (browser consent with your own OAuth client), config (ACCESS_TOKEN / REFRESH_TOKEN); DRIVE_ID (a Shared Drive) vs ROOT_FOLDER_ID (a folder), gdrive_drives() to find the id, DRIVE_SCOPE (never SCOPE); the gcloud --scopes trap, the Workspace "This app is blocked" page, why a service account can write only inside a Shared Drive; settings and gdrive_stats(). Use when connecting DuckDB to Google Drive, writing a CREATE SECRET, or fixing a 401/403 or "no secret configured" error.
Other plugins' skills for the same job