Skip to content
Back to skills

Gsheet

ASecurity

Read and write Google Sheets data including specific sheets and ranges. Auto-triggers when user shares a Google Sheets URL (docs.google.com/spreadsheets). Supports listing sheets, reading/writing cells, inserting rows, batch updates, and outputting as markdown tables.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 14, 2026
ai-agentspythongobashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 14, 2026

npx -y skills add smorrel1/claude-code-skills --skill gsheet --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gsheet?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gsheet
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/smorrel1-gsheet/badge)](https://www.skillsdirectory.com/skills/smorrel1-gsheet)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gsheet
description: Read and write Google Sheets data including specific sheets and ranges. Auto-triggers when user shares a Google Sheets URL (docs.google.com/spreadsheets). Supports listing sheets, reading/writing cells, inserting rows, batch updates, and outputting as markdown tables.
---

# Google Sheets Reader/Writer

Read and write Google Sheets data using Python with OAuth credentials.

## Usage

```bash
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py <url-or-id> [options]
```

## Read Options

| Option | Description |
|--------|-------------|
| `--sheet, -s` | Sheet name (default: first sheet) |
| `--range, -r` | Cell range like `A1:D10` or row range like `1:5` |
| `--list-sheets, -l` | List all sheet names in the spreadsheet |
| `--format, -f` | Output format: `markdown` (default), `json`, or `csv` |
| `--rows N` | Limit output to first N data rows |
| `--find VALUE` | Find row containing VALUE |
| `--find-col COL` | Column to search in (default: A) |

## Write Options

| Option | Description |
|--------|-------------|
| `--edit CELL` | Cell to edit (e.g., 'A1', 'B5') |
| `--value VALUE` | Value to write (use with --edit) |
| `--insert-row N` | Insert new row after row N |
| `--append` | Append new row at end of sheet |
| `--row-values "a,b,c"` | Comma-separated values for new row |
| `--batch-edit JSON` | Batch update cells with JSON array |

## Examples

### Reading

```bash
# List all sheets
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit" --list-sheets

# Read first 10 rows of a specific sheet
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" --sheet "Sheet1" --rows 10

# Read a specific range
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" --sheet "Sheet1" --range "A1:E20"

# Find a row containing a value
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" --sheet "Contacts" --find "john@example.com" --find-col D

# Output as JSON
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" --format json
```

### Writing

```bash
# Edit a single cell
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" -s "Sheet1" --edit "B5" --value "Updated value"

# Insert a new row after row 10 with values
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" -s "Sheet1" --insert-row 10 --row-values "Col1,Col2,Col3,Col4"

# Append a row at the end
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" -s "Sheet1" --append --row-values "New,Row,Data"

# Batch update multiple cells at once
python3 ~/.claude/skills/gsheet/scripts/read_gsheet.py "SPREADSHEET_ID" -s "Sheet1" --batch-edit '[{"cell":"A1","value":"Hello"},{"cell":"B1","value":"World"}]'
```

## Notes

- Uses OAuth credentials from `~/.claude/skills/gmail/credentials.json`
- First run will prompt for Google Sheets API authorization in browser
- Credentials are cached in `~/.claude/skills/gmail/gsheet_token.json`
- Full read/write access via `spreadsheets` scope

Files in this skill

  • SKILL.md3 KB
  • scripts/read_gsheet.py18.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.