Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions plugins/google-drive/skills/google-docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Documents-first net-new Google Docs creation plus connector-first G
# Google Docs

Use this skill for Google Docs work in Codex local-plugin sessions where Browser Use and rendered visual inspection are unavailable.
Net-new Google Doc deliverables must be authored through `[@documents](plugin://documents@openai-primary-runtime)` as local `.docx` files first, then uploaded as native Google Docs.
Net-new Google Doc deliverables must be authored through `[@documents](plugin://documents@openai-primary-runtime)` as local `.docx` files first, then imported with the Google Drive plugin as native Google Docs.

## Purpose Of This File

Expand All @@ -22,10 +22,13 @@ Latency is not a constraint for this skill, so always read the relevant referenc

Use this routing:

1. Net-new Google Docs creation: use `[@documents](plugin://documents@openai-primary-runtime)` to create a local `.docx` first, including that skill's DOCX QA workflow.
2. Upload and convert the `.docx` into Drive as a native Google Docs document. Read `references/reference-import-docx-to-native-docs.md`.
3. If the Documents plugin is unavailable, do not create the net-new Google Doc directly. Report that the required local Documents authoring path is unavailable.
4. Existing Google Docs reads, summaries, edits, comments, and template-preserving modifications: use Google Docs connector or app tools directly.
1. Net-new Google Docs creation: use `[@documents](plugin://documents@openai-primary-runtime)` to create a local `.docx` first, including that skill's DOCX QA workflow. 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"`.
2. If the Documents plugin is unavailable, do not create the net-new Google Doc directly. Report that the required local Documents authoring path is unavailable.
3. Existing Google Docs reads, summaries, edits, comments, and template-preserving modifications: use Google Docs connector or app tools directly.

For net-new Google Docs, the DOCX-import path is the only currently supported high-quality workflow. Do not create a blank Google Doc and fill it with Google Docs write APIs, use Computer Use, use Browser Use, or build the document directly in Google Drive unless the user explicitly asks for that alternate workflow. If they do, mention first that output quality is expected to be best when a local `.docx` is imported through the Google Drive plugin.

The import reference owns the exact connector action, plugin install/reinstall handling, native-conversion verification, and connector-readback expectations. Read it before any net-new Google Docs import attempt.

Do not reference the local `.docx` in the final answer after successful native import. The final answer includes the Google Docs link only.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,35 @@ For new Google Docs creation, create the local document with the `[@documents](p

## Native Conversion

Use native Google Docs conversion by default.
For `.docx` inputs, the blessed path is the Google Drive upload tool with `mime_type: "application/vnd.google-apps.document"`. Do not preserve the source file type unless the user explicitly asks to keep a Word file in Drive without converting it.
Use native Google Docs conversion by default. For `.docx` inputs, the blessed path is the Google Drive plugin document import action, `mcp__codex_apps__google_drive_import_document`, with `upload_mode: "native_google_docs"`. This wraps the Google Drive API v3 `files.create` upload-conversion path by creating the file with the target Google Workspace MIME type `application/vnd.google-apps.document`. Do not preserve the source file type unless the user explicitly asks to keep a Word file in Drive without converting it.

Before import, confirm the Google Drive plugin exposes `mcp__codex_apps__google_drive_import_document`. If the Google Drive plugin is not installed or unavailable, use the plugin-install/user-elicitation flow to ask the user to install `google-drive@openai-curated`. If the plugin is available but the import action is missing, ask the user to reinstall or refresh the Google Drive plugin.

Steps:

1. Confirm the local source path is an absolute path to a `.docx` file.
2. Upload the file with the Google Drive connector upload tool:
2. Import the file with the Google Drive connector document import action:

```json
{
"file_uri": "/absolute/path/to/document.docx",
"file_name": "Desired Google Doc title.docx",
"mime_type": "application/vnd.google-apps.document"
"source_file": "/absolute/path/to/document.docx",
"title": "Desired Google Doc title",
"upload_mode": "native_google_docs"
}
```

3. Use the connector function exposed in the current runtime, for example `mcp__codex_apps__google_drive._upload_file(...)` or the equivalent Google Drive upload tool.
4. Verify the upload response reports native conversion with `mime_type: "application/vnd.google-apps.document"` and a Google Docs URL or document id.
5. If the desired Google Doc title should not include `.docx`, rename the native Google Doc with `mcp__codex_apps__google_drive._update_file(...)` or the equivalent Drive metadata update tool after upload.
3. Use the connector function exposed in the current runtime: `mcp__codex_apps__google_drive_import_document(...)`.
4. Verify the import response reports native conversion with MIME type `application/vnd.google-apps.document` and a Google Docs URL or document id.
5. If the desired Google Doc title needs adjustment after import, rename the native Google Doc with `mcp__codex_apps__google_drive_update_file(...)` or the equivalent Drive metadata update tool after upload.
6. Read the imported document with the Google Docs connector and verify that core headings, body text, tables, and other connector-visible content survived conversion.

## Preservation Mode

Only use a non-native upload when the user explicitly asks to preserve the Word file, keep the source `.docx`, or avoid conversion.

For that explicit preservation request, use the connector upload tool without `mime_type: "application/vnd.google-apps.document"` and make clear that the result is a Drive-hosted Word file, not a native Google Doc.
For that explicit preservation request, use `_import_document` with
`upload_mode: "keep_source_file_type"` and make clear that the result is a
Drive-hosted Word file, not a native Google Doc.

## Final Answer

Expand Down
8 changes: 4 additions & 4 deletions plugins/google-drive/skills/google-drive/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ Start with Google Drive for file discovery and file lifecycle tasks, then route
- Deck -> Slides skill
- If the user wants to find a file and then edit it, do both in one flow: Drive for discovery, then the file-type skill for the edit.
- If the user wants a Google Workspace outcome but has not named a file type yet, start with Drive discovery instead of asking them to choose among separate Google plugins.
- If the user asks to create a new Google Doc, route to the Docs skill. The Docs skill must use `[@documents](plugin://documents@openai-primary-runtime)` to create a local `.docx`, then upload and convert it as a native Google Doc.
- If the user asks to import a local `.docx` into Google Docs, route to the Docs skill and use native Google Docs conversion by default. Preserve the source file type only when the user explicitly asks for that.
- If the user asks to create a new Google Doc, route to the Docs skill; it owns the mandatory local `.docx` -> native Google Docs import workflow and the explicit-user-override boundary. Do not create a blank Google Doc directly from this router.
- If the user asks to import a local `.docx` into Google Docs, route to the Docs skill and use its native conversion workflow. Preserve the source file type only when the user explicitly asks for that.
- If the user asks to create a new Google Sheet, route to the Sheets skill. The Sheets skill should prefer the `[@spreadsheets](plugin://spreadsheets@openai-primary-runtime)` plugin or `$Excel` skill to create a local `.xlsx`, then import it as native Google Sheets.
- If the user asks to import a local `.xlsx`, `.xls`, `.ods`, `.csv`, or `.tsv` into Google Sheets, route to the Sheets skill and use native Google Sheets conversion by default. Preserve the source file type only when the user explicitly asks for that.
- If the user asks to create a new Google Slides deck, route to the Slides skill. The Slides skill should prefer the `[@presentations](plugin://presentations@openai-primary-runtime)` plugin or `$PowerPoint` skill to create a local `.pptx`, then import it as native Google Slides.
- If the user asks to import a local `.ppt`, `.pptx`, or `.odp` into Google Slides, route to the Slides skill and use native Google Slides conversion by default.
- If the user asks to create a new Google Slides deck, route to the Slides skill; it owns the mandatory local `.pptx` -> native Google Slides import workflow and the explicit-user-override boundary. Do not create a blank Google Slides deck directly from this router.
- If the user asks to import a local `.ppt`, `.pptx`, or `.odp` into Google Slides, route to the Slides skill and use its native conversion workflow. Preserve the source file type only when the user explicitly asks for that.

## Write Safety

Expand Down
15 changes: 9 additions & 6 deletions plugins/google-drive/skills/google-slides/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ Latency is not a constraint for this skill, so always read the relevant referenc

Unless the user asks otherwise:

1. New Google Slides deck: first check whether the `[@presentations](plugin://presentations@openai-primary-runtime)` plugin or the `$PowerPoint` skill is installed.
2. If either is installed, YOU MUST use `[@presentations](plugin://presentations@openai-primary-runtime)` or `$PowerPoint` to create a local `.pptx`, then import it into Drive as a native Google Slides presentation with `mcp__codex_apps__google_drive_import_presentation` using `upload_mode: "native_google_slides"`.
3. If neither skill is installed, create the deck directly with Google Slides MCP.
4. Existing Google Slides edit: use Google Slides MCP directly.
1. Net-new Google Slides deck: use `[@presentations](plugin://presentations@openai-primary-runtime)` to create a local `.pptx` first. Then read `references/reference-import-presentation.md` and import with `mcp__codex_apps__google_drive_import_presentation` using `upload_mode: "native_google_slides"`.
2. If the Presentations plugin is unavailable, do not create the net-new Google Slides deck directly. Report that the required local Presentations authoring path is unavailable.
3. Existing Google Slides reads, summaries, edits, comments, and template-preserving modifications: use Google Slides connector or app tools directly.

For net-new Google Slides, the PPTX-import path is the only currently supported high-quality workflow. Do not create a blank Google Slides deck and fill it with Google Slides write APIs, use Computer Use, use Browser Use, or build the deck directly in Google Drive unless the user explicitly asks for that alternate workflow. If they do, mention first that output quality is expected to be best when a local `.pptx` is imported through the Google Drive plugin.

The import reference owns the exact connector action, plugin install/reinstall handling, native-conversion verification, post-import verification, and cleanup expectations. Read it before any net-new Google Slides import attempt.

## Non-Negotiable Output Invariant

Inserted or edited content must match the target deck's existing structure and connector-observable presentation closely enough that it reads as native deck content.
Treat wrong target deck, wrong slide, stale object IDs, missing chart updates, leftover placeholder text, clipped text, broken slide order, or unverified visible layout changes as failed output that must be corrected before handoff.

For Slides batch updates, API success is not completion. A fresh post-write LARGE thumbnail and examining the image by curling it is required for every touched slide. You MUST curl the image after requesting thumbnail. No skip.
If the `[@presentations](plugin://presentations@openai-primary-runtime)` plugin or the `$PowerPoint` skill is installed, you MUST use one of them to create a local `.pptx` and import it to Google Drive with `upload_mode: "native_google_slides"`.
For net-new Google Slides, create a local `.pptx` with `[@presentations](plugin://presentations@openai-primary-runtime)` and import it to Google Drive with `upload_mode: "native_google_slides"`.

## Canonical Workflow Bias

Expand Down Expand Up @@ -105,7 +108,7 @@ Before any content write or edit operation:
7. If the task spans multiple categories, read all matching files.
8. If uncertain, read every file in `references/`.

For net-new local `.pptx` creation, if Default Routing uses `[@presentations](plugin://presentations@openai-primary-runtime)` or `$PowerPoint`, read the selected authoring skill before creating the deck.
For net-new local `.pptx` creation, read the `[@presentations](plugin://presentations@openai-primary-runtime)` authoring skill before creating the deck.

Do not execute content edits until the required references are read in the current turn.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,34 @@ When to read: local `.ppt`, `.pptx`, or `.odp` input.
## Workflow

1. Confirm the input file is a supported presentation file.
2. Use `mcp__codex_apps__google_drive_import_presentation` with `upload_mode: "native_google_slides"` to create a native Google Slides deck:
2. Before import, confirm the Google Drive plugin exposes `mcp__codex_apps__google_drive_import_presentation`. If the Google Drive plugin is not installed or unavailable, use the plugin-install/user-elicitation flow to ask the user to install `google-drive@openai-curated`. If the plugin is available but the import action is missing, ask the user to reinstall or refresh the Google Drive plugin.
3. Use `mcp__codex_apps__google_drive_import_presentation` with `upload_mode: "native_google_slides"` to create a native Google Slides deck:
```json
{
"source_file": "/absolute/path/to/deck.pptx",
"title": "Deck title",
"upload_mode": "native_google_slides"
}
```
3. Read the imported deck and record presentation id, title, URL when available, slide count, and major slide titles.
4. Read Drive metadata for the imported file and confirm MIME type is `application/vnd.google-apps.presentation`.
5. Compare imported slide count to the source count when available.
6. Run thumbnail verification for the imported deck before follow-on edits.
7. Continue in this skill with the relevant references for summaries, content edits, visual cleanup, template migration, or structural repair.
4. Read the imported deck and record presentation id, title, URL when available, slide count, and major slide titles.
5. Read Drive metadata for the imported file and confirm MIME type is `application/vnd.google-apps.presentation`.
6. Compare imported slide count to the source count when available.
7. Run thumbnail verification for the imported deck before follow-on edits.
8. Continue in this skill with the relevant references for summaries, content edits, visual cleanup, template migration, or structural repair.

## Rules

- Treat import as conversion into a new native Google Slides deck.
- Preserve source slide order and content by default.
- Do not use generic `_upload_file` for "upload as Google Slides"; it preserves `.pptx` instead of converting to native Slides.
- Do not substitute Computer Use, Browser Use, blank-Google-Slides creation followed by Google Slides write APIs, or another direct-to-Slides construction path for net-new Google Slides unless the user explicitly asks for that alternate workflow. If they do, mention first that output quality is expected to be best with this local `.pptx` import path.
- Do not promise perfect fidelity for Office-specific animations, transitions, SmartArt, or effects.
- If import introduces layout drift, fix the native Google Slides deck rather than editing the source file.

## Preservation Mode

Only use a non-native upload when the user explicitly asks to preserve the PowerPoint file, keep the source `.pptx`, or avoid conversion. For that explicit preservation request, use `_import_presentation` with `upload_mode: "keep_source_file_type"` and make clear that the result is a Drive-hosted PowerPoint file, not a native Google Slides deck.

## Output

Return the imported deck title and link or id when available, note any obvious import drift, and name the follow-on workflow used if more work was requested.