gsheets

gsheets is a skill for Claude Code from shaharsha/claude-skills. It costs 156 tokens per session (4,002 once invoked), scanned A, original, MIT.

A command-line tool for working with Google Sheets, Google's online spreadsheets. It can manage cell data, worksheet tabs, formatting, filters, sorting, and row or column layout.

In plain words
What is it for?
Use it to read or update cells, create or manage tabs, format headers, freeze rows or columns, resize columns, filter data, sort ranges, and add basic conditional formatting.
Why use it?
It removes repetitive manual spreadsheet editing and lets scripts apply the same data and formatting changes consistently.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the documents-and-decks plugin — 7 skills shipped together , and of shaharsha-skills

Good fit Use it to read or update cells, create or manage tabs, format headers, freeze rows or columns, resize columns, filter data, sort ranges, and add basic conditional formatting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shaharsha/claude-skills/gsheets
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shaharsha/claude-skills --skill gsheets
Clone the repo
git clone --depth 1 https://github.com/shaharsha/claude-skills

Made for: Claude Code.

Or install documents-and-decks, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gsheets

README.md
[![agentmods](https://agentmods.dev/badge/skills/shaharsha/claude-skills/gsheets/github.svg)](https://agentmods.dev/skills/shaharsha/claude-skills/gsheets)
Your own site
<a href="https://agentmods.dev/skills/shaharsha/claude-skills/gsheets"><img src="https://agentmods.dev/badge/skills/shaharsha/claude-skills/gsheets/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gsheets

Your own site · 80×15
<a href="https://agentmods.dev/skills/shaharsha/claude-skills/gsheets"><img src="https://agentmods.dev/badge/skills/shaharsha/claude-skills/gsheets.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 156 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00156 $0.04002
Opus 5 $0.00078 $0.02001
Sonnet 5 $0.00031 $0.00800
Haiku 4.5 $0.00016 $0.00400

Measured 10d ago against content hash 684e60ca3600, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gsheets scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/gsheets.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Python 3.9+** (stdlib only for HTTP via `urllib.request`)
skills/gsheets/SKILL.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gsheets

A single-file Python CLI (scripts/gsheets.py) over the Google Sheets API v4 covering data, tabs, structure, styling, filters/sort, and a raw-batchUpdate escape hatch. Sibling of gdoc-sync — same auth model, same retry semantics, different surface.

The script has one external dep beyond Python stdlib: pip install google-auth for service-account auth (recommended). Without it you can still use gcloud ADC, or install cryptography and the script will mint JWTs itself.

Quick start

# One-time: share the target Sheet with your service account as Editor.
# Then:
scripts/gsheets.py info <SPREADSHEET_ID> --sa-key ~/sa.json
scripts/gsheets.py write <SPREADSHEET_ID> --range "Sheet1!A1" \
  --values-json '[["name","status"],["alpha","ok"],["beta","fail"]]' \
  --sa-key ~/sa.json
scripts/gsheets.py format-header <SPREADSHEET_ID> --tab Sheet1 \
  --bg "#1a73e8" --fg "#ffffff" --filter \
  --sa-key ~/sa.json

SPREADSHEET_ID is the long token in the URL: https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/edit.

Skip --sa-key to fall back to gcloud auth application-default print-access-token (needs prior gcloud auth application-default login --scopes=...spreadsheets,...drive). Service-account auth is more reliable — see reference/auth-setup.md.

Conceptual model

A Google Sheets file is a spreadsheet. It contains one or more sheets (aka tabs or worksheets). Each sheet is a grid of cells. Three IDs / names matter:

Identifier Where from Used by
spreadsheetId URL: /spreadsheets/d/<ID>/edit Every subcommand (first positional arg)
sheet title (e.g. "Sheet1", "Review") What you see on the tab strip A1-notation ranges ("Review!A1:C10"); --tab flag
sheetId (integer) list-tabs output The raw batchUpdate API — but the CLI resolves titles for you, so you rarely need it directly

A1 notation vs GridRange: the values.* endpoints (read/write/append/clear) take A1 strings. Everything else (formatting, structure, filters) takes a numeric GridRange — but the CLI lets you pass A1 + --tab and translates it internally.

Read the full file on GitHub · 272 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 272 lines · 156 tokens per session scan A 684e60ca3600

Subscribe to this mod's changes

gsheets is a skill published in the GitHub repository shaharsha/claude-skills (5 stars, last pushed 13d ago), licensed MIT. It adds 156 tokens to every session and 4,002 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.