← 返回 Skills 市场
codedao12

Google Sheet API

作者 codedao12 · GitHub ↗ · v1.0.1
cross-platform ✓ 安全检测通过
2083
总下载
3
收藏
5
当前安装
2
版本数
在 OpenClaw 中安装
/install google-sheet-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

  1. Create or select a Google Cloud project.
  2. Enable the Google Sheets API.
  3. Create a service account and download its JSON key.
  4. 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 (raw spreadsheets.batchUpdate requests)

Operational guidance

  • Prefer read-only scope for read workflows when possible.
  • Add retry with exponential backoff for 429 and transient 5xx errors.
  • 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 legitimate Google Sheets CLI that requires a Google service account key. Before installing: (1) Only provide a service-account JSON you control and never commit it to source control; (2) be aware the CLI will look for credential files in the current directory and in ~/.config, so run it in a controlled folder or set the explicit env var (e.g., GOOGLE_SERVICE_ACCOUNT_KEY or GOOGLE_SHEETS_CREDENTIALS_JSON) to the intended path/inline JSON; (3) review scripts/sheets-cli.js yourself if you want to confirm it doesn't contact any non-Google endpoints; (4) run npm install in an environment where pulling googleapis from npm is acceptable. The main issues are a small metadata/documentation mismatch about required env vars and a minor env-var name inconsistency — these are not indicators of malicious behavior but you should confirm which credential the CLI will actually use on your system.
功能分析
Type: OpenClaw Skill Name: google-sheet-api Version: 1.0.1 The OpenClaw skill provides a Google Sheets CLI, which is clearly documented and implemented using the official `googleapis` library. Credential handling is robust, supporting standard environment variables and file paths (including `~/.config/google-sheets/credentials.json`), which is necessary for its functionality. There is no evidence of data exfiltration, malicious execution, persistence, obfuscation, or prompt injection attempts against the agent in any of the analyzed files (SKILL.md, scripts/sheets-cli.js, package.json, etc.). All behaviors align with the stated purpose of managing Google Sheets.
能力评估
Purpose & Capability
Name, description, SKILL.md, package.json, and scripts/sheets-cli.js all implement a Google Sheets CLI (read/write/batch/format/sheet management) and the requested dependencies (googleapis) are appropriate.
Instruction Scope
Runtime instructions are focused on installing and running the CLI and on providing service-account credentials; they do not instruct the agent to collect unrelated system data or post to unexpected endpoints.
Install Mechanism
There is no registry install spec; SKILL.md directs users to run npm install which pulls a standard dependency (googleapis) from npm — expected for a Node CLI.
Credentials
The skill legitimately requires Google service-account credentials (multiple env var and file-path options are documented). Registry metadata lists no required env vars, which is a minor mismatch with the SKILL.md and runtime behavior. The tool searches common local paths (including the user home path), so it may pick up credentials from the working directory or ~/.config automatically — this is convenient but could result in using an unexpected key if multiple credentials exist. There is a small inconsistency in an env var name in code (GOOGLE_SERVICE_ACCOUNT_JSON) that isn't documented in SKILL.md.
Persistence & Privilege
The skill is not always-enabled, does not request elevated platform privileges, and does not modify other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install google-sheet-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /google-sheet-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added detailed documentation for Google Sheets CLI skill, including setup, installation, and usage instructions. - Clarified service account authentication and credential sourcing order. - Listed all supported commands and operational guidelines for production use. - Provided security best practices for managing credentials and access. - Outlined JSON-based input/output conventions for seamless automation and pipelines.
v1.0.0
Initial release of the Google Sheets API Skill for OpenClaw: - Adds a full-featured CLI for Google Sheets supporting read/write, batch operations, formatting, and sheet management. - Uses service account authentication with flexible credential sourcing. - Commands accept JSON input; outputs JSON to stdout for easy pipeline integration. - Includes setup instructions, example commands, and operational/security guidance. - Command map covers data, formatting, layout, sheet ops, and advanced batch updates.
元数据
Slug google-sheet-api
版本 1.0.1
许可证
累计安装 5
当前安装数 5
历史版本数 2
常见问题

Google Sheet 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 插件,目前累计下载 2083 次。

如何安装 Google Sheet API?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install google-sheet-api」即可一键安装,无需额外配置。

Google Sheet API 是免费的吗?

是的,Google Sheet API 完全免费(开源免费),可自由下载、安装和使用。

Google Sheet API 支持哪些平台?

Google Sheet API 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Google Sheet API?

由 codedao12(@codedao12)开发并维护,当前版本 v1.0.1。

💬 留言讨论