google-docs · sanjay3290 — Claude Code skill: what it does, how to install
Creates Google Docs, locates them by title, pulls out text and edits content straight from an agent chat. Needs a Google Workspace account.
npx skills add sanjay3290/ai-skills --skill google-docs -a claude-codeWhat google-docs does
The skill wraps everyday document jobs in one script, scripts/docs.py: make a file, search by name, read its text, append a paragraph at the end or the start, swap one string for another. A document ID can come from the find output, a pasted link or your own typing — a full URL gets parsed for the ID.
Three scripts sit behind it. auth.py handles the browser login, prints status and logs you out; tokens go to the OS secret store — Keychain on macOS, Credential Locker on Windows, Secret Service on Linux. Expired access tokens refresh on their own.
Personal Gmail accounts are not supported, only Google Workspace. The login is standalone, since everything runs through local Python rather than an MCP server. If a Google Workspace MCP server is already part of your setup, you would be maintaining two routes to the same API.
What it helps with
- create a doc with a title and starter text
- locate a file by part of its name and read it
- append a paragraph to an existing document
- swap an old phrase for a new one across the text
- read a doc from a link someone sent you
Example prompts for the agent
- Create a Google Doc called Release Notes and put my last message inside
- Find documents with “meeting” in the title and show me the first one
- Replace the old deadline wording in that document with the new one
How to install google-docs
1Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a claude-code2Manually: put the files in place
~/.claude/skills/google-docs/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/google-docs/
1Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a codex2Manually: put the files in place
.agents/skills/google-docs/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a cursor2Manually: put the files in place
.cursor/skills/google-docs/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install sanjay3290/ai-skills google-docs2Manually: put the files in place
.github/skills/google-docs/SKILL.md1Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a gemini-cli2Platform CLI
gemini skills install https://github.com/sanjay3290/ai-skills --path skills/google-docsManually: put the files in place
.devin/skills/google-docs/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about google-docs
How do I install google-docs in Claude Code?
Run npx skills add sanjay3290/ai-skills --skill google-docs -a claude-code, then confirm the skill landed at ~/.claude/skills/google-docs/SKILL.md.
What does google-docs do?
It makes documents, looks them up by heading, returns their text and changes content by appending or replacing lines. Calls go through the scripts in the scripts folder.
Does it need an MCP server, and which account works?
No MCP server — OAuth runs via python scripts/auth.py login. A personal Gmail address will not work; you need Google Workspace.
Source text
SKILL.md · Apache-2.0
--- name: google-docs description: | Interact with Google Docs - create documents, search by title, read content, and edit text. Use when user asks to: create a Google Doc, find a document, read doc content, add text to a doc, or replace text in a document. Lightweight alternative to full Google Workspace MCP server with standalone OAuth authentication. license: Apache-2.0 metadata: author: sanjay3290 version: "1.0" --- # Google Docs Lightweight Google Docs integration with standalone OAuth authentication. No MCP server required. > **⚠️ Requires Google Workspace account.** Personal Gmail accounts are not supported. ## First-Time Setup Authenticate with Google (opens browser): ```bash python scripts/auth.py login ``` Check authentication status: ```bash python scripts/auth.py status ``` Logout when needed: ```bash python scripts/auth.py logout ``` ## Commands All operations via `scripts/docs.py`. Auto-authenticates on first use if not logged in. ```bash # Create a new document python scripts/docs.py create "Meeting Notes" # Create a document with initial content python scripts/docs.py create "Project Plan" --content "# Overview\n\nThis is the project plan." # Find documents by title python scripts/docs.py find "meeting" --limit 10 # Get text content of a document python scripts/docs.py get-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms # Get text using a full URL python scripts/docs.py get-text "https://docs.google.com/document/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit" # Append text to end of document python scripts/docs.py append-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms "New paragraph at the end." # Insert text at beginning of document python scripts/docs.py insert-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms "Text at the beginning.\n\n" # Replace text in document python scripts/docs.py replace-text 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms "old text" "new text" ``` ## Document ID Format Google Docs uses document IDs like `1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms`. You can: - Use the full URL (the ID will be extracted automatically) - Use just the document ID - Get document IDs from the `find` command results ## Token Management Tokens stored securely using the system keyring: - **macOS**: Keychain - **Windows**: Windows Credential Locker - **Linux**: Secret Service API (GNOME Keyring, KDE Wallet, etc.) Service name: `google-docs-skill-oauth` Access tokens are automatically refreshed when expired using Google's cloud function.
© sanjay3290 · Apache-2.0 · sanjay3290/ai-skills
Similar skills
Everything for Office documents →google-docs by other authors comes first.