google-docs · sanjay3290 — скилл для Claude Code: работа с Google Docs через OAuth
Создаёт документы, ищет их по названию, читает текст и правит содержимое прямо из чата с агентом. Нужен аккаунт Google Workspace.
npx skills add sanjay3290/ai-skills --skill google-docs -a claude-codeЧто делает google-docs
Скилл закрывает типовые операции с документами через scripts/docs.py: создать файл, найти по названию, вытащить текст, дописать абзац в конец или в начало, заменить строку. Идентификатор документа берётся из вывода find, из ссылки или вводится вручную — полный адрес разбирается сам.
Внутри три скрипта. auth.py открывает браузер, проверяет статус входа и разлогинивает; жетоны лежат в системном хранилище секретов: Keychain на macOS, Credential Locker на Windows, Secret Service на Linux. Просроченный токен обновляется сам.
Главное ограничение: личные аккаунты Gmail не поддерживаются, нужен Google Workspace. Ещё один момент — авторизация отдельная, без MCP-сервера, потому что весь обмен идёт через локальные скрипты. Если у вас уже поднят Google Workspace MCP, эти два подхода будут дублировать друг друга, и ставить оба незачем.
Какие задачи решает
- создать документ с готовым заголовком и текстом
- найти файл по части названия и посмотреть его содержимое
- дописать абзац в конец существующего документа
- заменить старую формулировку на новую по всему тексту
- прочитать документ по ссылке из переписки
Примеры запросов агенту
- Создай Google Doc «Заметки по релизу» и вставь туда текст из моего сообщения
- Найди документы со словом «meeting» в названии и покажи первый
- Замени в документе старую формулировку про сроки на новую
Как установить google-docs
1Через Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a claude-code2Вручную: положить файлы
~/.claude/skills/google-docs/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/google-docs/
1Через Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a codex2Вручную: положить файлы
.agents/skills/google-docs/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a cursor2Вручную: положить файлы
.cursor/skills/google-docs/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install sanjay3290/ai-skills google-docs2Вручную: положить файлы
.github/skills/google-docs/SKILL.md1Через Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a gemini-cli2Командой платформы
gemini skills install https://github.com/sanjay3290/ai-skills --path skills/google-docsВручную: положить файлы
.devin/skills/google-docs/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add sanjay3290/ai-skills --skill google-docs -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о google-docs
Как установить google-docs в Claude Code?
Выполните npx skills add sanjay3290/ai-skills --skill google-docs -a claude-code, затем проверьте, что файл появился по пути ~/.claude/skills/google-docs/SKILL.md.
Что делает google-docs?
Создаёт документы, ищет их по заголовку, выводит текст и правит содержимое — дописывает или заменяет строки. Все вызовы идут через скрипты в папке scripts.
Нужен ли MCP-сервер и какой аккаунт подойдёт?
MCP-сервер не нужен, авторизация проходит по OAuth через python scripts/auth.py login. Личный Gmail не подойдёт, требуется аккаунт Google Workspace.
Исходный текст
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
Похожие скиллы
Все скиллы по теме «Документы и офис» →Сначала — google-docs от других авторов.