Gws
kv0906/pm-kit
This skill should be used when the user asks to "set up gws", "install Google Workspace CLI", "connect Gmail to Claude", "manage Google Drive from terminal", "send email from CLI", "check my…
Google Workspace CLI. An agent skill from LeoYeAI/openclaw-master-skills.
$ npx skills add LeoYeAI/openclaw-master-skills --skill gws -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills gws --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gws-google-workspace .claude/skills/gws && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "gws" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspace into .claude/skills/gws/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gws", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspaceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill gws -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills gws --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/gws-google-workspace .agents/skills/gws && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "gws" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspace into .agents/skills/gws/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gws", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill gws -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills gws --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/gws-google-workspace .cursor/skills/gws && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "gws" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspace into .cursor/skills/gws/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gws", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/gws-google-workspace--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill gws -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills gws --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/gws-google-workspace .gemini/skills/gws && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "gws" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspace into .gemini/skills/gws/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gws", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills gwsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill gws -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/gws-google-workspace .github/skills/gws && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "gws" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspace into .github/skills/gws/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gws", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill gws -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills gws --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/gws-google-workspace .opencode/skills/gws && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "gws" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/gws-google-workspace into .opencode/skills/gws/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "gws", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
gwsGoogle Workspace CLI. An agent skill from LeoYeAI/openclaw-master-skills.
Gws is an agent skill from LeoYeAI/openclaw-master-skills. Google Workspace CLI. Use when the user mentions Gmail, Google Drive, Calendar, Sheets, Docs, Tasks, People, Slides, Forms, Meet, Classroom, sending email, checking inbox, managing files, reading/writing spreadsheets, viewing schedules, standup reports, or any Google Workspace operation — even if they don't explicitly say 'gws'.
Its SKILL.md is about 4.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `_meta.json`).
It sits in Documents & Office, covering Cloud office suites and Email management. It works with Google Workspace, Gmail, Google Drive and Google Cloud. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
jqnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comconsole.cloud.google.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Gws loads about 4.9k tokens when it runs. Until then it costs about 84 tokens; SKILL.md has 411 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 411 words, ~4,890 tokens.
.claude/skills/gws/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Google's official Workspace CLI (@googleworkspace/cli). One tool for Gmail, Drive, Calendar, Sheets, Docs, Tasks, People, Slides, Forms, Meet, Classroom, and more.
GitHub: https://github.com/googleworkspace/cli
Each session, set these before using gws:
export GOOGLE_WORKSPACE_PROJECT_ID=<your-project-id>
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=~/.config/gws/credentials.json
export GOOGLE_WORKSPACE_CLI_KEYRING_BACKEND=fileFirst-time setup and authorization: see Prerequisites below.
npm install -g @googleworkspace/cli前往 Google Cloud Console → APIs & Services → Library,启用以下 API:
| 服务 | API 名称 |
|---|---|
| Gmail | Gmail API |
| Drive | Google Drive API |
| Calendar | Google Calendar API |
| Sheets | Google Sheets API |
| Docs | Google Docs API |
| Tasks | Tasks API |
| People | People API |
| Slides | Google Slides API |
| Forms | Forms API |
| Meet | Google Meet API |
| Classroom | Google Classroom API |
大部分 API 在 gws auth login 时会自动关联,但 Sheets/Docs/Slides 等可能需要手动启用后才能调用。
重要:启用 API 和 OAuth scope 是两回事。 API 启用决定"能不能调这个服务",OAuth scope 决定"能做什么操作",两者都需要。
gws 是无头 CLI,授权流程需要用户在浏览器中完成:
gws auth login凭证保存在 GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE 指定的路径。gws auth login -s <service> 支持分批授权特定服务,不会覆盖已有 scope。
如果遇到 insufficient authentication scopes 错误,重新运行 gws auth login 并勾选缺少的权限。
insufficient authentication scopes → 见 Prerequisites > Scope 说明,重新授权并勾选缺少的权限File not found → 检查是否使用了绝对路径,改用相对路径(见 Usage Philosophy)files update 重命名(见 Known API Quirks)gws schema <api.method> 查询任意 API 的完整参数结构Gmail 是最常用的服务,支持完整的邮件 CRUD、搜索、标签、附件、线程、批量操作和设置管理。
每次 gws 调用有 ~2-3s 启动延迟,批量操作优先(batchModify 每批 ≤100 条)。逐条 get 邮件可用 & 并行 + wait 加速。
Gmail 搜索语法通过 q 参数传递,功能强大:newer_than:1d、is:starred、is:unread、from:xxx、subject:keyword、label:xxx、has:attachment、after:YYYY/MM/DD、before:YYYY/MM/DD、category:primary(primary/promotions/social/updates/forums)等。
gws gmail users messages list --params '{"userId":"me","q":"is:unread","maxResults":20}'
gws gmail users messages list --params '{"userId":"me","q":"is:unread"}' --page-allmessages list 仅返回 ID,需逐条 get。只需要摘要用 format=metadata(更快省 token),需要正文用 format=full。
注意:API 返回的 header 顺序不固定(按内部存储顺序,非请求顺序),必须按 header name 匹配,不能按数组 index 取值。
邮件正文 parts 结构不固定——有些是单层 .payload.parts[],有些是嵌套 .payload.parts[].parts[],两种写法都要准备好。
# 提取 headers(按 name 匹配,不要按 index)
gws gmail users messages get --params '{"userId":"me","id":"MSG_ID","format":"metadata","metadataHeaders":["From","Subject","Date"]}'
# → jq '.payload.headers | map({(.name): .value}) | add'
# 纯文本正文(先试单层,为空再试嵌套)
gws gmail users messages get --params '{"userId":"me","id":"MSG_ID","format":"full"}' | jq -r '.payload.parts[] | select(.mimeType == "text/plain") | .body.data' | base64 -d
# 嵌套备选: jq -r '.payload.parts[].parts[]? | select(.mimeType == "text/plain") | .body.data' | base64 -d
# 快速预览(无需 base64,但有长度限制)
gws gmail users messages get --params '{"userId":"me","id":"MSG_ID","format":"metadata"}' | jq -r '.snippet'利用 & 后台并行将 N×3s 降到 ~3s:
IDS=$(gws gmail users messages list --params '{"userId":"me","q":"is:unread","maxResults":10}' 2>/dev/null | jq -r '.messages[].id')
for id in $IDS; do
gws gmail users messages get --params "{\"userId\":\"me\",\"id\":\"$id\",\"format\":\"metadata\",\"metadataHeaders\":[\"From\",\"Subject\",\"Date\"]}" 2>/dev/null | jq -r '.payload.headers | map({(.name): .value}) | add | "\(.From[:30]) | \(.Subject) — \(.Date)"' &
done; waitbatchModify 一次处理最多 100 条,避免逐条循环的延迟开销:
IDS=$(gws gmail users messages list --params '{"userId":"me","q":"is:unread","maxResults":100}' 2>/dev/null | jq -c '[.messages[].id]')
gws gmail users messages batchModify --params '{"userId":"me"}' --json "{\"ids\":$IDS,\"removeLabelIds\":[\"UNREAD\"]}"
gws gmail users messages batchModify --params '{"userId":"me"}' --json "{\"ids\":$IDS,\"addLabelIds\":[\"STARRED\"]}"构造 RFC 2822 格式邮件,Base64 编码后发送:
# 纯文本
RAW=$(printf "To: recipient@example.com\r\nSubject: Hello\r\nFrom: me@gmail.com\r\nContent-Type: text/plain; charset=utf-8\r\n\r\nBody text here" | base64 -w0)
gws gmail users messages send --json "{\"raw\":\"$RAW\"}" --params '{"userId":"me"}'
# HTML(改 Content-Type 为 text/html)
RAW=$(printf "To: recipient@example.com\r\nSubject: Hello\r\nFrom: me@gmail.com\r\nContent-Type: text/html; charset=utf-8\r\n\r\n<h1>Title</h1><p>Body</p>" | base64 -w0)
gws gmail users messages send --json "{\"raw\":\"$RAW\"}" --params '{"userId":"me"}'先从 format=full 响应中提取 attachmentId,再用 attachments get 下载(同样受相对路径限制):
# 1. 获取附件列表
gws gmail users messages get --params '{"userId":"me","id":"MSG_ID","format":"full"}' | jq '[.payload.parts[] | select(.filename != "") | {filename, body: .body.attachmentId}]'
# 2. 下载(cd 到目标目录)
cd /path/to/target/dir
gws gmail users messages attachments get --params '{"userId":"me","messageId":"MSG_ID","id":"ATTACHMENT_ID"}' --output filename.pdf按对话线程查看邮件,避免重复同一封邮件的多个副本:
gws gmail users threads list --params '{"userId":"me","q":"is:unread","maxResults":10}'
gws gmail users threads get --params '{"userId":"me","id":"THREAD_ID","format":"metadata"}'gws gmail users labels list --params '{"userId":"me"}' | jq '.labels[] | {id, name, type}'
gws gmail users labels create --json '{"name":"Projects/AI","labelListVisibility":"labelShow","messageListVisibility":"show"}' --params '{"userId":"me"}'
gws gmail users messages batchModify --params '{"userId":"me"}' --json '{"ids":["MSG_ID"],"addLabelIds":["LABEL_ID"]}'gws gmail users messages trash --params '{"userId":"me","id":"MSG_ID"}'
gws gmail users messages untrash --params '{"userId":"me","id":"MSG_ID"}'gws gmail users settings getVacation --params '{"userId":"me"}'
gws gmail users settings sendAs list --params '{"userId":"me"}'Drive 支持文件和文件夹的完整生命周期管理。所有 --upload 和 --output 路径仅支持相对路径,必须先 cd 到目标目录。
gws drive files list --params '{"pageSize":10,"orderBy":"modifiedTime desc"}'
gws drive files list --params '{"q":"mimeType=\"application/vnd.google-apps.spreadsheet\""}'
gws drive files list --params '{"q":"'\''FOLDER_ID'\'' in parents"}'files create 的 name 参数无效(CLI 未传递给 API),上传后文件名始终为 "Untitled",必须先上传再 rename。注意:files copy 的 name 参数有效,不受此限制。
cd /path/to/target/dir
gws drive files create --params '{}' --upload file.txt --upload-content-type text/plain
gws drive files update --params '{"fileId":"FILE_ID"}' --json '{"name":"real_name.txt"}'gws drive files create --params '{}' --json '{"name":"Folder Name","mimeType":"application/vnd.google-apps.folder"}'files copy 的 name 参数有效(与 upload 不同),可一步完成:
# 复制(可同时重命名)
gws drive files copy --params '{"fileId":"ID"}' --json '{"name":"Copy of file"}'
# 移动到文件夹
gws drive files update --params '{"fileId":"ID","addParents":"FOLDER_ID","removeParents":"root"}' --json '{}'决策原则:原生文件(txt, pdf, docx 等)用 get --alt media;Google 原生格式(Sheets, Docs, Slides)用 export 转换。
gws drive files get --params '{"fileId":"ID","alt":"media"}' --output file.txt
gws drive files export --params '{"fileId":"ID","mimeType":"application/pdf"}' --output doc.pdf
gws drive files export --params '{"fileId":"ID","mimeType":"text/csv"}' --output data.csvgws drive permissions list --params '{"fileId":"ID","pageSize":10}'
gws drive about get --params '{"fields":"storageQuota"}' | jq '.storageQuota'files delete 成功时返回 {"status":"success","saved_file":"download.html"} 而非空 JSON,忽略即可。
gws drive files delete --params '{"fileId":"ID"}'Calendar 支持完整的事件 CRUD、日历管理、忙碌查询和权限控制。所有时间参数使用 RFC 3339 格式。
# 查询事件
gws calendar events list --params '{"calendarId":"primary","timeMin":"START_DATETIME","timeMax":"END_DATETIME","maxResults":20}'
# 创建事件
gws calendar events insert --json '{"summary":"Meeting","start":{"dateTime":"DATETIME_START","timeZone":"Asia/Shanghai"},"end":{"dateTime":"DATETIME_END","timeZone":"Asia/Shanghai"}}' --params '{"calendarId":"primary"}'
# 更新/删除事件
gws calendar events update --params '{"calendarId":"primary","eventId":"EVENT_ID"}' --json '{"summary":"Updated"}'
gws calendar events delete --params '{"calendarId":"primary","eventId":"EVENT_ID"}'
# 查看重复事件的所有实例
gws calendar events instances --params '{"calendarId":"primary","eventId":"RECURRING_EVENT_ID"}'# 查看忙碌/空闲时段
gws calendar freebusy query --json '{"timeMin":"START_DT","timeMax":"END_DT","items":[{"id":"primary"}]}'
# 日历权限
gws calendar acl list --params '{"calendarId":"primary"}'# 创建/删除二级日历
gws calendar calendars insert --json '{"summary":"My Calendar"}' --params '{}'
gws calendar calendars delete --params '{"calendarId":"CALENDAR_ID"}'
# 日历列表管理
gws calendar calendarList list --params '{"maxResults":10}'Sheets 支持完整的电子表格操作:读写单元格、公式、格式化、行列操作、条件格式、冻结等。
Sheet 名称不一定是 "Sheet1",+read 的 range 必须用实际 sheet 名,先 get 获取 .sheets[].properties.title。
# 创建 Spreadsheet
gws sheets spreadsheets create --json '{"properties":{"title":"My Sheet"}}' --params '{}'
# 获取 sheet 名称
SHEET=$(gws sheets spreadsheets get --params '{"spreadsheetId":"ID"}' 2>/dev/null | jq -r '.sheets[0].properties.title')
# 读取
gws sheets +read --spreadsheet "ID" --range "${SHEET}!A1:C10"# 更新单元格(RAW = 原样写入)
gws sheets spreadsheets values update --params '{"spreadsheetId":"ID","range":"Sheet1!A1","valueInputOption":"RAW"}' --json '{"values":[["New Value"]]}'
# 输入公式(必须用 USER_ENTERED,不能用 RAW)
gws sheets spreadsheets values update --params '{"spreadsheetId":"ID","range":"Sheet1!C1","valueInputOption":"USER_ENTERED"}' --json '{"values":[["=AVERAGE(B2:B10)"]]}'
gws sheets spreadsheets values update --params '{"spreadsheetId":"ID","range":"Sheet1!D1","valueInputOption":"USER_ENTERED"}' --json '{"values":[["=SUM(B2:B10)"]]}'
gws sheets spreadsheets values update --params '{"spreadsheetId":"ID","range":"Sheet1!E1","valueInputOption":"USER_ENTERED"}' --json '{"values":[["=IF(B2>90,\"A\",\"B\")"]]}'
# 追加行(注意:+append 没有 --range 参数,始终追加到第一个 sheet 末尾)
gws sheets +append --spreadsheet "ID" --values 'col1,col2'
gws sheets +append --spreadsheet "ID" --json-values '[["col1","col2"],["col3","col4"]]'
# 清空单元格(保留格式)
gws sheets spreadsheets values clear --params '{"spreadsheetId":"ID","range":"Sheet1!A1:C10"}'# 删除行
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"deleteDimension":{"range":{"sheetId":0,"dimension":"ROWS","startIndex":2,"endIndex":3}}}]}'
# 插入行/列
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"insertDimension":{"range":{"sheetId":0,"dimension":"COLUMNS","startIndex":1,"endIndex":2},"inheritFromBefore":true}}]}'
# 合并单元格
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"mergeCells":{"range":{"sheetId":0,"startRowIndex":0,"endRowIndex":1,"startColumnIndex":0,"endColumnIndex":3},"mergeType":"MERGE_ALL"}}]}'
# 设置列宽/行高
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"updateDimensionProperties":{"range":{"sheetId":0,"dimension":"COLUMNS","startIndex":0,"endIndex":1},"properties":{"pixelSize":200},"fields":"pixelSize"}}]}'# 单元格背景色
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"repeatCell":{"range":{"sheetId":0,"startRowIndex":0,"endRowIndex":1},"cell":{"userEnteredFormat":{"backgroundColor":{"red":0.2,"green":0.6,"blue":1}},"fields":"userEnteredFormat.backgroundColor"}}}]}'
# 条件格式
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"addConditionalFormatRule":{"rule":{"ranges":[{"sheetId":0,"startRowIndex":1,"endRowIndex":100}],"booleanRule":{"condition":{"type":"NUMBER_GREATER","values":[{"userEnteredValue":"90"}]},"format":{"backgroundColor":{"red":0,"green":1,"blue":0}}}},"index":0}}]}'
# 冻结行/列
gws sheets spreadsheets batchUpdate --params '{"spreadsheetId":"ID"}' --json '{"requests":[{"updateSheetProperties":{"properties":{"sheetId":0,"gridProperties":{"frozenRowCount":1,"frozenColumnCount":1}},"fields":"gridProperties.frozenRowCount,gridProperties.frozenColumnCount"}}]}'Docs 支持创建、读取、编辑文档。文档编辑通过 batchUpdate 实现。
# 创建
gws docs documents create --json '{"title":"My Doc"}' --params '{}'
# 提取纯文本
gws docs documents get --params '{"documentId":"ID"}' | jq '[.body.content[]|select(.paragraph)|.paragraph.elements[]?|select(.textRun)|.textRun.content]|join("")'# 插入文本(index 1 = 文档开头)
gws docs documents batchUpdate --json '{"requests":[{"insertText":{"location":{"index":1},"text":"Hello World\n"}}]}' --params '{"documentId":"ID"}'
# 设置文本样式(加粗、斜体、字号、颜色等)
gws docs documents batchUpdate --json '{"requests":[{"updateTextStyle":{"range":{"startIndex":1,"endIndex":6},"textStyle":{"bold":true},"fields":"bold"}}]}' --params '{"documentId":"ID"}'
# 设置段落样式(标题、列表等)
gws docs documents batchUpdate --json '{"requests":[{"updateParagraphStyle":{"range":{"startIndex":1,"endIndex":10},"style":{"namedStyleType":"HEADING_1"},"fields":"namedStyleType"}}]}' --params '{"documentId":"ID"}'
# 插入图片
gws docs documents batchUpdate --json '{"requests":[{"insertInlineImage":{"uri":"https://example.com/image.png","location":{"index":1}}}]} --params '{"documentId":"ID"}'
# 创建列表(bullet)
gws docs documents batchUpdate --json '{"requests":[{"createParagraphBullets":{"range":{"startIndex":1,"endIndex":20},"bulletPreset":"BULLET_DISC_CIRCLE_SQUARE"}}]}' --params '{"documentId":"ID"}'Slides 支持创建、读取、编辑演示文稿。编辑通过 batchUpdate 实现。
# 创建
gws slides presentations create --json '{"title":"My Slides"}' --params '{}'
# 获取元数据
gws slides presentations get --params '{"presentationId":"ID"}' | jq '{title, slideCount: (.slides | length)}'# 创建文本框并插入文本
gws slides presentations batchUpdate --json '{"requests":[{"createShape":{"objectId":"shape1","shapeType":"TEXT_BOX","elementProperties":{"pageObjectId":"p1","size":{"width":{"magnitude":4000000,"unit":"EMU"},"height":{"magnitude":300000,"unit":"EMU"}},"transform":{"scaleX":1,"scaleY":1,"translateX":100000,"translateY":100000,"unit":"EMU"}}}},{"insertText":{"objectId":"shape1","text":"Hello Slides!"}}]}' --params '{"presentationId":"ID"}'
# 设置文本样式(加粗 + 字号)
gws slides presentations batchUpdate --json '{"requests":[{"updateTextStyle":{"objectId":"shape1","style":{"bold":true,"fontSize":{"magnitude":36,"unit":"PT"}},"textRange":{"type":"ALL"},"fields":"bold,fontSize"}}]}' --params '{"presentationId":"ID"}'
# 新增幻灯片
gws slides presentations batchUpdate --json '{"requests":[{"createSlide":{"objectId":"slide2"}}]}' --params '{"presentationId":"ID"}'
# 插入图片
gws slides presentations batchUpdate --json '{"requests":[{"createImage":{"url":"https://example.com/image.png","elementProperties":{"pageObjectId":"p1","size":{"width":{"magnitude":3000000,"unit":"EMU"},"height":{"magnitude":2000000,"unit":"EMU"}},"transform":{"scaleX":1,"scaleY":1,"translateX":500000,"translateY":500000,"unit":"EMU"}}}}]}' --params '{"presentationId":"ID"}'注意:
presentations create输出的是完整对象,提取 presentationId 需要解析 JSON。Slides 坐标单位为 EMU(1 inch = 914400 EMU)。
Forms 支持创建表单、添加题目和查看回复。forms create 只能创建空表单(仅 title 生效),添加题目需要用 batchUpdate。
# 创建空表单
gws forms forms create --json '{"info":{"title":"Survey"}}' --params '{}'
# 添加文本题目(location 是必填字段,放在 createItem 级别)
gws forms forms batchUpdate --json '{"requests":[{"createItem":{"location":{"index":0},"item":{"title":"What is your name?","questionItem":{"question":{"required":true,"textQuestion":{}}}}}}]}' --params '{"formId":"FORM_ID"}'
# 查看回复
gws forms forms responses list --params '{"formId":"FORM_ID"}'Tasks 支持任务列表 CRUD 和完成状态管理。
gws tasks tasklists list | jq '.items[]|{title,id}'
gws tasks tasks list --params '{"tasklist":"@default"}' | jq '.items[]|{title,status,due}'
gws tasks tasks insert --json '{"title":"Task","notes":"Details"}' --params '{"tasklist":"@default"}'
gws tasks tasks patch --params '{"tasklist":"@default","task":"TASK_ID"}' --json '{"status":"completed"}'
gws tasks tasks delete --params '{"tasklist":"@default","task":"TASK_ID"}'
gws tasks tasks clear --params '{"tasklist":"@default"}' # 清除所有已完成任务People 支持个人资料、联系人搜索/创建和分组管理。searchContacts 必须指定 readMask,不传会报 400。connections list 不需要。
# 个人资料
gws people people get --params '{"resourceName":"people/me","personFields":"names,emailAddresses"}'
# 搜索联系人(必须指定 readMask)
gws people people searchContacts --params '{"query":"keyword","pageSize":10,"readMask":"names,emailAddresses,phoneNumbers"}'
# 联系人列表
gws people connections list --params '{"resourceName":"people/me","personFields":"names,emailAddresses,phoneNumbers","pageSize":10}'
# 创建联系人
gws people people createContact --json '{"names":[{"givenName":"First","familyName":"Last"}],"emailAddresses":[{"value":"email@example.com"}]}' --params '{"readMask":"names,emailAddresses"}'
# 联系人分组
gws people contactGroups list --params '{"pageSize":10}'Meet 支持会议记录查询。Classroom 支持课程、学生和作业管理(需要教育账号)。
# Meet: 会议记录
gws meet conferenceRecords list --params '{"pageSize":10}'
gws meet conferenceRecords get --params '{"name":"RECORD_ID"}'
# Classroom: 课程、学生、作业
gws classroom courses list --params '{"pageSize":10}'
gws classroom courses students list --params '{"courseId":"COURSE_ID"}'
gws classroom courses.courseWork list --params '{"courseId":"COURSE_ID"}'快捷工作流命令,适合日常自动化场景:
gws workflow +standup-report # 今日会议 + 待办任务
gws workflow +meeting-prep # 下一个会议准备
gws workflow +weekly-digest # 本周会议 + 未读邮件数
gws workflow +email-to-task --message-id "MSG_ID" # Gmail → Tasksgws schema <service> # 列出该服务所有方法
gws schema <api.method> # 查询具体参数结构
gws <service> <method> --params '{}' --format table # 表格输出(给人类看)
gws <service> <method> --params '{}' --page-all # 自动翻页不确定参数时先查 schema,不要猜。JSON + jq 是默认输出模式,--format table 仅用于给人类看。
© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/gws-google-workspace of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Gws next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Gws this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Gwskv0906/pm-kit | 138 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Google Workspaceespennilsen/pi | 122 | — | ~3.4k | Automated safety check: Pass | MIT | |
| Google Workspacegoogle/adk-recipes | 10k | — | ~4.6k | Automated safety check: Pass | Apache-2.0 | |
| Google Workspacetaracodlabs/aiden | 851 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Google WorkspaceAlexAI-MCP/hermes-CCC | 135 | — | ~1.2k | Automated safety check: Pass | MIT |
kv0906/pm-kit
This skill should be used when the user asks to "set up gws", "install Google Workspace CLI", "connect Gmail to Claude", "manage Google Drive from terminal", "send email from CLI", "check my…
espennilsen/pi
Manage Google Workspace via the gws CLI — Drive, Gmail, Sheets, Docs, Slides, People, Chat, Meet, Forms, and cross-service workflows.
google/adk-recipes
Read/write Google Drive, Docs, Sheets, Gmail, Calendar, Chat, Tasks, Slides via the gws CLI.
taracodlabs/aiden
Gmail, Calendar, Drive, Sheets, Docs via Google API (SA / OAuth)
AlexAI-MCP/hermes-CCC
Automate Google Workspace — Gmail, Drive, Sheets, Docs, Calendar via Google API Python client or gcloud CLI.
karaage0703/ai-assistant-workspace
gogcli経由でGmail・Google Drive・Google Calendarを操作するスキル。複数Googleアカウント対応。「メールチェック」「メール確認して」「Driveにアップロード」「Driveのファイル」「Gmailで検索」で使用。
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Google Workspace CLI. An agent skill from LeoYeAI/openclaw-master-skills. Gws is an agent skill from LeoYeAI/openclaw-master-skills. Google Workspace CLI.
Gws fits situations like: the user mentions Gmail; reading/writing spreadsheets; viewing schedules; standup reports.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill gws -a claude-code`. Or copy the skill folder (skills/gws-google-workspace in LeoYeAI/openclaw-master-skills) into .claude/skills/gws in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill gws -a codex`. Or copy the skill folder (skills/gws-google-workspace in LeoYeAI/openclaw-master-skills) into .agents/skills/gws in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill gws -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gws, .gemini/skills/gws, .github/skills/gws and .opencode/skills/gws in your project.
Going by SKILL.md and its folder, Gws needs the command-line tools its instructions call (jq and npm). Our summary lists: Node.js.
SKILL.md names 2 domains. As links in the text: github.com and console.cloud.google.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Gws is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.9k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Gws: Gws (kv0906/pm-kit, 138 stars), Google Workspace (espennilsen/pi, 122 stars), Google Workspace (google/adk-recipes, 10k stars) and Google Workspace (taracodlabs/aiden, 851 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,160 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.