用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ma08/botfiles --skill gws-shared命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when the user asks to commit, clean, audit, reconcile, push, pull, or coordinate dirty personal_os changes across the VM and Mac checkouts, especially when live task-specific sessions may own folders, orphaned artifacts need curated commits, or divergent main histories must be synchronized safely.
Use when the user asks to commit, clean, audit, reconcile, push, pull, or coordinate dirty personal_os changes across the VM and Mac checkouts, especially when live task-specific sessions may own folders, orphaned artifacts need curated commits, or divergent main histories must be synchronized safely.
Safely inventory, reconcile, clean, and synchronize divergent botfiles Git checkouts and layered Codex configuration across the canonical cloud host and client machines. Use for dirty Mac/VM botfiles trees, ahead/behind main histories, machine-local Codex runtime state, generated agent artifacts, or branch-to-main integration and verification.
正在显示 SKILL.md
| name | gws-shared |
| description | gws CLI: Shared patterns for authentication, global flags, and output formatting. |
| metadata | {"openclaw":{"category":"productivity","requires":{"bins":"[Truncated]"}}} |
The gws binary must be on $PATH. On this machine, ~/pro/botfiles/bin/gws is the preferred wrapper because it can locate the installed CLI even when the NVM bin path is missing.
# Browser-based OAuth (interactive) for the current session
gws auth login --readonly --services drive,gmail
# Exact scopes for Gmail/Drive read access plus Gmail draft creation.
# gmail.compose also technically permits sending.
gws auth login --scopes https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.compose
# Save the refreshed login into a named account alias
gws-save-account work
For Calendar access or any Calendar write, use gws-calendar-safe. Before a
human reauthorization, run gws-calendar-safe auth-plan --account <alias> so
the exact existing non-Calendar scopes are preserved and the Calendar portion
is replaced with only calendar.events plus calendar.calendarlist.readonly.
Prefer named aliases over bare gws whenever mailbox or Drive ownership matters:
gws-account work gmail +triage --max 5 --format json
gws-account personal drive files list --params '{"pageSize": 5, "q": "trashed=false"}' --format json
Saved aliases live under ~/.config/gws/accounts/ and currently map to:
work -> sourya4@trymyzone.compersonal -> sourya4@gmail.comcolumbia -> sk5057@columbia.edu| Flag | Description |
|---|---|
--format <FORMAT> | Output format: json (default), table, yaml, csv |
--dry-run | Validate locally without calling the API |
--sanitize <TEMPLATE> | Screen responses through Model Armor |
gws <service> <resource> [sub-resource] <method> [flags]
| Flag | Description |
|---|---|
--params '{"key": "val"}' | URL/query parameters |
--json '{"key": "val"}' | Request body |
-o, --output <PATH> | Save binary responses to file |
--upload <PATH> | Upload file content (multipart) |
--page-all | Auto-paginate (NDJSON output) |
--page-limit <N> | Max pages when using --page-all (default: 10) |
--page-delay <MS> | Delay between pages in ms (default: 100) |
gmail.compose also grants send capability.gws-calendar-safe; do not use raw Calendar mutation commands.auth-plan output first.--dry-run for destructive operations--sanitize for PII/content safety screening! expansion: Sheet ranges like Sheet1!A1 contain ! which zsh interprets as history expansion. Use double quotes with escaped inner quotes instead of single quotes:
# WRONG (zsh will mangle the !)
gws sheets +read --spreadsheet ID --range 'Sheet1!A1:D10'
# CORRECT
gws sheets +read --spreadsheet ID --range "Sheet1!A1:D10"
--params and --json values in single quotes so the shell does not interpret the inner double quotes:
gws drive files list --params '{"pageSize": 5}'
q expressions often need single quotes inside the query itself. In that case, wrap the whole JSON blob in double quotes and escape the inner JSON quotes:
gws-account personal drive files list --params "{\"pageSize\": 5, \"q\": \"name contains 'tax' and trashed=false\"}"
https://github.com/googleworkspace/clihttps://github.com/googleworkspace/cli/issues