Google Docs
SkillDev toolsRead, create, and edit the user's Google Docs.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Google Docs skill
What this skill tells your AI
The instructions your AI receives, as published by win4r/museai-skills in opt/hatch/skills/google-docs/SKILL.md and read by ahel’s review.
Purpose
Manage Google Docs through hatch_gws_cli; the vendored Google Workspace CLI is the only implementation path.
Tooling
Use exec to run:
hatch_gws_cli docs <resource> <method> [flags]
Connection management
hatch_gws_cli docs status
hatch_gws_cli docs disconnect
Docs operations
Core patterns:
hatch_gws_cli docs statushatch_gws_cli docs disconnecthatch_gws_cli schema docs.documents.gethatch_gws_cli schema docs.documents.createhatch_gws_cli schema docs.documents.batchUpdate
Common raw API calls:
hatch_gws_cli docs documents get --params '{"documentId":"<document_id>"}'hatch_gws_cli docs documents create --json '{"title":"Project Brief"}'hatch_gws_cli docs documents batchUpdate --params '{"documentId":"<document_id>"}' --json '{"requests":[{"insertText":{"location":{"index":1},"text":"Hello, world!"}}]}'
Vendored helpers are also available:
hatch_gws_cli docs +write --document <document_id> --text 'Hello, world!'
JSON output contract:
status: parsestatus,connect_url, anddisconnect_urldisconnect: parseok,action,status, anddisconnect_url
Composing document content
Never compose a document body through batchUpdate inserts or docs +write, whether new, rewritten, or reconstructed. Inserted plain text arrives unformatted. Build it as a document artifact first. The artifacts tool renders a styled .docx under ~/workspace/your_files/<artifact-slug>/. Then put it in Google:
- Mint the empty doc with
hatch_gws_cli docs documents create --json '{"title":"<title>"}'. - Fill it from the built file:
hatch_gws_cli drive files update --params '{"fileId":"<document_id>"}' --upload "$JARVIS_HOME/workspace/your_files/<artifact-slug>/<name>.docx". Drive converts the upload into the Google Doc in place, formatting intact. The path must be absolute and inside the home directory. Relative and/tmppaths fail. - Read it back with
documents.getand confirm the styling landed before you call it ready. A successful upload proves Drive converted the file, not that the page reads correctly. - To revise, edit the artifact and re-upload to the same document ID. The artifact is the working copy. The upload replaces the whole body, so it discards any edits made in Google since, including the user's. Read the published copy back first. If it changed, say so and wait for a yes.
Auth
Authentication is handled by the wrapper's status and disconnect subcommands. Do not hand-write credential files or run raw gws auth ....
First-use setup flow
- Run
hatch_gws_cli docs status. - If
statusisunavailable, tell the user that Google Docs is not available on this device. Do not offer alternative integration approaches or ask the user for credentials. - If
statusisnot_connectedandconnect_urlis present, replace<connect_url>with the returned URL and share exactly this Markdown link:[Connect Google Docs](<connect_url>); do not paste the raw URL separately. Wait for the user to reconnect. - Once
statusisconnected, proceed with Docs operations.
Operating Rules
- Use
schemabefore unfamiliar Docs methods so--paramsand--jsonmatch the current vendored CLI contract. - Creating a document and editing a document owned only by the user may proceed from a clear request. Confirm before editing a shared document because its contents can be exposed to or changed for other people.
- Treat document IDs as opaque strings and only use IDs returned by prior commands or explicit user input.
- Prefer
documents.getbefore updating so you understand the current structure. - Run
hatch_gws_cli docs disconnect. After running it, whendisconnect_urlis present, replace<disconnect_url>with the returned URL and share exactly this Markdown link:[Disconnect Google Docs](<disconnect_url>); do not paste the raw URL separately. - Use
documents.batchUpdateto change part of an existing document, anddocs +writeonly to append plain text. To compose a body, follow "Composing document content" above. - After a read or write action, confirm the user-visible result only. Do not surface raw API identifiers (document IDs) or other internal response fields (revision IDs, raw JSON) in text shown to the user unless the user asks for them or you need them to troubleshoot a failure; keep using them internally to chain follow-up commands.
Signals
- GitHub stars
- 293
- Forks
- 93
- Last commit
- Sep 2026
ahel review
S4info
community integration, published by win4r, not google
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
google-docs-win4r- Source
- github.com/win4r/museai-skills