Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sanjay3290/ai-skills --skill google-docs -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/google-docs/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/google-docs/

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.

From the same set18

google-drive The google-drive skill gives full Google Drive access: search, download, upload, move and trash files via Python scripts with OAuth authentication. CX Codex +1 867installs deep-research Runs multi-step autonomous investigations using the Google Gemini Deep Research Agent. Generates cited technical reports, market overviews, and competitive matrices. CX Codex +1 672installs imagen This skill turns a text prompt into a PNG using Google Gemini, saving the file straight into your project. Handy for icons, placeholders and docs illustrations. CX Codex +1 626installs postgres Runs safe read-only SQL queries against PostgreSQL databases. Helpful for inspecting schemas, running SELECT queries, and analyzing data without write risks. CX Codex +1 620installs mssql Runs read-only SQL queries against Microsoft SQL Server databases. Useful for exploring schemas and analyzing data without the risk of mutating records. CX Codex +1 537installs google-calendar This skill lets your agent read Google Calendar, create and edit events, and find free slots. OAuth only, no MCP server involved. CX Codex +1 536installs gmail Searches, reads, and sends emails through Gmail directly from the agent interface. Helpful for triaging the inbox, managing drafts, and organizing labels. CX Codex +1 516installs google-sheets This skill gives your agent read and write access to Google Sheets: pull ranges, append rows, search for files by name. Handy when the data lives in a spreadsheet, not in code. CX Codex +1 465installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor