google-docs
Skill9 starsChanged 4 days agoMITView on GitHub
This skill should be used when the user asks to read, create, or edit Google Docs documents, or manage document content through the Google Docs and Drive APIs. This skill should also be used when the user asks to import a PPTX deck into Google Slides.
We split this skill into the rules it gives an agent
11 rules. 0 are common, 3 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Read, create, and edit Google Docs using the Google Docs API with a selected Google account.
- Very specific: line 11
IMPORTANT: User approval required for all writes: Before any create, update, append, or move action, show the planned content first and …
- Very specific: line 31
If the refresh token is invalid or revoked, follow Add or Re-Authorize an Account in the google-oauth skill: skills/google-oauth/SKILL.md.
- Distinctive: line 41
After a successful create, return the editor URL:
- Distinctive: line 45
If you need explicit folder placement, use the Drive API instead.
- Very specific: line 57
Use documents.batchUpdate with insertText requests:
- Very specific: line 68
After inserting text, use updateParagraphStyle and updateTextStyle in the same batchUpdate to apply formatting.
- Very specific: line 96
Use fields to specify which style properties to update (e.g.
- Very specific: line 104
create a Google Doc with mimeType: application/vnd.google-apps.document and parents: ["FOLDER_ID"]
- Very specific: line 107
Use google.docs_default_folder_id only for the default account, and use Drive API placement only after the write plan is approved.
- Very specific: line 130
After approval, create or update via Docs API, and use Drive API only when folder placement or moving is required.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Docs
Read, create, and edit Google Docs using the Google Docs API with a selected Google account.
IMPORTANT: User approval required for all writes. Before any create, update, append, or move action, show the planned content first and wait for explicit take off approval. Do not mutate anything before that approval.
Configuration
The shared Google credential configuration is defined once in the google-oauth skill: skills/google-oauth/SKILL.md.
The google section can set docs_default_folder_id for the default account.
API Reference
Send every Google API request through charliebot google request.
The command mints the selected account's access token inside its own process, so the token never appears in a command, in the output or in a run record.
A JSON body goes in --json, which sets Content-Type: application/json; --data-file <path> reads the body from a file instead.
The command prints the response body on stdout and exits 0 for an HTTP 2xx answer; another status exits 1.
Choose the Account
Choose the account using the Accounts section in the google-oauth skill.
Pass --account <name> on every request, and omit --account for the default account.
If the refresh token is invalid or revoked, follow Add or Re-Authorize an Account in the google-oauth skill: skills/google-oauth/SKILL.md.
Create a Google Doc
Docs API create defaults to the user's root folder:
charliebot google request POST https://docs.googleapis.com/v1/documents --json '{"title":"Document Title"}'After a successful create, return the editor URL:
https://docs.google.com/document/d/{documentId}/edit
If you need explicit folder placement, use the Drive API instead. Docs API create does not place the doc into a chosen folder.
Read a Document
charliebot google request GET "https://docs.googleapis.com/v1/documents/DOCUMENT_ID"To turn documents.get JSON into readable plain text, walk body.content[], then each paragraph.elements[], and concatenate any textRun.content values. Preserve paragraph breaks when a paragraph ends; ignore non-paragraph structural elements unless you need tables, headers, or footnotes.
Append or Write Content
Use documents.batchUpdate with insertText requests:
charliebot google request POST "https://docs.googleapis.com/v1/documents/DOCUMENT_ID:batchUpdate" \
--json '{"requests":[{"insertText":{"location":{"index":1},"text":"Hello, world\n"}}]}'For appending to an existing doc, fetch the current document first and insert at the last body endIndex - 1. For a freshly created empty doc, index: 1 is the usual insertion point.
Formatting Content
After inserting text, use updateParagraphStyle and updateTextStyle in the same batchUpdate to apply formatting. Requests are applied in order, so insert text first, then style it.
Headings — set a paragraph's named style (HEADING_1 through HEADING_6, or NORMAL_TEXT):
{
"updateParagraphStyle": {
"range": { "startIndex": 1, "endIndex": 25 },
"paragraphStyle": { "namedStyleType": "HEADING_1" },
"fields": "namedStyleType"
}
}Bold / Italic — set text style on a character range:
{
"updateTextStyle": {
"range": { "startIndex": 1, "endIndex": 25 },
"textStyle": { "bold": true },
"fields": "bold"
}
}Practical tips:
- Indices refer to the document state after all preceding requests in the same batch. Insert text first, then style it in the same
batchUpdatecall. - Use
fieldsto specify which style properties to update (e.g."bold","namedStyleType","bold,italic"). Omittingfieldsclears unset properties. - To find the correct index range for inserted text: if you insert N characters at index I, the text occupies
[I, I+N).
Folder Behavior
documents.createalways creates in root.- To create directly inside a folder or move a document later, use the Drive API.
- Typical Drive operations:
- create a Google Doc with
mimeType: application/vnd.google-apps.documentandparents: ["FOLDER_ID"] - move an existing doc with
files.update(addParents=..., removeParents=...)
- create a Google Doc with
Use google.docs_default_folder_id only for the default account, and use Drive API placement only after the write plan is approved.
For another account, create the document in that account's Drive root and state the location in the write draft.
Import a PPTX as Google Slides
Upload a PPTX with conversion to Google Slides, then check these known effects:
- Conversion replaces fonts that Google does not host (Microsoft YaHei and Courier New are common casualties): name Google Fonts families in the deck, for example Noto Sans SC for CJK text and Roboto Mono for code. Verify by exporting to PDF and listing the embedded fonts.
- Full-width punctuation directly followed by a Latin word is treated as unbreakable and wraps to the next line's start. Insert a plain space after the punctuation.
- Speaker notes survive the import.
- The PDF export takes each paragraph-end mark's font from that paragraph's
a:endParaRPr, which overrides the theme or table default. Give every paragraph ana:endParaRPrwith its last run's typeface and size. - Assert at build time that every text box lies inside the slide. A box that crosses the slide edge keeps its unwrapped line, so the page clips text that a box-local line check passes.
Bootstrap / Re-Authorization
Choose an account in the Accounts section and follow Add or Re-Authorize an Account in the google-oauth skill: skills/google-oauth/SKILL.md.
Workflow
- Choose the account that matches the request using the Accounts section in the google-oauth skill.
- Send each request with
charliebot google request <METHOD> <URL> [--json <body>] --account <name>. Omit--accountfor the default account. - For reads, call
documents.getand convert paragraph text runs to plain text when you only need readable content. - For writes, show the exact planned content first and wait for explicit
take offapproval. - After approval, create or update via Docs API, and use Drive API only when folder placement or moving is required. After a successful create, return
https://docs.google.com/document/d/{documentId}/edit.
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- openai/plugins★ 7.4ksame name
- Lilac-Labs/gini-agent★ 1.9ksame name
- Open-Curiosity/gini-agent★ 1.9ksame name
- gemini-cli-extensions/workspace★ 646same name
- sanjay3290/ai-skills★ 424same name
- refly-ai/refly-skills★ 203same name
- AceDataCloud/Skills★ 17same name
- danielkwapien/google-docs-skill★ 10same name
- pbc-os/smb-starter-kit★ 10same name
- flopperj/dotfiles-core★ 3same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use google-chat, google-calendar and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
pbc-osSkillgoogle-chat
Google Chat messaging for small business teams. Send messages, post automated updates, manage spaces, run daily standups, and coordinate your team. Built on the gws CLI.
Also in 3 projects that use this
younghaiSkillgoogle-calendar
Google Calendar 일정 조회, 검색, 등록. "일정", "스케줄", "캘린더" 등을 언급하면 자동 실행. Daily Note 작성, Weekly Review에 사용.
Also in 7 projects that use this
ElasticSkillcreate-skill
Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.
Also in 3 projects that use this
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- charliebotSkill
- claude-versionSkill
- cli-tool-trapsSkill
- feishuSkill
- file-serverSkill
- gmailSkill
- google-oauthSkill
- google-sheetsSkill
- improve-goalSkill
- improve-workerSkill
- language-portSkill
- linearSkill
- llm-context-guidelineSkill
- perfettoSkill
- plan-approvalSkill
- pytorch-gpu-trainingSkill
- skill-managementSkill
- slackSkill
- voice-notesSkill
- writing-styleSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

