跳到正文
cccskills
免费在 GitHub 公开

gws-docs

Google Docs skill for creating, reading, and updating documents via the gws CLI. Covers document creation, content retrieval, batch updates, and sharing.

中文简介正在准备中。当前显示原文说明。

集成工具Google Docs
查看安装方法

包含的文件(1)

  • SKILL.md3.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

gws docs <resource> <method> [flags]

Quick Examples

# 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

CommandDescription
gws docs +writeAppend text to a document (simplified)

Common batchUpdate Request Types

Request typeWhat it does
insertTextInsert text at a specific index
deleteContentRangeRemove a range of content
replaceAllTextFind and replace throughout document
insertPageBreakInsert a page break
updateParagraphStyleApply a heading or paragraph style
updateTextStyleBold, italic, font, size
insertTableInsert a table
insertInlineImageEmbed an image
createNamedRangeMark a range for later reference

Reading Document Content

The documents.get response contains a body.content array of structural elements:

{
  "documentId": "...",
  "title": "My Document",
  "body": {
    "content": [
      { "paragraph": { "elements": [{ "textRun": { "content": "Hello\n" } }] } }
    ]
  }
}

Extract plain text with jq:

gws docs documents get --params '{"documentId": "DOC_ID"}' \
  | jq '[.. | .textRun?.content? // empty] | join("")'

Key API Resources

documents

get, create, batchUpdate

Discovering More

gws docs --help
gws schema docs.documents.batchUpdate
gws schema docs.documents.get

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

中文简介正在准备中。当前显示原文说明。

nvdigitalsolutions/mcp-ai-wpoos72026年10月22日 更新

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

中文简介正在准备中。当前显示原文说明。

nvdigitalsolutions/mcp-ai-wpoos72026年10月22日 更新

Control a headless browser to navigate URLs, click elements, fill forms, extract content from JavaScript-rendered pages, take screenshots, and automate end-to-end web workflows.

中文简介正在准备中。当前显示原文说明。

nvdigitalsolutions/mcp-ai-wpoos72026年10月22日 更新

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

中文简介正在准备中。当前显示原文说明。

nvdigitalsolutions/mcp-ai-wpoos72026年10月22日 更新

Review code for quality, simplicity, and maintainability. Identifies unnecessary abstractions, duplicated logic, oversized functions, missing error handling, and naming issues — then fixes them automatically before presenting the result.

中文简介正在准备中。当前显示原文说明。

nvdigitalsolutions/mcp-ai-wpoos72026年10月22日 更新

WooCommerce store operations through NV oOS Pro — product research, catalog cross-referencing, inventory lookups, and Shopify or Flowhub comparisons where integrations are configured.

中文简介正在准备中。当前显示原文说明。

nvdigitalsolutions/mcp-ai-wpoos72026年10月22日 更新

查看 nvdigitalsolutions 的全部技能

报告此技能的问题