Read, update, and format Google Sheets spreadsheets via API. Use when users need to (1) Read cell data from spreadsheets, (2) Update cell values, (3) Append rows to sheets, (4) Format cells (background color, borders, text style), (5) Create pivot tables, or (6) Export data to JSON/CSV format.
View on GitHubFebruary 4, 2026
Select agents to install to:
npx add-skill https://github.com/treenod-IDQ/treenod-market/blob/main/plugins/util/skills/sheet/SKILL.md -a claude-code --skill sheetInstallation paths:
.claude/skills/sheet/# Google Sheets API Skill
Read and update Google Sheets spreadsheets using Python scripts and uv package manager.
## Prerequisites
### 1. Install gcloud CLI
설치 가이드: https://cloud.google.com/sdk/docs/install-sdk
```bash
# Linux (Debian/Ubuntu)
sudo apt-get install apt-transport-https ca-certificates gnupg curl
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get update && sudo apt-get install google-cloud-cli
# macOS
brew install google-cloud-sdk
# Windows
# https://cloud.google.com/sdk/docs/install-sdk 에서 설치 파일 다운로드
```
### 2. Authentication Setup (one-time)
```bash
# gcloud 초기화 (최초 1회)
gcloud init
# ADC 로그인
gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/spreadsheets
# quota project 설정 (팀 공용 프로젝트)
gcloud auth application-default set-quota-project data-470906
```
Credential 파일 위치:
- Linux/macOS: `~/.config/gcloud/application_default_credentials.json`
- Windows: `%APPDATA%\gcloud\application_default_credentials.json`
### Execution Pattern
```bash
uv run --no-project --with google-auth --with google-api-python-client python scripts/sheet_api.py [command] [args]
```
## Available Commands
### Get Spreadsheet Info
```bash
uv run --no-project --with google-auth --with google-api-python-client \
python scripts/sheet_api.py info <spreadsheet_id_or_url>
```
### Read Range
```bash
# Table format (default)
uv run --no-project --with google-auth --with google-api-python-client \
python scripts/sheet_api.py read <spreadsheet> <range>
# JSON format
uv run --no-project --with google-auth --with google-api-python-client \
python scripts/sheet_api.py read <spreadsheet> <range> --format json -o output.json
# CSV format
uv run