docs(skills): guide agents to use Sheets/Docs/Slides APIs for content creation#706
Conversation
… creation Drive files create with a Google MIME type creates an empty shell; the Sheets, Docs, and Slides APIs must be used to set cell values or document content. Adds a Content Creation Guidance section to the gws-drive skill so agents pick the correct API automatically. Fixes googleworkspace#566
🦋 Changeset detectedLatest commit: efe89a1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the documentation for the gws-drive skill to prevent AI agents from creating empty, unusable files. By explicitly guiding agents to use the correct service-specific APIs for Sheets, Docs, and Slides, it ensures that content is correctly initialized rather than resulting in empty file shells. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces content creation guidance to the Google Drive skill documentation to prevent data loss when creating Google Workspace files. The review feedback correctly identifies that the suggested alternative commands for Docs and Slides also create empty files, and recommends updating the descriptions to avoid misleading AI agents.
docs documents create and slides presentations create also create blank files; any content in the request body is ignored by those APIs. Update the table to show the two-step pattern (create → batchUpdate) and add a note clarifying that content must be inserted via a separate batchUpdate call.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds a new 'Content Creation Guidance' section to the Google Drive skill documentation and includes a corresponding changeset. The guidance clarifies that the Drive API creates empty shells for Google-native MIME types and directs users to use service-specific APIs (Sheets, Docs, Slides) for content population. A review comment pointed out that describing these files as 'unreachable' is inaccurate and could confuse AI agents, suggesting a change to simply describe them as 'empty shells'.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the Google Workspace Drive skill documentation and adds a corresponding changeset to provide guidance on content creation. It clarifies that using drive files create for Google Sheets, Docs, or Slides results in empty files and instructs users to use the specific service APIs for creating and populating content. I have no feedback to provide as there were no review comments.
Problem
When an AI agent needs to create a Google Sheet, Slides presentation, or Doc, it loads
gws-driveand callsdrive files createwith the appropriate MIME type. This creates an empty file shell — the Drive API cannot set cell values, document text, or slide content. The correct approach is to use the service-specific APIs (sheets spreadsheets create,docs documents create,slides presentations create), but nothing in the Drive skill mentions this.Agents pick Drive because it's the first skill that looks relevant for "create a file", and silently produce empty files.
Solution
Adds a Content Creation Guidance section to
skills/gws-drive/SKILL.mdimmediately after the Helper Commands table. The section:drive files createwith a Google MIME type produces an empty shellgwscommanddrive files createis the right tool (binary/non-Google file types, folders)Fixes #566