一键导入
gws-shared
gws CLI: Shared patterns for authentication, global flags, and output formatting.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
gws CLI: Shared patterns for authentication, global flags, and output formatting.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Training plan scheduling, weekly retrospectives, and training adjacent constraint validation. Use this skill whenever the user mentions training, lifts, runs, climbs, the Friday long run, sauna timing, cold plunge timing, recovery days, cutback weeks, altitude weeks, race week, training restructure, Fitbod, asking to schedule a training session, or asking to look back / retrospect on a past training week. Also trigger for "/assist:plan-training", "schedule my long run", "what does training look like this week", "how did last week go", "training retro", or any request that touches the training plan in `Constitution/Fitness/`. Independently usable, and also called by `/assist:plan-week` during Monday planning.
Weekly planning, calendar management, and Monday morning task slotting. Use this skill whenever the user mentions weekly planning, the Monday planning session, slotting tasks, finding free time, checking what their week looks like, moving or swapping calendar events, or wants help fitting something into their week. Also trigger when the user asks about V2MOM measure coverage. Training plan scheduling lives in `assist:plan-training` and meal planning in `assist:plan-meals`; this skill calls into both during Monday planning.
Audit and redesign the context architecture (every CLAUDE.md, learned-rules.md, and tool doc that loads into Claude Code sessions) so load-bearing rules are surfaced and enforced at the point of use rather than scattered, duplicated, or buried. Use this skill whenever Forni says "groom context", "groom-context", "we forgot a basic again", "the context is sprawling", "the rules keep getting lost", "clean up the context", or invokes "/assist:groom-context". Also invoked as a closing step by the monthly path of assist:reflect. This is the cleanup counterpart to assist:codify-context, which writes knowledge into the same architecture.
Craft Business Development emails for RYLLC fractional CTO consultancy. Handles warm reconnects, job posting outreach, rejection follow-ups, VC intros, and custom BD scenarios. Uses established templates and project voice.
Codify knowledge from the current session into the appropriate location in the context architecture using progressive disclosure. Use this skill whenever the user says "codify" followed by a topic, wants to capture something they just figured out, asks to document a pattern or convention, or says something like "we should write this down" or "future me needs to know this." Also trigger when the user discovers a gotcha, foot-gun, or non-obvious behavior worth preserving. Works for both project directories (three-layer CLAUDE.md/README.md pattern) and skill directories (Learned Rules in SKILL.md). Named after the "plan, delegate, assess, codify" Level 4 compounding loop. This is the write-in counterpart to `assist:groom-context`, which audits and prunes the same context architecture.
Triage Gmail inbox by labeling, starring, and archiving emails. Also creates filters for recurring senders. Use this skill whenever the user mentions email triage, inbox cleanup, email labels, email filters, or wants to process their inbox. Default mode is triage.
| name | gws-shared |
| description | gws CLI: Shared patterns for authentication, global flags, and output formatting. |
| metadata | {"version":"0.22.6","openclaw":{"category":"productivity","requires":{"bins":["gws"]}}} |
The gws binary must be on $PATH. See the project README for install options.
# Browser-based OAuth (interactive)
gws auth login
# Service Account
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
gws reads its config from $GOOGLE_WORKSPACE_CLI_CONFIG_DIR. Forni's setup uses one config dir per Google account, switched at the shell:
| Profile | Config dir | Account |
|---|---|---|
zero | ~/.config/gws-zero/ | mattf@zerohomes.io (Zero Homes) |
home | ~/.config/gws-home/ | personal Gmail |
The active profile is layered:
~/.config/gws-current and exported as GOOGLE_WORKSPACE_CLI_CONFIG_DIR at shell startup by .functions. Persists across shells.chpwd hook walks up from $PWD on every cd, finds the nearest .account marker file (one line text containing the profile name), and silently swaps the env var. cd out, snap back to ambient.gws-pin disables the chpwd hook in the current shell.The .account marker is a cross-tool convention; the ~/bin/claude wrapper reads the same file to pick the Claude Code profile.
| Command | Effect |
|---|---|
gws-use | List profiles; show current |
gws-use home | Set ambient profile (persists across shells; also unpins) |
gws-pin | Lock to current profile in this shell (disables chpwd hook) |
gws-unpin | Resume chpwd hook |
gws-whoami | Show profile, config dir, and gws auth status |
GOOGLE_WORKSPACE_CLI_CONFIG_DIR=~/.config/gws-home gws ... | One shot override |
When writing tooling that should always run against a specific account, prefer the per-command override over relying on the ambient profile. When in doubt about which account is active, run gws-whoami before any action that sends mail or modifies a calendar.
client_secret.json files (the OAuth client config per profile) sync between machines via GCP Secret Manager. The bootstrap project defaults to gws-forni; override via GWS_BOOTSTRAP_PROJECT.
| Action | How |
|---|---|
| Push local secrets up (one machine to seed) | ~/Eudaimonia/Craft/Development/personal/homebase/bin/gws-secrets-push.sh |
| Pull on a fresh machine | ./setup.sh (auto fetches via gcloud secrets versions access) |
Tokens (credentials.enc, token_cache.json) are NOT synced. They are keyring encrypted and bound to the originating machine. Re run gws auth login per profile per machine, which the setup.sh per profile loop handles.
| 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) |
--dry-run for destructive operations--sanitize for PII/content safety screeningzsh ! 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"
JSON with double quotes: Wrap --params and --json values in single quotes so the shell does not interpret the inner double quotes:
gws drive files list --params '{"pageSize": 5}'
https://github.com/googleworkspace/clihttps://github.com/googleworkspace/cli/issues