google-docs

Automate Google Docs read, create, edit, and Markdown workflows via the Docs API.

4|Updated Sep 16, 2023
One-click install
npx skills add https://github.com/craiggwilson/nix-config --skill google-docs-craiggwilson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-docs
Source: https://github.com/craiggwilson/nix-config/tree/main/hdwlinux/modules/ai/agent/skills/google-docs-skill/skill
Command: npx skills add https://github.com/craiggwilson/nix-config --skill google-docs-craiggwilson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-apis-docs_v1, google-apis-drive_v3, google-apis-sheets_v4, google-apis-calendar_v3, google-apis-people_v1, googleauth, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates end-to-end Google Docs content management, reducing manual work when reading, creating, editing, formatting, and organizing documents. It supports Markdown-based creation to generate richly formatted documents and can coordinate with Drive, Sheets, Calendar, and other Google services when authorized.

Core Features & Use Cases

  • Read document content and headings to understand structure and plan edits.
  • Create new documents from plain text or Markdown, including tables, images, and rich content.
  • Insert, append, replace, and format text ranges (bold, italic, underline) and insert page breaks.
  • Create documents from Markdown with formatting and tables using the create-from-markdown workflow.
  • Coordinate with Drive for storage, sharing, and organization via the google-drive-skill.

Quick Start

Quick Start examples show how to create and modify documents:

  • Create a plain document: echo '{"title":"Meeting Notes","content":"# Meeting"}' | ~/.ai/agent/skills/google-docs-skill/bin/ruby ~/.ai/agent/skills/google-docs-skill/scripts/docs_manager.rb create
  • Create a document from Markdown: echo '{"title":"Project","markdown":"# Project\n\n- Objective"}' | ~/.ai/agent/skills/google-docs-skill/bin/ruby ~/.ai/agent/skills/google-docs-skill/scripts/docs_manager.rb create-from-markdown
  • Read a document: ~/.ai/agent/skills/google-docs-skill/bin/ruby ~/.ai/agent/skills/google-docs-skill/scripts/docs_manager.rb read <document_id>

Frequently Asked Questions about google-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Google Docs creation from Markdown?

You can automate Google Docs creation from Markdown by using a create-from-markdown workflow that converts Markdown text into richly formatted documents with tables and images via the Google Docs API.

Can I programmatically format text and insert page breaks in Google Docs?

Yes, programmatic text formatting allows you to apply bold, italic, and underline styles to specific text ranges, replace content, and insert page breaks directly through the Google Docs API.

Do I need OAuth to read and edit Google Docs with Ruby?

Yes, you need Ruby with google-apis gems and a user OAuth flow to authorize access for reading and editing Google Docs, Drive, Sheets, Calendar, and People services.

What is the best way to coordinate Google Docs with Drive for document management?

The best way to coordinate Google Docs with Drive is by authorizing both services via OAuth, allowing you to automate document creation and then manage storage, sharing, and organization through Drive integration.

How does the Google Docs API handle reading document structure and headings?

The Google Docs API reads document content and headings to help you understand the structural hierarchy, which is essential for planning automated text insertions, replacements, and formatting edits.

Are there limitations when creating Google Docs from plain text versus Markdown?

Creating from plain text inserts basic content, whereas the Markdown workflow parses formatting syntax to generate richly formatted documents with tables, images, and structured text ranges.