google-docs▌
odyssey4me/agent-skills · updated May 7, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Interact with Google Docs for document creation, editing, and content management.
Google Docs
Interact with Google Docs for document creation, editing, and content management.
Installation
Dependencies: pip install --user google-auth google-auth-oauthlib google-api-python-client keyring pyyaml markdown
Setup Verification
After installation, verify the skill is properly configured:
$SKILL_DIR/scripts/google-docs.py check
This will check:
- Python dependencies (google-auth, google-auth-oauthlib, google-api-python-client, keyring, pyyaml, markdown)
- Authentication configuration
- Connectivity to Google Docs API
If anything is missing, the check command will provide setup instructions.
Authentication
Google Docs uses OAuth 2.0 for authentication. For complete setup instructions, see:
- GCP Project Setup Guide - Create project, enable Docs API
- Google OAuth Setup Guide - Configure credentials
Quick Start
-
Create
~/.config/agent-skills/google.yaml:oauth_client: client_id: your-client-id.apps.googleusercontent.com client_secret: your-client-secret -
Run
$SKILL_DIR/scripts/google-docs.py checkto trigger OAuth flow and verify setup.
On scope or authentication errors, see the OAuth troubleshooting guide.
Commands
See permissions.md for read/write classification of each command.
check
Verify configuration and connectivity.
$SKILL_DIR/scripts/google-docs.py check
This validates:
- Python dependencies are installed
- Authentication is configured
- Can connect to Google Docs API
- Creates a test document to verify write access
auth setup
Store OAuth 2.0 client credentials for custom OAuth flow.
$SKILL_DIR/scripts/google-docs.py auth setup \
--client-id YOUR_CLIENT_ID \
--client-secret YOUR_CLIENT_SECRET
Credentials are saved to ~/.config/agent-skills/google-docs.yaml.
Options:
--client-id- OAuth 2.0 client ID (required)--client-secret- OAuth 2.0 client secret (required)
auth reset
Clear stored OAuth token. The next command that needs authentication will trigger re-authentication automatically.
$SKILL_DIR/scripts/google-docs.py auth reset
Use this when you encounter scope or authentication errors.
auth status
Show current OAuth token information without making API calls.
$SKILL_DIR/scripts/google-docs.py auth status
Displays: whether a token is stored, granted scopes, refresh token presence, token expiry, and client ID.
documents create
Create a new blank Google Doc.
$SKILL_DIR/scripts/google-docs.py documents create --title "My Document"
Options:
--title- Document title (required)
Example:
# Create a new document
$SKILL_DIR/scripts/google-docs.py documents create --title "Project Notes"
# Output:
# ✓ Document created successfully
# Title: Project Notes
# Document ID: 1abc...xyz
# URL: https://docs.google.com/document/d/1abc...xyz/edit
documents get
Get document metadata and structure.
$SKILL_DIR/scripts/google-docs.py documents get DOCUMENT_ID
Arguments:
document_id- The Google Docs document ID
Example:
# Get document metadata
$SKILL_DIR/scripts/google-docs.py documents get 1abc...xyz
# Output:
# Title: Project Notes
# Document ID: 1abc...xyz
# Characters: 1234
# Revision ID: abc123
documents read
Read document content as plain text, markdown, or PDF.
$SKILL_DIR/scripts/google-docs.py documents read DOCUMENT_ID
Arguments:
document_id- The Google Docs document ID
Options:
--format- Output format:markdown(default, preserves tables and headings) orpdf--output,-o- Output file path (used with pdf format)
Example:
# Read as markdown (default, preserves tables and headings)
$SKILL_DIR/scripts/google-docs.py documents read 1abc...xyz
# Export as PDF
$SKILL_DIR/scripts/google-docs.py documents read 1abc...xyz --format pdf --output document.pdf
# Output as markdown:
# # Heading
#
# This is a paragraph.
#
# | Column 1 | Column 2 |
# |----------|----------|
# | Value 1 | Value 2 |
Note: Markdown and PDF export use Google's native Drive API export. Markdown preserves tables, headings, formatting, and structure with high fidelity. Both require the drive.readonly scope.
documents import
Import a local markdown file as a natively formatted Google Doc. Uses Drive API HTML-to-Docs conversion for full markdown fidelity including tables, code blocks, headings, bold, italic, links, and lists.
$SKILL_DIR/scripts/google-docs.py documents import FILE_PATH [--title TITLE] [--document-id DOC_ID] [--folder-id ID]
Arguments:
file_path- Local path to a markdown file
Options:
--title- Document title (default: first H1 heading, or filename)--document-id- Existing document ID to update (replaces content)--folder-id- Parent folder ID for new documents--json- Output as JSON
Examples:
# Import a markdown file as a new Google Doc
$SKILL_DIR/scripts/google-docs.py documents import ./report.md --title "Monthly Report"
# Import using the first H1 heading as the title
$SKILL_DIR/scripts/google-docs.py documents import ./notes.md
# Update an existing document with new markdown content
$SKILL_DIR/scripts/google-docs.py documents import ./updated.md --document-id 1abc...xyz
Note: Requires the markdown Python library (pip install --user markdown) and the drive.file scope.
content append
Append text to the end of a document.
$SKILL_DIR/scripts/google-docs.py content append DOCUMENT_ID --text "Additional content"
Arguments:
document_id- The Google Docs document ID
Options:
--text- Text to append (required)
Example:
# Append text
$SKILL_DIR/scripts/google-docs.py content append 1abc...xyz --text "Meeting notes from today..."
# Output:
# ✓ Text appended successfully
content insert
Insert text at a specific position in the document.
$SKILL_DIR/scripts/google-docs.py content insert DOCUMENT_ID --text "Insert this" --index 10
Arguments:
document_id- The Google Docs document ID
Options:
--text- Text to insert (required)--index- Position to insert at, 0-based (required)
Example:
# Insert text at the beginning (index 1, after title)
$SKILL_DIR/scripts/google-docs.py content insert 1abc...xyz --text "Introduction\n\n" --index 1
# Output:
# ✓ Text inserted successfully
Note: Index 0 is before the document content. Index 1 is at the beginning of content.
content delete
Delete a range of content from the document.
$SKILL_DIR/scripts/google-docs.py content delete DOCUMENT_ID --start-index 10 --end-index 50
Arguments:
document_id- The Google Docs document ID
Options:
--start-index- Start position, inclusive (required)--end-index- End position, exclusive (required)
Example:
# Delete characters 10-50
$SKILL_DIR/scripts/google-docs.py content delete 1abc...xyz --start-index 10 --end-index 50
# Output:
# ✓ Content deleted successfully
Warning: Be careful with indices. Deleting the wrong range can corrupt document structure.
content insert-after-anchor
Insert markdown-formatted content after a structural anchor (horizontal rule, heading, or bookmark) in a document. Handles text insertion, heading styles, bullet lists, bold formatting, and links in a single operation.
$SKILL_DIR/scripts/google-docs.py content insert-after-anchor DOCUMENT_ID \
--anchor-type ANCHOR_TYPE --markdown "MARKDOWN_CONTENT"
Arguments:
document_id- The Google Docs document ID
Options:
--anchor-type- Type of anchor to find:horizontal_rule,heading, orbookmark(required)--anchor-value- Anchor-specific value: heading text (forheading), bookmark ID (forbookmark), or occurrence number (forhorizontal_rule, default 1)--markdown- Markdown-formatted content to insert (required). Use\nfor newlines.
Supported markdown:
| Syntax | Result |
|---|---|
## Heading |
Heading (levels 1-6) |
**text** |
Bold text |
[text](url) |
Hyperlink |
- item |
Bullet list |
- item |
Nested bullet (indent 2 spaces per level) |
Examples:
# Insert after the first horizontal rule
$SKILL_DIR/scripts/google-docs.py content insert-after-anchor 1abc...xyz \
--anchor-type horizontal_rule \
--markdown '## Status Update\n\n**Summary:**\n- Task completed\n - Sub-task done\n- [Details](https://example.com)'
# Insert after a specific heading
$SKILL_DIR/scripts/google-docs.py content insert-after-anchor 1abc...xyz \
--anchor-type heading \
--anchor-value "Notes" \
--markdown '- New note item\n- Another item'
# Insert after the second horizontal rule
$SKILL_DIR/scripts/google-docs.py content insert-after-anchor 1abc...xyz \
--anchor-type horizontal_rule \
--anchor-value 2 \
--markdown '## New Section\n\nParagraph text here.'
formatting apply
Apply text formatting to a range of text.
$SKILL_DIR/scripts/google-docs.py formatting apply DOCUMENT_ID \
--start-index 1 --end-index 20 --bold --italic
Arguments:
document_id- The Google Docs document ID
Options:
--start-index- Start position, inclusive (required)--end-index- End position, exclusive (required)--bold- Apply bold formatting--italic- Apply italic formatting--underline- Apply underline formatting--font-size SIZE- Set font size in points
Example:
# Make title bold and larger
$SKILL_DIR/scripts/google-docs.py formatting apply 1abc...xyz \
--start-index 1 --end-index 20 --bold --font-size 18
# Apply italic to a section
$SKILL_DIR/scripts/google-docs.py formatting apply 1abc...xyz \
--start-index 50 --end-index 100 --italic
# Output:
# ✓ Formatting applied successfully
Examples
Create and populate a document
# Create a new document
$SKILLHow to use google-docs on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add google-docs
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches google-docs from GitHub repository odyssey4me/agent-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate google-docs. Access the skill through slash commands (e.g., /google-docs) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★43 reviews- ★★★★★Ava Gill· Dec 28, 2024
Keeps context tight: google-docs is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Dhruvi Jain· Dec 20, 2024
google-docs has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Hiroshi Choi· Dec 16, 2024
We added google-docs from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Olivia Ndlovu· Dec 8, 2024
Solid pick for teams standardizing on skills: google-docs is focused, and the summary matches what you get after install.
- ★★★★★Noah Desai· Nov 27, 2024
google-docs has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Henry Choi· Nov 19, 2024
I recommend google-docs for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Oshnikdeep· Nov 11, 2024
Solid pick for teams standardizing on skills: google-docs is focused, and the summary matches what you get after install.
- ★★★★★Kaira Srinivasan· Nov 7, 2024
Useful defaults in google-docs — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Hiroshi Abebe· Nov 3, 2024
google-docs fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kaira Farah· Oct 26, 2024
google-docs has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 43