plugins/google-drive/skills/google-docs/SKILL.md
Connector-first Google Docs creation and editing in local Codex plugin sessions, with direct native create and batchUpdate workflows for simple docs, DOCX-first import for polished deliverables, target-document checks, smart chip and building-block reconstruction, connector-readback verification, and reference routing for formatting, citations, tables, and write-safety.
npx skillsauth add openai/plugins google-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for Google Docs work in Codex local-plugin sessions.
For blank or basic native Google Docs, create the doc directly with the Google Drive connector. Use [@documents](plugin://documents@openai-primary-runtime) plus DOCX import only when the requested deliverable needs polished document authoring, complex layout, visual design, image/figure placement, page-level QA, branded styling, or export-quality fidelity.
This file is intentionally minimal and covers:
All formatting, citation, table, request-shape, and production rules live in references/.
Read only the references required for the task. For the common calendar-backed meeting-notes edit, references/reference-meeting-notes-direct.md is the single task reference unless the task adds tables, figures, citations, import/export, or other non-meeting-notes requirements.
Use this routing:
references/reference-native-create-direct.md, call mcp__codex_apps__google_drive._create_file with mime_type: "application/vnd.google-apps.document", and use direct Docs batchUpdate requests only if content is requested.[@documents](plugin://documents@openai-primary-runtime) to create a local .docx first, explicitly selecting the google_docs_default design preset unless the user asked for a special, branded, or highly polished visual treatment. Then read references/reference-import-docx-to-native-docs.md and import with mcp__codex_apps__google_drive_import_document using upload_mode: "native_google_docs".Choose the simplest creation path that can faithfully satisfy the request. The connector-native path is the default for blank docs and basic documents with plain text, headings, lists, simple links, simple tables, and supported smart chips. The DOCX-import path is the high-quality workflow for deliverables where page layout, figure generation, visual polish, export quality, or full rendered visual QA matter.
The import reference owns the exact connector action, plugin install/reinstall handling, native-conversion verification, post-import normalization, and cleanup steps. Read it before any DOCX-first Google Docs import attempt.
For DOCX-first work, local DOCX staging hygiene is mandatory. Staging must be non-user-visible and untracked from the start. Do not create DOCX builder or helper scripts with tracked file-edit tools such as apply_patch, and do not create helper source files in the workspace or any path surfaced by Changes Made. Prefer the Documents plugin's built-in authoring workflow or a one-shot runtime command that keeps generation code ephemeral and persists only the required .docx, render outputs, and scratch assets in a per-task scratch directory. After successful native import and connector readback, remove those local staging artifacts unless the user explicitly asked to keep local files. Cleanup is required as a backstop, not as the visibility control.
Do not reference the local .docx in the final answer after successful native import. The final answer includes the Google Docs link only.
Connector-first creation and editing is the preferred path for blank docs, basic native docs, existing native Google Docs, and targeted post-import edits. It is strong for text, headings, bullets, links, simple tables, tabs, comments, supported smart chips, meeting-notes-like building-block reconstruction, and template-preserving insertions.
It is not a universal replacement for DOCX-first creation. Use DOCX-first creation for net-new polished deliverables where page layout, figure generation, export quality, or full rendered visual QA matter.
For template-preserving work, sample the nearest comparable live document structure before writing. Reproduce connector-visible structure and supported element types rather than approximating everything as plain text. For unsupported UI-only constructs, copy an existing template document or recreate the observable constituent structure; do not claim native UI building-block insertion unless connector readback proves it.
For DOCX-first Google Docs creation, google_docs_default is the default visual contract. Do not let the Documents skill infer standard_business_brief, compact_reference_guide, or another Word-oriented preset from the content archetype alone. The expected result is a native-feeling Google Doc after import: Arial-based typography, black title/headings/body text, simple title block, restrained spacing, real lists, and no imported Word-template chrome such as blue headings, colored callouts, dense table borders, or running header/footer furniture.
Use a different Documents preset only when the user explicitly asks for a special visual treatment, a branded document, or a more polished formal artifact than a normal Google Doc.
This plugin is for the local Codex plugin environment.
gdocs_* helper scripts to digest get_document output or generate batchUpdate request arrays.references/reference-direct-request-composition.md.Maintain working state for the active document task instead of re-deriving context from scratch after every step.
Keep the target URL, document id, tabId, source materials, relevant readback snippets, resolved sections or tables, live indexes, write batches, and verification status current as the task progresses.
Refresh that state before connector writes when source gathering, document switches, connector errors, or runtime resets could make it stale.
Inserted or edited content must match the surrounding document's existing structure and connector-observable presentation closely enough that it should read as native template content. This is launch-blocking, not cosmetic. Treat missing section hierarchy, mismatched heading level, font family, font size, bolding, link coverage, table styling, chip type, or template-shape drift visible in connector data as a failed output that must be corrected before handoff. Do not claim rendered visual verification from connector readback or HTML export alone.
When Google Drive PDF export and local PDF page rasterization are available, use the PDF-export visual QA workflow in references/reference-pdf-export-visual-qa.md after connector readback for layout-sensitive work. That workflow can verify exported Google Docs PDF pages for clipping, overlap, page breaks, table fit, and figure placement. If PDF export or raster review is unavailable, state the limitation plainly and do not imply rendered visual QA passed.
For presentation-oriented documents, structural completeness is not enough. A document can have all requested sections, headings, tables, and placeholders resolved while still being too dense, monotonous, or hard to scan. Treat readability, hierarchy, and appropriate use of visual devices as part of completion, not as optional polish.
Prefer one simple proven workflow over a large tree of recovery branches.
When a task matches a known successful pattern, follow that pattern directly instead of re-evaluating every possible insertion or fallback path.
Do not let accumulated edge-case guardrails turn a straightforward document task into a long blocker-analysis exercise.
For net-new Google Doc requests, follow Default Routing first: connector-native for blank/basic docs, DOCX-first for polished/complex deliverables.
For existing document editing tasks, connector-created docs with content, and follow-on edits after a DOCX import, use direct connector batchUpdate request composition when viable.
For connector-created docs with content, existing document editing tasks, and follow-on edits after a DOCX import, use this sequence when viable:
documentId, URL, and tabId if tabs are present.get_document when structure, styles, tabs, tables, chips, or building-block-like content matter.batchUpdate request batch directly in the connector call. Split large or fragile edits into verified batches.write_control.requiredRevisionId when the write is based on a fresh revision id and collaborator conflicts should fail fast.For any secondary element that cannot be verified through connector reads, either use a connector-supported path with readback or clearly state the verification limit.
If a simple verified workflow is viable, use it. Do not drift into speculative alternate paths.
For requests like "add meeting notes for today's/tomorrow's meeting from my calendar":
references/reference-meeting-notes-direct.md unless the task adds tables, figures, citations, import/export, or other non-meeting-notes requirements.Before final handoff, explicitly verify these with connector readback:
dateElement, person, and richLinkreferences/reference-meeting-notes-direct.mdreferences/reference-section-completeness-and-final-pass.md and references/reference-pdf-export-visual-qa.md as applicable; if connector readback, HTML export, and PDF-export visual QA do not prove a rendered visual property, do not assert that property as verifiedIf any check fails, the task is not complete. If a simple verified workflow is viable, use it. Do not drift into speculative alternate paths.
For connector-native creation and existing Google Doc edits, the following are workflow failures unless the user explicitly requested that export format for a separate deliverable:
fetch or plain-text/HTML export as the primary structure source instead of connector readsgdocs_* helper scriptsinsertDate, insertPerson, or insertRichLink can express themBefore any Google Docs creation, content write, or edit operation:
If Default Routing uses connector-native create:
references/reference-native-create-direct.md.references/reference-native-create-direct.md and references/reference-direct-request-composition.md.If Default Routing uses [@documents](plugin://documents@openai-primary-runtime):
[@documents](plugin://documents@openai-primary-runtime) plugin skill.references/reference-import-docx-to-native-docs.md.references/reference-request-shapes-and-write-safety.md, references/reference-headings-and-question-format.md, references/reference-response-and-list-format.md, and references/reference-section-completeness-and-final-pass.md.If Default Routing uses connector edit workflow for an existing document:
references/reference-meeting-notes-direct.md unless the task clearly needs another reference.references/reference-direct-request-composition.md unless the task clearly needs another reference.references/reference-connector-runtime-and-safety.md, references/reference-foreground-guard.md, references/reference-request-shapes-and-write-safety.md, and references/reference-direct-request-composition.md.references/reference-smart-chips-and-building-blocks.md.references/reference-pdf-export-visual-qa.md.Do not execute creation or content edits until the required references are read in the current turn.
_create_file response establishes the new target document identity.tabId.tabId from connector data. Do not re-read the guard reference file for each batch once the rule is known.get_document when styles, tabs, lists, chips, tables, or building-block-like structures matterget_document when targeted reads cannot expose required chips, styles, lists, or multiple nearby paragraphs.tabId and carry it through all reads and writes.| Task area | Required reference file |
| --- | --- |
| Calendar-backed Meeting notes, empty placeholders, attendee chips, declined-attendee styling, and fast connector readback | references/reference-meeting-notes-direct.md |
| Blank or basic connector-native Google Docs creation | references/reference-native-create-direct.md |
| Runtime attachment, section targeting, safety, and recovery | references/reference-connector-runtime-and-safety.md |
| Importing a locally created .docx into native Google Docs | references/reference-import-docx-to-native-docs.md |
| Confirming the target Google Doc before every write batch | references/reference-foreground-guard.md |
| Request objects, tab-aware calls, range-safe writes, sampling the local style baseline, and connector-readback verification when style metadata is incomplete | references/reference-request-shapes-and-write-safety.md |
| Preparing non-meeting direct batchUpdate request arrays from connector readback, including index ledgers, supported chip examples, and verification | references/reference-direct-request-composition.md |
| Header and prompt structure, including bolding the question being answered and matching local heading/body typography | references/reference-headings-and-question-format.md |
| Response structure, list behavior, and one-idea-per-bullet formatting | references/reference-response-and-list-format.md |
| Citation formatting and hyperlink requirements | references/reference-citations-and-hyperlinks.md |
| Existing smart-chip inspection, non-simple smart-chip parity, and building-block support tiers | references/reference-smart-chips-and-building-blocks.md |
| Native table creation, local table-style matching, population, styling, and acceptance checks | references/reference-table-formatting-deep-dive.md |
| Figures, diagrams, image preparation, insertion, and figure-block placement | references/reference-figures-and-image-insertion.md |
| Section completeness, source-list formatting, typography consistency, connector-observable comparison, and final production pass | references/reference-section-completeness-and-final-pass.md |
| PDF export, page rasterization, thumbnail limitations, and rendered visual QA | references/reference-pdf-export-visual-qa.md |
tools
Top-level workflow skill for USD performance diagnosis and optimization. Use for slow loading, high memory, low FPS, or 'optimize my scene' requests; delegates auth/runtime setup to Phase 0 owners.
data-ai
Use when the user mentions MagicPath, designs, UI components, themes, canvas selections, or repo-to-canvas UI work; run magicpath-ai to search, inspect, install, or author components.
documentation
Use as the top-level router for Omniverse Realtime Viewer USD app requests and focused viewer reference documents.
tools
Turn Notion specs into implementation plans, tasks, and progress tracking; use when implementing PRDs/feature specs and creating Notion plans + tasks from them.