gws-docs
Google Docs skill for creating, reading, and updating documents via the gws CLI. Covers document creation, content retrieval, batch updates, and sharing.
Best use case
gws-docs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Google Docs skill for creating, reading, and updating documents via the gws CLI. Covers document creation, content retrieval, batch updates, and sharing.
Teams using gws-docs should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gws-docs/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gws-docs Compares
| Feature / Agent | gws-docs | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Google Docs skill for creating, reading, and updating documents via the gws CLI. Covers document creation, content retrieval, batch updates, and sharing.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Google Docs (gws-docs)
> **PREREQUISITE:** Read the `gws-shared` skill for auth, global flags, and security rules.
Read and write Google Docs using the `gws` CLI.
```bash
gws docs <resource> <method> [flags]
```
## Quick Examples
```bash
# Create a new blank document
gws docs documents create \
--json '{"title": "Meeting Notes — March 2026"}'
# Get document content (returns full JSON including body segments)
gws docs documents get \
--params '{"documentId": "DOCUMENT_ID"}'
# Append text to a document
gws docs documents batchUpdate \
--params '{"documentId": "DOCUMENT_ID"}' \
--json '{
"requests": [
{
"insertText": {
"location": {"index": 1},
"text": "New paragraph content here.\n"
}
}
]
}'
# Insert a heading
gws docs documents batchUpdate \
--params '{"documentId": "DOCUMENT_ID"}' \
--json '{
"requests": [
{
"insertText": {
"location": {"index": 1},
"text": "Section Title\n"
}
},
{
"updateParagraphStyle": {
"range": {"startIndex": 1, "endIndex": 14},
"paragraphStyle": {"namedStyleType": "HEADING_1"},
"fields": "namedStyleType"
}
}
]
}'
# Replace placeholder text (template fill-in)
gws docs documents batchUpdate \
--params '{"documentId": "DOCUMENT_ID"}' \
--json '{
"requests": [
{
"replaceAllText": {
"containsText": {"text": "{{CLIENT_NAME}}", "matchCase": false},
"replaceText": "Acme Corp"
}
}
]
}'
# Insert a table
gws docs documents batchUpdate \
--params '{"documentId": "DOCUMENT_ID"}' \
--json '{
"requests": [
{
"insertTable": {
"rows": 3,
"columns": 3,
"location": {"index": 1}
}
}
]
}'
```
## Helper Commands
| Command | Description |
|---------|-------------|
| `gws docs +write` | Append text to a document (simplified) |
## Common batchUpdate Request Types
| Request type | What it does |
|-------------|-------------|
| `insertText` | Insert text at a specific index |
| `deleteContentRange` | Remove a range of content |
| `replaceAllText` | Find and replace throughout document |
| `insertPageBreak` | Insert a page break |
| `updateParagraphStyle` | Apply a heading or paragraph style |
| `updateTextStyle` | Bold, italic, font, size |
| `insertTable` | Insert a table |
| `insertInlineImage` | Embed an image |
| `createNamedRange` | Mark a range for later reference |
## Reading Document Content
The `documents.get` response contains a `body.content` array of structural elements:
```json
{
"documentId": "...",
"title": "My Document",
"body": {
"content": [
{ "paragraph": { "elements": [{ "textRun": { "content": "Hello\n" } }] } }
]
}
}
```
Extract plain text with `jq`:
```bash
gws docs documents get --params '{"documentId": "DOC_ID"}' \
| jq '[.. | .textRun?.content? // empty] | join("")'
```
## Key API Resources
### documents
`get`, `create`, `batchUpdate`
## Discovering More
```bash
gws docs --help
gws schema docs.documents.batchUpdate
gws schema docs.documents.get
```Related Skills
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
valyu
Search the live web and 36+ specialised data sources including SEC filings, PubMed, ChEMBL, clinical trials, FRED economic indicators, and patent databases. Use when current, authoritative, or paywalled data is required.
ui-ux-pro-max
AI-powered design intelligence with 67 UI styles, 161 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 15+ tech stacks. Generates complete design systems for any product type with industry-specific reasoning rules.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
shannon
Autonomous AI security pen testing. Executes real exploits against web applications to find SQL injection, XSS, SSRF, authentication flaws, and IDOR vulnerabilities. Reports only confirmed, reproducible findings — no false positives.
remotion
Create programmatic videos using React and Remotion. Translate natural language descriptions into working Remotion components for product demos, release announcements, explainer videos, and animated content.
planetscale
Design schemas and write queries for PlanetScale serverless MySQL using branch-based workflows. Ensures index coverage, avoids foreign key anti-patterns, and treats every schema change as a reviewable, reversible deploy request.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
karpathy-coding-principles
Apply Karpathy-inspired coding behavior guidelines — think before coding, prefer simplicity, make surgical changes, and execute toward verifiable goals. Reduces wrong assumptions, overengineering, and unintended side-effects.