/documents:google-workspacefrom Documents
Read this before the first Google Drive, Docs, Sheets or Slides connector call whenever the task creates or changes a Google file. Use this skill whenever the user wants to create or change a Google Doc, Sheet or Slides file in their Google Drive. Triggers include: a request that names Google Docs, Sheets, Slides or Drive and asks to make, edit, format, copy or rename a file; a docs.google.com link with a request to change that file, even a one-line fix or suggested edits; and any follow-up change to a Google file from earlier in the chat, even "change it" or "add a tab". Includes helper scripts for document positions, cell ranges and slide layout. However, if the user asks for a doc, deck or spreadsheet without naming Google, or gives a Google file only as source material for something new, use Claude's own output type instead. Do NOT use for read-only questions about a Google file, or for Word, Excel, PowerPoint or PDF files.
Ships in Documents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The Google connectors are thin wrappers over Google's raw APIs, with almost no guidance of their own. This skill supplies that guidance: which connector does what, the rules that keep edits in the user's file, and, in one reference file per app, how each API really behaves. Most of the app-specific rules in the references were tested against Google's Docs, Sheets and Slides APIs; the rest were seen through the connectors, and a few have not been checked yet.
| Working on | Read first | Why it matters |
|---|---|---|
| A Google Doc | references/docs.md | Docs edits address UTF-16 positions that shift after every insert and go stale after every write. Tabs and pending suggestions change the positions too. |
| A Google Sheet | references/sheets.md | Both write tools parse input like the Sheets UI, so text can silently become numbers or dates. Formatting needs numeric sheet IDs, 0-based ranges, and field masks without parentheses. |
| A Google Slides deck | references/slides.md | Positions are in EMU, an element's real size is its size times its scale, and an unmasked read can exceed 150 KB for three slides. Slides never shrinks text to fit. |
Read the reference for every app the task touches before the first edit. Embedding a Sheets chart in a deck means reading both. The references are short, and skipping one is how edits land in the wrong place.
| Connector | What it can do |
|---|---|
| Google Drive | Create files, upload and convert content, rename, read a file as text, export (PDF and other formats), search, trash |
| Google Docs | Read a doc's full structure and edit it in place, directly or as suggestions |
| Google Sheets | Read values and structure, write values and formulas, format, add tabs and charts |
| Google Slides | Read a deck, add and edit slides, shapes, text, tables, and linked charts |
Drive can create all three file types. It can't edit a file after that. Without the matching editor connector, every change means a new file and a new link, and the user loses the link they already have.
Example: "I can create the sheet now. If you want changes later, turn on the Google Sheets connector in this chat first. Then I can edit this file, and the link will stay the same."
writeControl.requiredRevisionId set to the revisionId from a read taken after your last write, including batches built on IDs or positions from your own earlier writes. The only exception is a batch made entirely of replaceAllText requests, even one limited to some tabs or slides. If the file changed since that read, whether from your own write or someone else's, Google rejects the whole batch instead of applying it at stale positions or IDs. Read again before each guarded batch, and don't reuse a revision ID from a write reply. On a rejection, read again and rebuild; never drop the guard. read_doc and read_presentation (the mask in references/slides.md includes it) return the ID. read_slide_page returns it only if its mask includes revisionId; read_slide_page_thumbnail and Drive read_file_content never do. For a saved read, the first line of docs_index.py outline or slides_helper.py outline shows it; if that line says None, read again with read_doc or read_presentation. get_spreadsheet returns a revisionId even with a field mask, but don't send it: send Sheets writes without writeControl, and read again right before a write that depends on positions.get_spreadsheet's fields list (["spreadsheetId", "sheets.properties"]), and comma-separated in a batch update request's fields string ("userEnteredFormat.numberFormat,userEnteredFormat.textFormat.bold").update_file. A rename keeps the same link.create_file with contentMimeType set to application/vnd.google-apps.document, .spreadsheet, or .presentation creates an empty file. Uploading content with a source type (HTML, CSV, .xlsx, .pptx) converts it into the matching Google type. Each reference says which route fits that app.read_file_content returns a compact text rendering: Markdown for a Doc. It is a few KB where the editor connector's full read can be over 100 KB, so use it to understand content, then use the editor read when you need positions.download_file_content with exportMimeType: "application/pdf" returns the rendered file as base64. It is large (about 65 KB of text for a four-slide deck), so export only for a visual check, and only where you can run code.The scripts/ folder next to this file holds tested helpers. They turn the APIs' raw JSON into short readable summaries, and turn simple specs into correct request batches, so the error-prone arithmetic never happens by hand. Use them wherever you can run Python. Run them by their full path inside this skill's folder; the references write that folder as <skill>.
| Script | Commands | Used for |
|---|---|---|
docs_index.py | outline, find, new-table, fill-table | Docs positions, text search with bold and suggestion state, adding a filled table in one call, filling an existing table |
sheets_helper.py | range, format, cells | A1 ranges to grid ranges, formatting batches from a short spec, reading formulas and error cells |
slides_helper.py | outline, build | Real slide geometry with overflow and overlap warnings, building slides from an inch-based spec |
render_export.py | one command | Decoding a PDF export into page images to look at |
Getting JSON to a script. Large tool results are often saved to a file by the app, and the result tells you the path. Point the script at that path; the scripts read the file as the app saved it. When a result comes back in context and is small (a few KB, such as a masked read or sheet metadata), write it to a file and run the script on it. Don't re-type a large result into a file: that doubles the cost and invites copying errors. If a large result was cut off and not saved, read a smaller slice instead (a field mask, a range, or one tab) rather than guessing.
Every script prints --help with its full usage. Each reference shows the commands in context.
| Symptom | Cause | Fix |
|---|---|---|
| "No such tool available" | The tool is deferred, or the name is different on this surface | Search for and load the tool. Use the exact name your surface lists. |
| Permission denied on a file you created | The file is in the trash | Ask the user to restore it from Drive's trash. You can't restore it with the connectors. |
| 400: required revision ID does not match | The file changed after your read: your own previous write, or someone else editing | Read again, rebuild the requests from the new read, and send them with the new revision. For Sheets, send them without writeControl. |
| A whole batch failed on one bad request | Batches are atomic | Fix the named request and resend the full batch. Nothing from the failed call was applied. |
| A read is too large or cut off | Unmasked editor reads include everything | Use Drive read_file_content, a field mask, a range, or a single tab. Run the helper on a saved result. |
| Two files where the user expected one | An edit was done by creating a new file | Make changes in place with the editor connector. Tell the user about the extra file; don't trash it without asking. |
Each reference ends with the failures specific to that app.
When a request runs into one of these, say so plainly and do the alternative. Reported: seen through the connectors or in their tool schemas. Untested: not yet checked.
read_doc has returned no comments even with commentsIncluded: true. To read comments, use Drive read_file_content with includeComments: true, or ask the user to paste them. update_doc has accepted insertComment in one report, although its description is cut before listing it; if that request fails, say you can't add comments and offer to list your notes in the reply. Reported.references/docs.md). Reported.update_doc, update_spreadsheet and update_presentation descriptions stop partway through their request lists. Requests missing from the description, such as addDocumentTab and addChart, have still worked, so try one before deciding it isn't supported. Reported.create_file takes the whole file as text or base64, so an .xlsx or .pptx upload is slow and often fails. Build in the file with the editor connectors where you can, and keep uploads small. Reported.createImage and Docs insertInlineImage fetch the image from a URL Google can reach; a file from the chat can't be inserted this way. For a deck, offer the .pptx route; otherwise ask the user to insert the image. Untested.addChart, then embed it with createSheetsChart. Reported.title, not name. name contains '…' fails with "Unsupported query field: name"; write title contains '…', and put the file type in a mimeType clause. Reported.references/charts.md (opens in a new tab)references/docs.md (opens in a new tab)references/sheets.md (opens in a new tab)references/slides.md (opens in a new tab)scripts/docs_index.py (opens in a new tab)scripts/render_export.py (opens in a new tab)scripts/sheets_helper.py (opens in a new tab)scripts/slides_helper.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/doc-coauthoringGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks./docsdocs (editable docs people share and comment on; the default for any document, named as a doc or not: a document, report, proposal, resume, cover letter, letter, contract, policy, form, template, worksheet, essay, handbook, guide, how-to, cheat sheet, SOP or other writing to keep, share, collaborate on, send, submit, print or sign; a doc exports to Word, PDF, Markdown or Google Docs, so needing a file to send, attach, upload, submit or print is no reason to pick Word, and a file nobody asked for is a doc, not Word; a plan, comparison, summary or notes asked in chat stays in chat; a pasted claude.ai artifact link may be a doc: check with docs tools first; Word or another file format named, tracked changes wanted, or a .docx to change or use as a template → that format's skill): making one → if no docs-connector instructions are in context, call its `guide` (topic.instructions) first; then create the doc (headings only, no body) before any search, file read or plan, even with files attached.npx claudepluginhub majabri/claudeskills --plugin documents