Skip to content

docs(skills): guide agents to use Sheets/Docs/Slides APIs for content creation#706

Open
nuthalapativarun wants to merge 3 commits intogoogleworkspace:mainfrom
nuthalapativarun:docs/drive-skill-content-creation-guidance
Open

docs(skills): guide agents to use Sheets/Docs/Slides APIs for content creation#706
nuthalapativarun wants to merge 3 commits intogoogleworkspace:mainfrom
nuthalapativarun:docs/drive-skill-content-creation-guidance

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Problem

When an AI agent needs to create a Google Sheet, Slides presentation, or Doc, it loads gws-drive and calls drive files create with 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.md immediately after the Helper Commands table. The section:

  • Warns that drive files create with a Google MIME type produces an empty shell
  • Provides a lookup table mapping the goal to the correct gws command
  • Clarifies when drive files create is the right tool (binary/non-Google file types, folders)

Fixes #566

… 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-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 12, 2026

🦋 Changeset detected

Latest commit: efe89a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Patch

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

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Documentation Update: Added a new 'Content Creation Guidance' section to the gws-drive skill documentation.
  • Agent Guidance: Provided a clear mapping table to direct agents toward service-specific APIs (Sheets, Docs, Slides) instead of the generic Drive API for content creation.
  • Best Practices: Clarified the appropriate use cases for 'drive files create', restricting it to binary files and folder creation.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@googleworkspace-bot
Copy link
Copy Markdown
Collaborator

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@googleworkspace-bot
Copy link
Copy Markdown
Collaborator

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drive SKILL.md doesn't guide agents to use Sheets/Docs APIs for content creation

2 participants