用途:通过 gog 命令行操作 Google Sheets,覆盖读取、写入及表格结构管理。使用前应先阅读 ../gog/SKILL.md,了解共享的认证、输出、安全与写入规则。
主要能力:包含大量子命令,如 get(读取区域值)、update、append、clear、batch-update、create、copy、export(导出 pdf|xlsx|csv)、metadata、raw(无损导出 API JSON);结构操作包括 add-tab、delete-tab、duplicate-tab、rename-tab、reorder-tab、insert、delete-dimension、merge、unmerge、freeze、resize-rows、resize-columns;格式与规则包括 format、number-format、read-format、conditional-format、validation、banding、links、notes、update-note、named-ranges、table、chart、filter、find-replace、copy-paste、datasource、batch-request。
使用方式:先执行安全起步命令,例如 gog auth list --check --json --no-input、gog schema sheets --json,以及 gog --readonly --account user@example.com sheets get SHEET_ID 'Sheet1!A1:D20' --json --wrap-untrusted。始终用 --account 显式指定账号;用 --json --wrap-untrusted 获得适合智能体读取的 Google 内容;任务不得改动数据时用 --readonly;自动化中使用 --no-input,受支持的写入前用 --dry-run;任何写入或删除前须确认账号、对象和变更内容。batch-request 提交原子结构请求,需确认或 --force。具体参数用 gog sheets <command> --help,机器可读契约用 gog schema sheets <command> --json。
适用场景:需要以脚本或智能体方式批量读写表格、管理标签页、格式、验证规则和结构。
限制:需具备 gog 及相应 Google 账号和认证;写入类操作必须显式确认,结构请求可能需确认或 --force;具体权限范围、配额与错误处理细节暂未提供。