google-docs
Inspect and edit Google Docs documents with index-aware batch updates. Use when the user wants to read document text or structure, find paragraph indexes, rewrite sections in place, edit tables, or apply style-aware document changes with Google Docs tools.
- License 许可
- MIT
- 最近更新
- 2026-03-30
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- google-docs
- description
- Inspect and edit Google Docs documents with index-aware batch updates. Use when the user wants to read document text or structure, find paragraph indexes, rewrite sections in place, edit tables, or apply style-aware document changes with Google Docs tools.
02 资源文件 3
- 参考文档agents/openai.yaml358 B
- 资产文件assets/google-docs-small.svg1.1 KB
- 资产文件assets/google-docs.png25.7 KB
03 SKILL.md 正文
Google Docs
Use this guide for precise Google Docs reading, editing, and creation.
Read Path
- If you only know the doc title or title keywords, use
searchfirst instead of asking for a URL. - Prefer
get_document_textwhen you need paragraph text and indexes. - Use
get_documentwhen you need the full document structure, styles, or non-text elements. - Prefer
find_document_text_rangeover hand-picked indexes when you can anchor on exact text. - Use
get_paragraph_rangewhen you have an index inside a paragraph and need its full boundaries. - Use
get_tablesbefore editing or rebuilding table content. - If the doc has tabs, use
get_documentto identify the right tab and carrytab_idthrough follow-up reads. - Re-read after substantial edits so later writes use live indexes.
Workflow
- Read before writing.
- Identify the exact section, heading structure, paragraph boundaries, table locations, and current formatting.
- If the target is ambiguous, summarize the candidate section first and make the scope explicit in the response.
- Find live indexes.
- Use
get_document_textto get all paragraphs along with their indices. - Use
find_document_text_rangewhen you can anchor on exact text. - Use
get_document_paragraph_rangewhen you need a single paragraph's range around an index. - Do not guess offsets after prior writes.
- After many edits, call
get_documentorget_document_textagain before the next batch.
- Build a
batch_update_document.
- All document changes go through
batch_update_document. - IMPORTANT:
batch_update_document.requestsmust be an array of structured request objects. Do not JSON-stringify Docs API requests. batch_update_document.write_controlmust also be an object, and not a JSON-stringified string.- Requests execute in order, so sequence dependent edits deliberately.
- For concurrency-sensitive writes, prefer
write_controlwith the latestrevisionId. Set eitherrequiredRevisionIdortargetRevisionId, never both.
- Preserve Docs-native formatting.
- Use heading levels and paragraph styles to organize the document.
- Build lists with inserted text plus Docs list or paragraph styling. Do not fake bullets or numbering with literal
-,*, or1.characters alone. - Do not add blank paragraphs for spacing. Use styles instead.
- Do not leave the document unformatted unless the user explicitly asks.
- Verify the write.
- After finishing all edits, call
get_document_textone more time. - Confirm the text landed in the intended place and indexes still line up before ending.
Allowed batch_update_document Request Types
- Text:
replaceAllText,insertText,deleteContentRange,replaceNamedRangeContent - Text and paragraph formatting:
updateTextStyle,updateParagraphStyle,createParagraphBullets,deleteParagraphBullets - Named ranges:
createNamedRange,deleteNamedRange - Images and embedded objects:
insertInlineImage,replaceImage,deletePositionedObject - Tables:
insertTable,insertTableRow,insertTableColumn,deleteTableRow,deleteTableColumn,updateTableColumnProperties,updateTableCellStyle,updateTableRowStyle,mergeTableCells,unmergeTableCells,pinTableHeaderRows - Document layout and structure:
updateDocumentStyle,updateSectionStyle,insertPageBreak,insertSectionBreak - Headers, footers, and notes:
createHeader,deleteHeader,createFooter,deleteFooter,createFootnote - Tabs:
addDocumentTab,deleteTab,updateDocumentTabProperties - People:
insertPerson
Write Rules
- Preserve existing headings, styles, links, dates, and table structure when editing unless the user asks to change them.
- Use multiple heading levels to organize a doc unless the user instructs otherwise.
- Treat large rewrites, deletions, tab changes, layout changes, and table restructuring as explicit actions.
- When similar headings or repeated text exist, identify the exact target section before editing.
Fallback
If document content or write tools are unavailable, say that Google Docs access or tooling is missing and ask the user to reconnect or clarify the target document.
04 同仓库更多 Skills
workflow
Vercel Workflow DevKit (WDK) expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause/resume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.
verification
Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.
vercel-storage
Vercel storage expert guidance — Blob, Edge Config, and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.
vercel-services
Vercel Services — deploy multiple services within a single Vercel project. Use for monorepo layouts or when combining a backend (Python, Go) with a frontend (Next.js, Vite) in one deployment.
vercel-sandbox
Vercel Sandbox guidance — ephemeral Firecracker microVMs for running untrusted code safely. Supports AI agents, code generation, and experimentation. Use when executing user-generated or AI-generated code in isolation.
vercel-queues
Vercel Queues guidance (public beta) — durable event streaming with topics, consumer groups, retries, and delayed delivery. $0.60/1M ops. Powers Workflow DevKit. Use when building async processing, fan-out patterns, or event-driven architectures.