All skills
sanjay3290 avatar

/google-sheets

@eab1642

Read and write Google Sheets spreadsheets - get content, update cells, append rows, fetch specific ranges, search for spreadsheets, and view metadata. Use when user asks to: read a spreadsheet, update cells, add data to Google Sheets, find a spreadsheet, check sheet contents, export spreadsheet data, or get cell values. Lightweight integration with standalone OAuth authentication supporting full read/write access.

Use this Skill: https://skilld.dev/gh/sanjay3290/ai-skills/google-sheets

This session only. Nothing lands on disk.

README.md

≈791 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Google Sheets Skill

An AI agent skill for reading Google Sheets spreadsheets - get content, fetch specific ranges, search, and view metadata. Works with Claude Code, Gemini CLI, Cursor, OpenAI Codex, Goose, and other AI clients supporting the Agent Skills Standard.

Features

  • Read Spreadsheets - Get all content as text, CSV, or JSON
  • Get Ranges - Fetch specific cell ranges (A1 notation)
  • Search - Find spreadsheets by name
  • Metadata - View sheet names, dimensions, and properties

Read-only access. Lightweight alternative to the full Google Workspace MCP server.

⚠️ Requires Google Workspace account. Personal Gmail accounts are not supported.

Quick Start

1. Install dependencies

pip install keyring

2. Authenticate

python scripts/auth.py login

This opens a browser for Google OAuth. Tokens are stored securely in your system keyring.

3. Test connection

python scripts/auth.py status

Usage Examples

# Get spreadsheet content as plain text (default)
python scripts/sheets.py get-text SPREADSHEET_ID

# Get spreadsheet content as CSV
python scripts/sheets.py get-text SPREADSHEET_ID --format csv

# Get spreadsheet content as JSON
python scripts/sheets.py get-text SPREADSHEET_ID --format json

# Get values from a specific range (A1 notation)
python scripts/sheets.py get-range SPREADSHEET_ID "Sheet1!A1:D10"
python scripts/sheets.py get-range SPREADSHEET_ID "A1:C5"

# Find spreadsheets by search query
python scripts/sheets.py find "budget 2024"
python scripts/sheets.py find "sales report" --limit 5

# Get spreadsheet metadata (sheets, dimensions, etc.)
python scripts/sheets.py get-metadata SPREADSHEET_ID

Command Reference

Command Description Arguments
get-text <id> Get all content spreadsheet ID, --format
get-range <id> <range> Get specific cells spreadsheet ID, A1 range
find <query> Search spreadsheets search query, --limit
get-metadata <id> Get sheet info spreadsheet ID

Output Formats

Text (default)

Spreadsheet Title: Sales Data
Sheet Name: Q1
Name | Revenue | Units
Product A | 10000 | 50

CSV

Name,Revenue,Units
Product A,10000,50

JSON

{"Q1": [["Name", "Revenue", "Units"], ["Product A", "10000", "50"]]}

A1 Notation Examples

  • Sheet1!A1:B10 - Range A1 to B10 on Sheet1
  • Sheet1!A:A - All of column A
  • Sheet1!1:1 - All of row 1
  • A1:C5 - Range on first sheet

Token Management

Tokens stored securely using the system keyring:

  • macOS: Keychain
  • Windows: Windows Credential Locker
  • Linux: Secret Service API (GNOME Keyring, KDE Wallet)

Service name: google-sheets-skill-oauth

Troubleshooting

"Failed to get access token"

Run python scripts/auth.py login to authenticate.

"Spreadsheet not found"

Check the spreadsheet ID and your access permissions.

"Invalid range"

Verify the A1 notation format and that the sheet name exists.

License

Apache 2.0

Source: SKILL.md on GitHub

3 warnings16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill enables the agent to read and write Google Sheets data using OAuth authentication. It utilizes a custom cloud function for token management and securely stores credentials in the system keyring. The skill is susceptible to indirect prompt injection from untrusted spreadsheet content and communicates with an external service for authentication tasks.

  • Socket16d

    2 alerts: gptAnomaly

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    6/6 files flagged

Signed by skilld at eab1642. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 7 months ago
metadata
{
  "author": "sanjay3290",
  "version": "1.0"
}

README badge

README badge for sanjay3290/ai-skills/google-sheets