Google Sheets via gog
/install google-sheets-gog
Google Sheets via gog
Use this skill to operate on Google Sheets through the local gog CLI instead of a hosted API bridge. It is intended for spreadsheet CRUD work on the user's own Google account with local OAuth.
Prerequisites
gogmust be installed locally.- OpenClaw only loads this skill when
skills.entries.gogSheets.config.loginandskills.entries.gogSheets.config.passwordare both set. - The user must have a Google Cloud Desktop OAuth client JSON.
- The Google Sheets API must be enabled in that Google Cloud project.
- The agent should prefer the exact spreadsheet ID, tab name, and A1 range before running commands.
OpenClaw Config
Use gogSheets as the OpenClaw config key:
{
skills: {
entries: {
gogSheets: {
enabled: true,
config: {
login: "[email protected]",
password: "app-specific-or-local-secret"
}
}
}
}
}
login and password are load-time gating requirements for OpenClaw. They make the skill eligible to load, but the sheet operations below still use local gog OAuth unless you later add separate automation around those config values.
If you do not want to store raw secrets directly in config, prefer using skills.entries.gogSheets.env or apiKey alongside this config and keep prompts free of secrets.
Setup
- Store the OAuth client credentials:
gog auth credentials ~/Downloads/client_secret_....json
- Authorize the account for Sheets:
gog auth add [email protected] --services sheets
- If Sheets access is being added later to an existing account and Google does not return a refresh token, re-run with consent forced:
gog auth add [email protected] --services sheets --force-consent
- Select the account for subsequent commands:
export [email protected]
Or pass --account [email protected] on each command.
Working Rules
- Prefer
--jsonfor reads when the result will be parsed or summarized. - Prefer precise spreadsheet IDs over titles.
- Prefer exact A1 ranges such as
Sheet1!A1:D20. - If a subcommand or flag is uncertain, inspect help with
gog sheets --helporgog \x3Csubcommand> --helpbefore executing. - Keep commands scoped to Sheets by default. If sandboxing is needed, use
GOG_ENABLE_COMMANDS=sheets. - Remember that OpenClaw gating checks
gogon the host at skill load time; sandboxed runs also needgoginstalled inside the container. - For read-only inspection sessions, prefer re-auth with
--readonlyinstead of assuming write scopes are acceptable.
Safety Policy
Before any destructive or broad write, explicitly state:
- target spreadsheet ID
- target tab or named range
- exact range or object being changed
- operation being performed
Ask for confirmation before:
clearon any rangefind-replaceacross a whole spreadsheet or large tab- deleting tabs
- deleting named ranges
- broad formatting, merge, unmerge, resize, or freeze changes
- insert operations that shift existing rows or columns
- overwriting a large existing range with
update
Direct reads and narrowly scoped appends or cell updates can proceed without a separate confirmation when the user request is already explicit.
Common Tasks
Read spreadsheet data
- Inspect metadata for spreadsheet structure.
- Read a specific A1 range.
- Read a named range when the spreadsheet already defines one.
- Use JSON output when the data will be transformed or summarized.
See references/gog-sheets.md for command patterns.
Create and extend spreadsheets
- Create a new spreadsheet with one or more tabs.
- Add a new tab to an existing spreadsheet.
- Rename a tab when requested.
Update and append data
- Use
updatefor direct cell or range replacement. - Use
appendfor new rows. - If the sheet relies on data validation, preserve it with
--copy-validation-fromwhen appropriate.
Organize structure
- Manage named ranges when the user refers to stable data blocks by name.
- Insert rows or columns only after checking whether data shifting is intended.
- Use formatting commands only when formatting itself is part of the task.
Failure Handling
- If auth fails, verify credentials were stored with
gog auth credentialsand inspect account state withgog auth status. - If a command fails due to insufficient scopes, re-auth with the needed service and
--force-consent. - If the spreadsheet target is ambiguous, stop and resolve the spreadsheet ID before mutating anything.
- If the requested operation may require broader Google access than Sheets alone, inspect
goghelp first rather than guessing.
References
- Command examples: references/gog-sheets.md
- Upstream docs: https://github.com/steipete/gogcli/blob/main/README.md
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install google-sheets-gog - 安装完成后,直接呼叫该 Skill 的名称或使用
/google-sheets-gog触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Google Sheets via gog 是什么?
Use this skill when you need to create, inspect, update, append to, or reorganize Google Sheets from a locally installed `gog` CLI. It is for local Google ac... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 226 次。
如何安装 Google Sheets via gog?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install google-sheets-gog」即可一键安装,无需额外配置。
Google Sheets via gog 是免费的吗?
是的,Google Sheets via gog 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Google Sheets via gog 支持哪些平台?
Google Sheets via gog 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Google Sheets via gog?
由 Ivan Kochergin(@kvarts)开发并维护,当前版本 v1.1.0。