This skill should be used when the user asks about Google Workspace automation via gogcli — Docs, Sheets, Slides, Drive, or Classroom. Triggers on phrases like "edit this Google doc", "update the sheet", "find my slides", "grade this assignment", or any request involving Google Workspace documents, files, or classes. This is an umbrella skill — the 5 sibling packages (gogcli-mcp-docs, gogcli-mcp-sheets, gogcli-mcp-slides, gogcli-mcp-drive, gogcli-mcp-classroom) cover specific APIs.
文档
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...
它能做什么
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...
技能文档
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: "you@gmail.com",
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 you@gmail.com --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 you@gmail.com --services sheets --force-consent
- Select the account for subsequent commands:
export GOG_ACCOUNT=you@gmail.com
Or pass --account you@gmail.com 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 --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
相关技能
通过托管 OAuth 调用 Google Docs API,实现文档创建、读写与样式管理。
Design Gmail, Drive, Sheets, and Calendar automations with scope-aware plans. Use for repeatable daily task automation with explicit OAuth scopes and audit-r...
通过 gws CLI 在终端驱动 Gmail、Drive、Calendar、Sheets、Docs 和 Admin SDK,统一以 JSON 输出。
Use this skill any time a .xlsx file is involved -- as input, output, or both. This includes: creating spreadsheets, financial models, dashboards, or trackers; reading, parsing, or extracting data from any .xlsx file; editing, modifying, or updating existing workbooks; working with formulas, charts,
通过托管 OAuth 代理访问 Google Calendar API,读写日程与事件。