
Gws Docs
Automate creating, reading, and batch-updating Google Docs from your coding agent through the gws CLI.
Overview
gws-docs is an agent skill for the Build phase that reads and writes Google Docs through the gws CLI using create, get, and batchUpdate on the documents resource.
Install
npx skills add https://github.com/googleworkspace/cli --skill gws-docsWhat is this skill?
- Documents API: create blank docs, get latest content, and batchUpdate with validated multi-request batches
- CLI discovery via `gws docs --help` and `gws schema docs.<resource>.<method>` before each call
- Helper `+write` documented for appending text (see gws-docs-write skill)
- Requires `gws` binary and gws-shared auth, flags, and security rules (v0.22.5 metadata)
- Part of the googleworkspace/gws skill family alongside shared prerequisites
- Skill metadata version 0.22.5
- 3 documents API methods documented: batchUpdate, create, get
- 1 helper command (+write) cross-linked in the API table
Adoption & trust: 31.6k installs on skills.sh; 26.9k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need your agent to create or update Google Docs programmatically but do not want to hand-author OAuth flows and REST payloads for every edit.
Who is it for?
Solo builders with gws installed who automate specs, runbooks, or living documents in Google Workspace during agent-driven builds.
Skip if: Teams without Google Workspace, without the gws binary, or who only need occasional manual editing in the Docs UI.
When should I use this skill?
You need to create, fetch, or structurally update Google Docs through `gws docs` after gws-shared auth is in place.
What do I get? / Deliverables
Your agent runs documented gws docs commands with schema-checked params and can chain to gws-docs-write when the job is append-only text.
- Created Google Doc (documents.create)
- Fetched document payload (documents.get)
- Applied batch update result or failure from documents.batchUpdate
Recommended Skills
Journey fit
Google Docs access is wired during product build when agents draft specs, append changelogs, or sync documentation via Workspace APIs. This skill is a thin CLI wrapper around the Docs API (create, get, batchUpdate), which fits build-phase third-party integrations rather than a single copywriting task.
How it compares
Workspace API integration via local gws CLI commands—not a hosted MCP server and not a markdown-only doc generator.
Common Questions / FAQ
Who is gws-docs for?
It is for solo and indie developers using Claude Code, Cursor, or Codex who standardize Google Docs automation through the gws command-line tool alongside other gws resource skills.
When should I use gws-docs?
Use it in Build when creating blank documents, fetching the latest document JSON, or applying batch updates; also during Ship or Operate when syncing changelogs or runbooks—always after configuring auth via gws-shared.
Is gws-docs safe to install?
Treat it as code that drives live Google APIs with your credentials; review the Security Audits panel on this Prism page and follow gws-shared security rules before granting network or secret access to your agent.
Workflow Chain
Requires first: gws shared
Then invoke: gws docs write
SKILL.md
READMESKILL.md - Gws Docs
# docs (v1) > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. ```bash gws docs <resource> <method> [flags] ``` ## Helper Commands | Command | Description | |---------|-------------| | [`+write`](../gws-docs-write/SKILL.md) | Append text to a document | ## API Resources ### documents - `batchUpdate` — Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. - `create` — Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document. - `get` — Gets the latest version of the specified document. ## Discovering Commands Before calling any API method, inspect it: ```bash # Browse resources and methods gws docs --help # Inspect a method's required params, types, and defaults gws schema docs.<resource>.<method> ``` Use `gws schema` output to build your `--params` and `--json` flags.