← 返回 Skills 市场
longmaba

Skill to manage and update google sheet

作者 longmaba · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
2938
总下载
1
收藏
9
当前安装
1
版本数
在 OpenClaw 中安装
/install google-sheet
功能描述
Read, write, append, and manage Google Sheets via the Google Sheets API (Node.js SDK). Use when you need to interact with spreadsheets — reading data, writing/updating cells, appending rows, clearing ranges, formatting cells, managing sheets. Requires a Google Cloud service account with Sheets API enabled.
使用说明 (SKILL.md)

Google Sheets Skill

Interact with Google Sheets using a service account.

Setup (One-time)

  1. Google Cloud Console:

    • Create/select a project
    • Enable "Google Sheets API"
    • Create a Service Account (IAM → Service Accounts → Create)
    • Download JSON key
  2. Configure credentials (one of these):

    • Set env: GOOGLE_SERVICE_ACCOUNT_KEY=/path/to/key.json
    • Place service-account.json or credentials.json in the skill directory
    • Place in ~/.config/google-sheets/credentials.json
  3. Share sheets with the service account email (found in JSON key as client_email)

  4. Install dependencies:

    cd skills/google-sheets && npm install
    

Usage

node scripts/sheets.js \x3Ccommand> [args]

Commands

Data Operations

Command Args Description
read \x3Cid> \x3Crange> Read cells
write \x3Cid> \x3Crange> \x3Cjson> Write data
append \x3Cid> \x3Crange> \x3Cjson> Append rows
clear \x3Cid> \x3Crange> Clear range

Formatting

Command Args Description
format \x3Cid> \x3Crange> \x3CformatJson> Format cells
getFormat \x3Cid> \x3Crange> Get cell formats
borders \x3Cid> \x3Crange> [styleJson] Add borders
copyFormat \x3Cid> \x3Csource> \x3Cdest> Copy format between ranges
merge \x3Cid> \x3Crange> Merge cells
unmerge \x3Cid> \x3Crange> Unmerge cells

Layout

Command Args Description
resize \x3Cid> \x3Csheet> \x3Ccols|rows> \x3Cstart> \x3Cend> \x3Cpx> Resize columns/rows
autoResize \x3Cid> \x3Csheet> \x3CstartCol> \x3CendCol> Auto-fit columns
freeze \x3Cid> \x3Csheet> [rows] [cols] Freeze rows/columns

Sheet Management

Command Args Description
create \x3Ctitle> Create spreadsheet
info \x3Cid> Get metadata
addSheet \x3Cid> \x3Ctitle> Add sheet tab
deleteSheet \x3Cid> \x3CsheetName> Delete sheet tab
renameSheet \x3Cid> \x3ColdName> \x3CnewName> Rename sheet tab

Examples

# Read data
node scripts/sheets.js read "SPREADSHEET_ID" "Sheet1!A1:C10"

# Write data
node scripts/sheets.js write "SPREADSHEET_ID" "Sheet1!A1:B2" '[["Name","Score"],["Alice",95]]'

# Format cells (yellow bg, bold)
node scripts/sheets.js format "SPREADSHEET_ID" "Sheet1!A1:B2" '{"backgroundColor":{"red":255,"green":255,"blue":0},"textFormat":{"bold":true}}'

# Copy format from one range to another
node scripts/sheets.js copyFormat "SPREADSHEET_ID" "Sheet1!A1:C3" "Sheet1!D1:F3"

# Add borders
node scripts/sheets.js borders "SPREADSHEET_ID" "Sheet1!A1:C3"

# Resize columns to 150px
node scripts/sheets.js resize "SPREADSHEET_ID" "Sheet1" cols A C 150

# Auto-fit column widths
node scripts/sheets.js autoResize "SPREADSHEET_ID" "Sheet1" A Z

# Freeze first row and column
node scripts/sheets.js freeze "SPREADSHEET_ID" "Sheet1" 1 1

# Add new sheet tab
node scripts/sheets.js addSheet "SPREADSHEET_ID" "NewSheet"

Format Options

{
  "backgroundColor": {"red": 255, "green": 255, "blue": 0},
  "textFormat": {
    "bold": true,
    "italic": false,
    "fontSize": 12,
    "foregroundColor": {"red": 0, "green": 0, "blue": 0}
  },
  "horizontalAlignment": "CENTER",
  "verticalAlignment": "MIDDLE",
  "wrapStrategy": "WRAP"
}

Border Style

{
  "style": "SOLID",
  "color": {"red": 0, "green": 0, "blue": 0}
}

Border styles: DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE

Finding Spreadsheet ID

From URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit

Troubleshooting

  • 403 Forbidden: Sheet not shared with service account email
  • 404 Not Found: Wrong spreadsheet ID or sheet name
安全使用建议
This skill appears to do what it says: it uses the official googleapis client to manage Google Sheets. However, the registry listing omitted the fact that the skill needs a Google service-account JSON key (private credentials) and did not name a primary environment variable — the SKILL.md and scripts do require that key. Before installing: 1) Confirm you trust the skill source (homepage is missing and owner ID is unknown). 2) Only provide a dedicated service-account key with the minimal Sheets scope (https://www.googleapis.com/auth/spreadsheets), not broad project permissions. 3) Prefer creating a short-lived or narrowly-scoped service account and rotate/revoke the key after use. 4) Run the skill in an isolated environment (container/VM) if possible. 5) Review scripts/sheets.js yourself (it was included and appears to only call Google APIs) and search for any network calls to non-Google endpoints (none found). If the registry metadata is updated to explicitly declare the required env var(s) and the skill author/publisher can be verified, this assessment would likely change to benign.
功能分析
Type: OpenClaw Skill Name: google-sheet Version: 1.0.0 The OpenClaw AgentSkills skill bundle for Google Sheets is classified as benign. The `SKILL.md` provides clear, functional instructions for interacting with Google Sheets and does not contain any prompt injection attempts against the agent. The `scripts/sheets.js` code implements the stated functionality using the official `googleapis` SDK. While it accesses local files and environment variables (`GOOGLE_SERVICE_ACCOUNT_KEY`, `GOOGLE_SHEETS_KEY_FILE`, `service-account.json`, `credentials.json` in various paths) for authentication, this is a necessary and expected behavior for a Google Cloud service account. There is no evidence of data exfiltration to unauthorized endpoints, malicious code execution, persistence mechanisms, or obfuscation. All network calls are directed to the legitimate Google Sheets API.
能力评估
Purpose & Capability
Name, description, SKILL.md, package.json and scripts/sheets.js consistently implement Google Sheets operations via the official googleapis Node.js client. The operations (read/write/format/manage) align with the stated purpose. Minor incoherence: the registry metadata lists no required environment variables or primary credential, while the skill clearly needs a Google service-account JSON key.
Instruction Scope
Runtime instructions in SKILL.md are explicit and scoped to Sheets usage: obtain a service account JSON key, share sheets with the service account email, run npm install and run node scripts/sheets.js <command>. The instructions and the script only reference credential files and paths (cwd and ~/.config/google-sheets) and do not attempt to read unrelated system files or call unexpected endpoints.
Install Mechanism
No remote download/install spec in registry (instruction-only). The repo includes package.json/package-lock.json and instructs to run npm install to fetch googleapis from the public npm registry — a standard, expected dependency for this functionality. No arbitrary URL downloads or archive extraction were found.
Credentials
The skill legitimately requires a Google service account key (private JSON) and checks multiple env var/file locations (GOOGLE_SERVICE_ACCOUNT_KEY, GOOGLE_SHEETS_KEY_FILE, ./service-account.json, ./credentials.json, ~/.config/google-sheets/credentials.json). However, the registry metadata does not declare any required env vars or a primary credential. That mismatch reduces transparency: installing the skill will require you to supply a sensitive JSON key even though the registry listing doesn't advertise it.
Persistence & Privilege
The skill does not request always: true, does not modify other skills or global agent settings, and does not persist credentials beyond normal usage (it reads a key file / env var at runtime). The default autonomous invocation setting is present but not combined with other red flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install google-sheet
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /google-sheet 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Google Sheets skill for Node.js. - Provides CLI commands to read, write, append, clear, and format data in Google Sheets via service account. - Includes commands for formatting cells, adding borders, resizing and auto-fitting columns/rows, freezing panes, and merging/unmerging cells. - Supports sheet management: create spreadsheets, add/delete/rename sheets, and fetch sheet metadata. - Offers setup instructions for Google Cloud credentials and sharing. - Example commands and JSON syntax for formatting and borders provided in documentation.
元数据
Slug google-sheet
版本 1.0.0
许可证
累计安装 11
当前安装数 9
历史版本数 1
常见问题

Skill to manage and update google sheet 是什么?

Read, write, append, and manage Google Sheets via the Google Sheets API (Node.js SDK). Use when you need to interact with spreadsheets — reading data, writing/updating cells, appending rows, clearing ranges, formatting cells, managing sheets. Requires a Google Cloud service account with Sheets API enabled. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2938 次。

如何安装 Skill to manage and update google sheet?

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

Skill to manage and update google sheet 是免费的吗?

是的,Skill to manage and update google sheet 完全免费(开源免费),可自由下载、安装和使用。

Skill to manage and update google sheet 支持哪些平台?

Skill to manage and update google sheet 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Skill to manage and update google sheet?

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

💬 留言讨论