google-sheets by sanjay3290/ai-skills
npx skills add https://github.com/sanjay3290/ai-skills --skill google-sheets轻量级 Google Sheets 集成,具备独立的 OAuth 身份验证。无需 MCP 服务器。提供完整的读写权限。
需要 Google Workspace 账户。 不支持个人 Gmail 账户。
使用 Google 进行身份验证(会打开浏览器):
python scripts/auth.py login
检查身份验证状态:
python scripts/auth.py status
需要时登出:
python scripts/auth.py logout
所有操作均通过 scripts/sheets.py 进行。首次使用时若未登录,将自动进行身份验证。
# 以纯文本形式获取电子表格内容(默认)
python scripts/sheets.py get-text SPREADSHEET_ID
# 以 CSV 格式获取电子表格内容
python scripts/sheets.py get-text SPREADSHEET_ID --format csv
# 以 JSON 格式获取电子表格内容
python scripts/sheets.py get-text SPREADSHEET_ID --format json
# 获取特定范围的值(A1 表示法)
python scripts/sheets.py get-range SPREADSHEET_ID "Sheet1!A1:D10"
python scripts/sheets.py get-range SPREADSHEET_ID "A1:C5"
# 通过搜索查询查找电子表格
python scripts/sheets.py find "budget 2024"
python scripts/sheets.py find "sales report" --limit 5
# 获取电子表格元数据(工作表、维度等)
python scripts/sheets.py get-metadata SPREADSHEET_ID
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 使用值(JSON 二维数组)更新单元格范围
python scripts/sheets.py update-range SPREADSHEET_ID "Sheet1!A1:B2" '[["Hello","World"],["Foo","Bar"]]'
# 使用 RAW 输入更新(不解析公式,将所有内容视为字面文本)
python scripts/sheets.py update-range SPREADSHEET_ID "Sheet1!A1:B1" '[["=SUM(A1:A5)","text"]]' --raw
# 在最后一行数据之后追加行
python scripts/sheets.py append-rows SPREADSHEET_ID "Sheet1!A:Z" '[["New Row Col A","New Row Col B"]]'
# 清除范围内的值(保留格式)
python scripts/sheets.py clear-range SPREADSHEET_ID "Sheet1!A1:B10"
# 批量更新(高级功能 - 用于格式设置、合并等)
python scripts/sheets.py batch-update SPREADSHEET_ID '[{"updateCells":{"range":{"sheetId":0},"fields":"userEnteredValue"}}]'
您可以使用以下任意一种:
1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upmshttps://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit脚本会自动从 URL 中提取 ID。
人类可读格式,使用竖线分隔符:
Spreadsheet Title: Sales Data
Sheet Name: Q1
Name | Revenue | Units
Product A | 10000 | 50
Product B | 15000 | 75
标准 CSV 格式,适合进一步处理:
Name,Revenue,Units
Product A,10000,50
Product B,15000,75
结构化数据格式:
{
"Q1": [
["Name", "Revenue", "Units"],
["Product A", "10000", "50"]
]
}
Sheet1!A1:B10 - Sheet1 上 A1 到 B10 的范围Sheet1!A:A - Sheet1 上 A 列的全部Sheet1!1:1 - Sheet1 上第 1 行的全部A1:C5 - 第一个工作表上的范围--raw 标志):值完全按原样存储。不解析公式或数字格式。使用系统密钥环安全存储令牌:
服务名称:google-sheets-skill-oauth
令牌过期时会使用 Google 的云函数自动刷新。
每周安装数
101
代码仓库
GitHub 星标数
173
首次出现
2026年1月23日
安全审计
安装于
codex92
opencode91
gemini-cli91
cursor85
github-copilot83
claude-code82
Lightweight Google Sheets integration with standalone OAuth authentication. No MCP server required. Full read/write access.
Requires Google Workspace account. Personal Gmail accounts are not supported.
Authenticate with Google (opens browser):
python scripts/auth.py login
Check authentication status:
python scripts/auth.py status
Logout when needed:
python scripts/auth.py logout
All operations via scripts/sheets.py. Auto-authenticates on first use if not logged in.
# 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
# Update a range of cells with values (JSON 2D array)
python scripts/sheets.py update-range SPREADSHEET_ID "Sheet1!A1:B2" '[["Hello","World"],["Foo","Bar"]]'
# Update with RAW input (no formula parsing, treats everything as literal text)
python scripts/sheets.py update-range SPREADSHEET_ID "Sheet1!A1:B1" '[["=SUM(A1:A5)","text"]]' --raw
# Append rows after the last data row
python scripts/sheets.py append-rows SPREADSHEET_ID "Sheet1!A:Z" '[["New Row Col A","New Row Col B"]]'
# Clear values from a range (keeps formatting)
python scripts/sheets.py clear-range SPREADSHEET_ID "Sheet1!A1:B10"
# Batch update (advanced - for formatting, merging, etc.)
python scripts/sheets.py batch-update SPREADSHEET_ID '[{"updateCells":{"range":{"sheetId":0},"fields":"userEnteredValue"}}]'
You can use either:
1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upmshttps://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/editThe script automatically extracts the ID from URLs.
Human-readable format with pipe separators:
Spreadsheet Title: Sales Data
Sheet Name: Q1
Name | Revenue | Units
Product A | 10000 | 50
Product B | 15000 | 75
Standard CSV format, suitable for further processing:
Name,Revenue,Units
Product A,10000,50
Product B,15000,75
Structured data format:
{
"Q1": [
["Name", "Revenue", "Units"],
["Product A", "10000", "50"]
]
}
Sheet1!A1:B10 - Range A1 to B10 on Sheet1Sheet1!A:A - All of column A on Sheet1Sheet1!1:1 - All of row 1 on Sheet1A1:C5 - Range on the first sheet--raw flag): Values are stored exactly as provided. No parsing of formulas or number formatting.Tokens stored securely using the system keyring:
Service name: google-sheets-skill-oauth
Tokens automatically refresh when expired using Google's cloud function.
Weekly Installs
101
Repository
GitHub Stars
173
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykFail
Installed on
codex92
opencode91
gemini-cli91
cursor85
github-copilot83
claude-code82
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
40,000 周安装
Web Artifacts Builder:React + TypeScript + Vite 前端工件构建工具,一键打包为单HTML文件
329 周安装
YouTube字幕下载器 - 一键下载视频字幕/说明文字,支持yt-dlp与Whisper转录
326 周安装
AI会话交接技能:无缝延续工作流,创建结构化交接文档和提示
337 周安装
统计分析技能:假设检验、回归、贝叶斯分析与APA报告
328 周安装
SQLAlchemy Alembic 专家最佳实践与代码审查指南 - 生产级数据库迁移优化
334 周安装
React Three Fiber物理引擎教程 - r3f-physics(Rapier)快速入门与实战
332 周安装