← 返回 Skills 市场
2683
总下载
4
收藏
12
当前安装
1
版本数
在 OpenClaw 中安装
/install google-sheets-api
功能描述
OpenClaw skill that installs a Google Sheets CLI with setup steps and commands for read/write, batch, formatting, and sheet management.
使用说明 (SKILL.md)
Google Sheets API Skill (Advanced)
Purpose
Provide a production-ready Google Sheets CLI for OpenClaw. This skill supports data reads/writes, batch operations, formatting, and sheet management with service account authentication.
Best fit
- You need a repeatable CLI for automation tasks.
- You want JSON-in/JSON-out for pipelines.
- You need more than basic read/write (formatting, sheet ops, batch updates).
Not a fit
- You must use end-user OAuth consent flows (this skill is service-account focused).
- You only need lightweight, one-off edits.
One-time setup
- Create or select a Google Cloud project.
- Enable the Google Sheets API.
- Create a service account and download its JSON key.
- Share target spreadsheets with the service account email.
Install
cd google-sheet-api
npm install
Run
node scripts/sheets-cli.js help
node scripts/sheets-cli.js read \x3CspreadsheetId> "Sheet1!A1:C10"
node scripts/sheets-cli.js append \x3CspreadsheetId> "Sheet1!A:B" '@data.json'
You can also use npm:
npm run sheets -- read \x3CspreadsheetId> "Sheet1!A1:C10"
Credentials
Supported sources (first match wins):
GOOGLE_SHEETS_CREDENTIALS_JSON(inline JSON string)GOOGLE_SERVICE_ACCOUNT_KEY(file path)GOOGLE_SHEETS_KEY_FILE(file path)GOOGLE_APPLICATION_CREDENTIALS(file path)./service-account.json,./credentials.json,./google-service-account.json~/.config/google-sheets/credentials.json
Input conventions
- JSON values can be inline or loaded from file using
@path. - Write/append expect a 2D array of values.
Example data.json:
[["Name","Score"],["Alice",95]]
Command map (high level)
Data:
read,write,append,clear,batchGet,batchWrite
Formatting:
format,getFormat,borders,merge,unmerge,copyFormat
Layout:
resize,autoResize,freeze
Sheets:
create,info,addSheet,deleteSheet,renameSheet
Advanced:
batch(rawspreadsheets.batchUpdaterequests)
Operational guidance
- Prefer read-only scope for read workflows when possible.
- Add retry with exponential backoff for
429and transient5xxerrors. - Keep request payloads small to avoid limit issues.
Expected output
- JSON to stdout; non-zero exit code on errors.
Security notes
- Never log or commit service account keys.
- Share spreadsheets only with the service account email required by this skill.
安全使用建议
This skill appears to be a genuine Google Sheets CLI, but check a few things before installing: 1) Confirm which environment variable you will supply (the code and docs disagree slightly) and ensure you use a dedicated, least-privilege service account key (read-only scope for read tasks). 2) Don't place broad/owner credentials in project files or repos; keep the JSON key out of version control and prefer a limited-scope service account. 3) The package pulls googleapis from npm — run npm install in a controlled environment, verify package versions, and consider auditing node_modules or using integrity checks. 4) Because the CLI checks for credential files in the current directory and your home directory, be aware it may pick up any keys present there; remove or relocate keys you don't want the skill to access. 5) The code contains minor env-name inconsistencies (possible typo) — test credential loading locally before using in production. If you need higher assurance, run the CLI inside a restricted container or VM and review the full scripts/sheets-cli.js file yourself.
功能分析
Type: OpenClaw Skill
Name: google-sheets-api
Version: 1.0.3
The skill is classified as suspicious due to its implementation of credential discovery, which involves reading sensitive files from various locations, including `~/.config/google-sheets/credentials.json` (as seen in `scripts/sheets-cli.js`). While this file access is plausibly needed for the skill's stated purpose of authenticating to the Google Sheets API, it represents a high-risk capability. There is no clear evidence of intentional malicious behavior such as exfiltration of these credentials to unauthorized endpoints or other unrelated sensitive data, nor are there any prompt injection attempts in `SKILL.md` to mislead the agent into harmful actions. However, the broad file access for credentials, even if for a legitimate purpose, elevates it beyond benign.
能力评估
Purpose & Capability
The skill's name, description, SKILL.md, package.json, and scripts/sheets-cli.js all align: this is a CLI for the Google Sheets API (reads/writes, batch, formatting, sheet management) using the googleapis npm package and service-account credentials.
Instruction Scope
The runtime instructions are reasonable for the stated purpose (npm install; run node scripts/sheets-cli.js). The CLI will search for credentials in env vars and on-disk locations (cwd and the user's home config path) as expected for a service-account-driven tool. There is a small inconsistency between the documented env names and the code (the code checks GOOGLE_SHEETS_CREDENTIALS_JSON and also GOOGLE_SERVICE_ACCOUNT_JSON — the latter looks like a typo compared to env_example.md which uses GOOGLE_SERVICE_ACCOUNT_KEY). This mismatch could cause confusion or failure to load credentials.
Install Mechanism
There is no platform install spec, but package.json exists and SKILL.md instructs users to run npm install. That will pull the googleapis package from npm (expected). The lack of an explicit install entry in the registry metadata means install will be manual; verify npm network retrieval and consider pinning/checking package integrity before running.
Credentials
The skill legitimately needs Google service-account credentials, but the registry metadata lists no required env vars or primary credential while the SKILL.md and code expect credentials from multiple env vars or files. The code checks several on-disk locations (including ~/.config/google-sheets/credentials.json), which is reasonable but broad — the registry should have declared the credential requirement and the exact env names. Confirm which env var you will use and do not supply higher-privilege credentials than necessary.
Persistence & Privilege
The skill does not request always:true and does not appear to modify other skills or system-wide settings. It runs as a normal CLI and only uses the Google API client; autonomous invocation is the platform default but not a new privilege here.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install google-sheets-api - 安装完成后,直接呼叫该 Skill 的名称或使用
/google-sheets-api触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
- Improved documentation with detailed setup, install, and usage instructions for the Google Sheets CLI.
- Clarified features: supports read/write, batch, formatting, and sheet management using service account authentication.
- Added comprehensive credential loading order and input conventions.
- Expanded command list for data operations, formatting, sheet management, and advanced batch updates.
- Included security guidance and best practices for operational use.
元数据
常见问题
Google Sheets API 是什么?
OpenClaw skill that installs a Google Sheets CLI with setup steps and commands for read/write, batch, formatting, and sheet management. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2683 次。
如何安装 Google Sheets API?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install google-sheets-api」即可一键安装,无需额外配置。
Google Sheets API 是免费的吗?
是的,Google Sheets API 完全免费(开源免费),可自由下载、安装和使用。
Google Sheets API 支持哪些平台?
Google Sheets API 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Google Sheets API?
由 codedao12(@codedao12)开发并维护,当前版本 v1.0.3。
推荐 Skills