Prompt- and template-complete Google Docs creation and editing with explicit-instruction-authoritative structural preservation, including semantic roles, relationships, comparison dimensions, and instructed extensions; full-topology native-copy routing; source-grounded per-tab adaptation for past/example references; style-preserving hyperlink and table edits; canonical smart-chip-first authoring for dates and relevant supported people or Google resources; a file-backed advisory trusted read before existing-document writes; automatic protected-control awareness; direct connector APIs by default; DOCX-first import only when no supplied Google Doc template/reference constrains the output; and checked-in code mode only for exact native dropdown mutation. Use when Codex must create, edit, fill, adapt, redesign, or verify Google Docs without overriding explicit user/template instructions, adding unrequested document scope, or carrying stale reference facts into a new deliverable.
68
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use this opt-in skill for Google Docs work in Codex local-plugin sessions. Draft once to the requested final shape, prove explicit prompt/source/template coverage, then compress repetition without removing unique requirements.
Code mode is preferred for the checked-in helpers below, but it is not a prerequisite for this workflow. If code mode is unavailable, reproduce the same routing, read and inventory, preservation, mutation, and verification workflow with the available connector or app tools; preserve all checks and adapt any operation without a non-code implementation to the closest supported equivalent, clearly disclosing any unavoidable fidelity difference.
Use request_user_input once if available, else ask via a message. Have the best suggestion first. Append (Recommended) to its label. Have another good alternative second. Have Use your judgment as the third and final option. If the request times out or returns no answer, proceed using your best judgment; do not ask again.
Choose the route only after resolving whether a supplied Google Doc is a template, reference, example, or content-only source:
references/reference-template-preservation-and-edit-scope.md, inspect the native reference signature below, and remain on a native Google Docs route. Do not delegate authoring to DOCX.
adapt content; they do not preserve prior-project facts, people, dates, links, approvals, or copy. A “legacy,” “reference,” or “do not use” label does not make stale content acceptable in the finished artifact.references/reference-native-create-direct.md, create the file with mcp__codex_apps__google_drive._create_file, and use direct Docs batchUpdate requests when content is requested.[@documents](plugin://documents@openai-primary-runtime) with the google_docs_default preset, then read references/reference-import-docx-to-native-docs.md and import as native Google Docs. A supplied Google Doc template/reference disqualifies this route even when the requested result is polished; a content-only source does not. After import, replace mandatory chip-eligible values with native chips during post-import normalization.references/reference-trusted-read-wrapper.md; inspect its compact control warning immediately and read normalized document content from the returned file path. Targeted follow-up reads may use connector tools directly.references/reference-dropdown-code-mode.md.When the prompt is ambiguous, default to native copy-and-adapt rather than selective borrowing or DOCX reconstruction. Do not create a blank destination or begin a DOCX draft before this decision.
Before planning content for a supplied Google Doc template/reference:
?tab=t.0 identifies the initially visible tab, not the full reference scope.retain, extend, reorder by user direction, or remove by user direction) and a content treatment (carry current content, adapt, replace, or clear). Unmentioned tabs default to retain structure; when the reference describes a different project, event, product, experiment, incident, or time period, their content defaults to adapt, never carry.Do not flatten paragraphs across tabs until the tab tree is recorded. If a full response is too large or truncated, request tabs(tabProperties) first and inspect relevant tabs individually. For exact-template and template-adaptation work, use the Drive copy action exposed by the current runtime, then run the file-backed trusted read on the copied destination before its first write. If native copy is unavailable and tabs, styles, chips, controls, or other native semantics matter, stop rather than silently rebuild through DOCX.
Do not block blank or basic eligible creation on the Documents plugin. For eligible DOCX-first work, keep staging untracked and non-user-visible, clean it after successful native import and readback, and return only the Google Docs link unless the user requested local files.
Use/create ChatGPT at My Drive root. Place new documents created from scratch or from a template there.
Edit existing documents in place.
Respect user-specified locations.
prompt, source, or template/reference), required output form, planned destination, and final state (present, unavailable-with-disclosure, or omitted-by-explicit-user-direction). Distinguish factual authority from structural authority: a past/example reference may authorize form, semantic organization, instructions, and style without authorizing any of its facts. Do not persist, serialize, count, hash, or script-validate the map.references/reference-citations-and-hyperlinks.md.Do not use required-unit or evidence ledgers, evidence-level classifications, archetype completeness budgets, document-mode contracts, typography exception ledgers, density-trigger ledgers, a draft-everything-then-compress workflow, or automatic depth based only on document category.
Use native smart chips whenever the connector supports them and the source contains the required semantic value. The following cases are mandatory, not optional polish:
dateElement with insertDate, including dates in prose, metadata fields, lists, and tables. Do not newly type a date as plain text. If the source does not identify the date precisely enough to produce a faithful timestamp, do not invent missing date components; preserve an existing ambiguous value or surface the ambiguity.carry forward, replace from source, or remove as example/project-specific content. Do not preserve a person merely to retain a chip count, and do not discard a reusable/current template contact merely because the task source omits them. When a relevant person name remains or is added and a verified email address is available, use a person chip with insertPerson. Use plain text only when no email is available, and never guess an address.richLink chip using insertRichLink. Keep descriptive context outside the chip rather than duplicating the raw URL.richLink chip using insertRichLink, including links in narrative text, tables, citations, source lists, and appendices. This applies to copied existing links as well as newly inserted links. Canonicalize every retained Workspace URI with scripts/canonicalize_google_workspace_url.mjs; replace relevant noncanonical rich links, remove irrelevant reference-era links, and use the canonical file URL without account-routing segments, share parameters, tab/range/heading/slide queries, or fragments. When a location-specific deep link is materially useful, keep the canonical file chip and add a separate readable ordinary hyperlink for that location. Never leave an ordinary Workspace hyperlink as the sole representation.For other supported Google resource URLs, prefer a richLink when it is convenient and improves scanning. Plan chip positions while composing the text skeleton, account for each chip's one-code-unit range, and verify the native element type and properties after writing. These requirements apply to direct-native, copied-template, existing-document, and post-import workflows. Read references/reference-smart-chips-and-building-blocks.md and the request examples in references/reference-direct-request-composition.md before the first chip write.
A result is incomplete if it silently omits an explicit requirement, requested source content, template/reference field, required link or figure, requested native structure, mandatory smart chip, or distinct functional section. Matching visible text is not enough when native semantics are required. These are content failures, not optional polish.
Unavailable information may remain visibly TBD or be disclosed only when the source truly lacks it. Preserve unsupported native structures by copy, use an explicitly approved fallback, or stop before destructive work. A shorter document is not automatically better.
Direct connector execution is the default. Do not use ad hoc code-mode bridges, subprocess connector writers, private Google RPCs, browser/UI writers, model-authored executable helpers, or google-docs-cm.
Resolve dropdown intent before the first write:
| Task | Route |
|---|---|
| No dropdown involvement | Direct connector |
| Preserve an existing dropdown | Direct connector with targeted preservation |
| Create a native dropdown | Checked-in Google Docs dropdown code mode |
| Replace dropdown options | Checked-in Google Docs dropdown code mode |
| Change selected value | Checked-in Google Docs dropdown code mode |
| Text/table edits plus dropdown mutation | Dropdown code mode owns every mutation |
| Required dropdown tools unavailable | Stop before exact mutation |
Exact mutation requires runtime discovery of both getDocumentDropdowns and updateDocumentDropdown. Public Docs batchUpdate cannot prove dropdown semantics. Once dropdown code mode is selected, do not switch writers mid-task.
For native copies, connector-created docs with content, existing-document edits, and post-import repairs:
tabId, and current revision where exposed.host/docs-trusted-read-file-bridge.mjs exactly as described in references/reference-trusted-read-wrapper.md. It persists the raw response, control inventory, machine-readable outline, and annotated model-readable text while returning automatic advisory control awareness. Do not transport the raw response with text() or apply_patch.document_text artifact, inspect controlAwareness, and record compact working notes for target ranges, nearby styles, table coordinates, native elements, revision, and preservation warnings. Read the raw result only when normalized artifacts omit a required field.references/reference-template-preservation-and-edit-scope.md.insertDate, insertPerson, or insertRichLink requests rather than emitting plain text or ordinary hyperlinks.batchUpdate request batch. Split large or fragile edits into verified batches.write_control.requiredRevisionId when a fresh revision should fail fast on collaborator conflicts.Do not rebuild an entire document to perform a targeted edit. If a native component cannot be safely preserved or verified, stop before destructive work and report the limitation.
Keep the target URL, document id, tab tree, active tabId, source materials, relevant readback, live ranges, write batches, and verification status current. Refresh state after document switches, source gathering, connector errors, or runtime resets.
For calendar-backed meeting-notes requests, read only references/reference-meeting-notes-direct.md unless the task adds tables, figures, citations, import/export, or other requirements. Use connector readback—not HTML or PDF—as the verification surface for this text-only path.
Before handoff, verify:
dateElement, person, or canonical richLink as applicable; copied relevant rich links are canonicalized, no ordinary Docs/Sheets/Slides hyperlink is the sole representation, each retained person chip passed the relevance decision, and relevant existing chips, native controls, and other native elements read back with the correct connector-visible semanticsRun feature-specific checks only for features used: evidence targets, template/reference semantic inventory, dropdown metadata, table-cell native lists, explicit global formatting, branded furniture, figures, or layout-sensitive rendering. Semantic reconciliation may reopen content scope to repair an omission; formatting repair may not unless it exposes one. During evaluation, classify repairs as prompt/content omission, source/template omission, native-structure fidelity, targeting, formatting, or pagination/layout.
Before writing, read only the references selected by the active route:
references/reference-native-create-direct.md.references/reference-native-create-direct.md and references/reference-direct-request-composition.md.references/reference-template-preservation-and-edit-scope.md before choosing a construction route; do not use DOCX-first import.references/reference-import-docx-to-native-docs.md; use task-specific references for requested shapes, evidence, or post-import repairs.references/reference-meeting-notes-direct.md.references/reference-direct-request-composition.md.references/reference-smart-chips-and-building-blocks.md and references/reference-direct-request-composition.md.scripts/canonicalize_google_workspace_url.mjs before insertRichLink.references/reference-trusted-read-wrapper.md; use the file-backed bridge for the initial full read, then continue on the selected direct or dropdown route.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-template-preservation-and-edit-scope.md and, when an explicit output form is requested, references/reference-request-shapes-and-write-safety.md.references/reference-citations-and-hyperlinks.md.references/reference-smart-chips-and-building-blocks.md.references/reference-dropdown-code-mode.md, references/reference-template-preservation-and-edit-scope.md, and references/reference-smart-chips-and-building-blocks.md.references/reference-response-and-list-format.md and references/reference-table-formatting-deep-dive.md.references/reference-request-shapes-and-write-safety.md and references/reference-table-formatting-deep-dive.md.references/reference-section-completeness-and-final-pass.md and references/reference-pdf-export-visual-qa.md before handoff.Do not bulk-read the reference folder. Do not execute content writes until route-required references are read in the current turn.
tabId before writes.get_document when styles, lists, tables, chips, tabs, headers, footers, or native controls matter; use targeted reads only for simple unambiguous text.get_tables before table creation, population, list-in-cell work, or global table formatting.| Task area | Reference |
|---|---|
| Blank/basic native creation | references/reference-native-create-direct.md |
| Runtime attachment and recovery | references/reference-connector-runtime-and-safety.md |
| File-backed trusted read, automatic control awareness, and normalized document content | references/reference-trusted-read-wrapper.md |
| DOCX import without a constraining Google Doc template/reference | references/reference-import-docx-to-native-docs.md |
| Target confirmation | references/reference-foreground-guard.md |
| Request shapes and range safety | references/reference-request-shapes-and-write-safety.md |
| Direct request examples and supported chips | references/reference-direct-request-composition.md |
| Headings and question formatting | references/reference-headings-and-question-format.md |
| Lists, including lists inside table cells | references/reference-response-and-list-format.md |
| Citations and hyperlinks | references/reference-citations-and-hyperlinks.md |
| Template and edit-surface preservation | references/reference-template-preservation-and-edit-scope.md |
| Chips, dropdown preservation, and building blocks | references/reference-smart-chips-and-building-blocks.md |
| Exact dropdown mutation | references/reference-dropdown-code-mode.md |
| Tables and explicit global table formatting | references/reference-table-formatting-deep-dive.md |
| Figures and images | references/reference-figures-and-image-insertion.md |
| Final structural and visual QA | references/reference-section-completeness-and-final-pass.md |
| Native PDF visual QA | references/reference-pdf-export-visual-qa.md |
openai/plugins
0722921
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.