К основному содержанию
скилл CX Codex

gog-cli — скилл для Claude Code: что делает и как установить

Учит ИИ-агента управлять Google Workspace через утилиту gog: искать письма в Gmail, создавать встречи в Calendar и выгружать файлы из Drive.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add intellectronica/agent-skills --skill gog-cli -a claude-code
Открыть на GitHub

Что делает gog-cli

Скилл даёт агенту правила работы с консольной утилитой gog (gogcli). С ней агент получает доступ к Gmail, Google Calendar, Drive, Docs, Sheets и другим сервисам через JSON-вызовы. Чтобы агент не сломал окружение, инструкция запрещает скрытый сброс токенов и требует запускать мутирующие операции с флагом --dry-run.

Перед началом работы саму утилиту придётся поставить в систему вручную через brew install gogcli, а затем привязать учётную запись через gog auth credentials set и gog auth add. Без предварительной настройки OAuth в терминале агент не сможет обратиться к API.

Для защиты от случайных писем предусмотрен флаг --gmail-no-send или переменная окружения GOG_GMAIL_NO_SEND=1. Для работы с Keep и панелью Admin понадобятся права администратора Workspace и делегирование на уровне домена.

Какие задачи решает

  • найти непрочитанные письма в Gmail и скачать вложения
  • проверить расписание и создать встречу в Google Calendar с Google Meet
  • искать, загружать и конвертировать документы на Google Drive
  • обновлять ячейки и запрашивать диаграммы в Google Sheets

Примеры запросов агенту

  • Проверь через gog мои встречи в календаре на сегодня
  • Найди в Gmail письма от руководителя за последние 7 дней
  • Загрузи report.md на Google Drive с конвертацией в Google Docs

Как установить gog-cli

1Через Skills CLI (Vercel)

npx skills add intellectronica/agent-skills --skill gog-cli -a claude-code

2Вручную: положить файлы

~/.claude/skills/gog-cli/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/gog-cli/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора20

todoist-api Скилл учит агента работать с Todoist через консольный инструмент td: задачи, проекты, секции, метки и комментарии. Пригодится, когда надо навести порядок в списках прямо из чата. CX Codex +1 1 700установок markdown-converter Скилл преобразует файлы и медиа в Markdown через утилиту markitdown. Помогает подготовить документы, таблицы, презентации и аудио для анализа в нейросетях. CX Codex +1 1 700установок anki-connect Скилл связывает ИИ-агента с десктопным приложением Anki через локальный API. Он помогает искать колоды, добавлять заметки и управлять карточками. CX Codex +1 891установок nano-banana-2 Скилл запускает генерацию и редактирование изображений через API Nano Banana 2: задаёте промпт, разрешение и соотношение сторон. CX Codex +1 869установок promptify Превращает краткие запросы пользователя в строгие markdown-спецификации для нейросетей без лишней вежливости и вступительных комментариев. CX Codex +1 643установок tavily Находит данные в сети, извлекает текст со страниц, строит карту сайта и запускает глубокие исследования через REST API Tavily. CX Codex +1 627установок mgrep-code-search Скилл подключает семантический поиск по кодовой базе через утилиту mgrep. Он находит нужные места по смысловому описанию задачи, если в проекте больше 30 файлов. CX Codex +1 620установок gpt-image-1-5 Генерирует и редактирует изображения через модель GPT Image 1.5 от OpenAI. Пригодится для создания графики по описанию, замены фона и точечного инпейнтинга по маске. CX Codex +1 615установок

Похожие

recipe-email-drive-link официальный googleworkspace Скилл делит файл Google Drive с нужным человеком и отправляет ему письмо со ссылкой. Пригодится, когда отчёты и документы уходят клиентам вручную. CX Codex +1 31 500установок persona-exec-assistant официальный googleworkspace Скилл настраивает роль исполнительного ассистента для управления расписанием, входящими письмами и встречами через утилиту gws. CX Codex +1 31 000установок gmail-workflows claude-office-skills Настраивает сценарии Gmail: сохраняет вложения в Google Drive, размечает и архивирует письма. Пригодится для обработки счетов и проектной переписки. CX Codex +1 5 000установок google vercel-labs Поднимает локальный сервер с Google OAuth 2.0, OIDC, Gmail, Calendar и Drive, чтобы тестировать вход через Google без реальных запросов к Google. CX Codex +1 364установок parcel-tracking jezweb Скилл ищет номера отслеживания в письмах Gmail и собирает ссылки на трекинг австралийских и международных курьеров. CX Codex +1 980установок oc-status официальный anthropics Готовит еженедельные письма внешним юристам по активным делам и сохраняет черновики в Markdown. При доступном Gmail MCP создаёт черновики и в почте. CX Codex +1 594установок

Рядом в теме «Заметки, задачи и проекты»

Всё по теме «Заметки, задачи и проекты» →

Вопросы о gog-cli

Как установить gog-cli в Claude Code?

Выполните команду npx skills add intellectronica/agent-skills --skill gog-cli -a claude-code.

Что делает скилл gog-cli?

Он обучает агента безопасным сценариям управления сервисами Google Workspace через утилиту gog в формате JSON.

Как запретить агенту отправлять письма через Gmail?

Передайте флаг --gmail-no-send, установите переменную GOG_GMAIL_NO_SEND=1 или выполните gog config no-send set <account>.

Исходный текст

SKILL.md · CC0-1.0
---
name: gog-cli
description: Use this skill whenever the user wants to operate Google Workspace from the command line with gog/gogcli, including Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Apps Script, Chat, Classroom, Contacts, Tasks, People, Groups, Admin, Keep, auth, configuration, scripting, or agent-safe Google automation. Prefer this skill for Google account/file/mail/calendar work when the user mentions gog, gogcli, Google CLI, Gmail search/send, Calendar events, Drive files, Docs/Sheets/Slides editing, Forms, Apps Script, Workspace admin, or command-line Google automation.
---

# gogcli (gog)

`gog` is a fast, script-friendly CLI for Google services. It is JSON-first, supports multiple accounts/OAuth clients, and has explicit guardrails for agent and CI usage.

Authoritative upstream: https://github.com/steipete/gogcli

This skill was refreshed against upstream `gog` v0.13.0 (2026-04-20). When exact syntax matters, run `gog <command> --help` or `gog schema --json`; the command surface moves quickly, rather inconveniently for anyone fond of stale notes.

## Operating rules

- Prefer `gog --json ... | jq ...` for inspection and scripting.
- Use `--plain` only when stable TSV is more convenient than JSON.
- Use `--dry-run` for supported mutating operations when preparing a change or when user intent is ambiguous.
- Use `--no-input` in automation so commands fail instead of prompting.
- Use `--force` only when the user asked for the destructive/public/send/admin operation or after you have clearly explained the effect.
- Do not repair OAuth, consent, keyring, or Workspace delegation problems silently. Show the exact command the user should run.
- Do not export tokens, print secrets, open public shares, add delegates/forwarding, send mail, suspend users, or permanently delete data unless the user explicitly requested that action.
- For agent runs that must not send mail, add `--gmail-no-send`, set `GOG_GMAIL_NO_SEND=1`, or configure `gog config no-send set <account>`.

## Install and auth

```bash
brew install gogcli
gog auth credentials set ~/Downloads/client_secret_....json
gog auth add [email protected] --services gmail,calendar,drive
gog auth list --check
```

Notes:

- Homebrew now uses `brew install gogcli`; old tap examples are obsolete.
- `gog auth add` defaults to `--services user`. Request the services needed for the task.
- `--services all` is accepted only as a backwards-compatible alias for `user`; do not use it when you need every API.
- Use `--readonly`, `--drive-scope readonly|file|full`, and `--gmail-scope readonly|full` for least privilege.
- Keep and Admin require Workspace service-account/domain-wide delegation. Google Chat, Groups, directory, and Classroom also have Workspace restrictions.
- For headless/CI, consider `--manual`, `--remote`, `--access-token`, or `GOG_AUTH_MODE=adc`.

Read `references/authentication.md` for full auth patterns.

## Global flags

```bash
--account, -a <email|alias|auto>   # account selection
--client <name>                    # named OAuth client/token bucket
--access-token <token>             # direct short-lived token; also GOG_ACCESS_TOKEN
--json, -j                         # machine-readable JSON
--plain, -p                        # stable TSV
--results-only                     # JSON primary result only
--select <fields>                  # best-effort JSON projection
--dry-run, -n                      # preview supported writes
--force, -y                        # skip confirmations
--no-input                         # never prompt
--enable-commands <csv>            # allowlist top-level or dotted commands
--disable-commands <csv>           # denylist top-level or dotted commands
--gmail-no-send                    # block Gmail send operations
--verbose, -v                      # debug logging
```

Useful command aliases:

```bash
gog send ...             # alias for gog gmail send
gog ls                   # alias for gog drive ls
gog search "budget"      # alias for gog drive search
gog download <fileId>    # alias for gog drive download
gog upload ./file.pdf    # alias for gog drive upload
gog me                   # alias for gog people me
gog status               # alias for gog auth status
gog open <id-or-url>     # best-effort Google web URL, offline
```

## High-value workflows

### Account selection

```bash
gog auth alias set work [email protected]
gog --account work gmail search 'is:unread newer_than:2d'
GOG_ACCOUNT=work gog calendar events primary --today
gog --client work auth credentials set ~/Downloads/work-client.json
gog --client work auth add [email protected] --services gmail,calendar
```

### Gmail

```bash
gog --json gmail search 'is:unread newer_than:7d' | jq -r '.threads[].id'
gog gmail messages search 'from:[email protected] has:attachment' --include-body
gog gmail messages search 'subject:report newer_than:30d' --full
gog gmail thread get <threadId> --download --out-dir ./attachments
gog gmail labels modify <threadId> --add Project --remove INBOX
gog gmail messages modify <messageId> --add STARRED
gog gmail send --to [email protected] --subject "Hello" --body-file ./body.txt
gog gmail forward <messageId> --to [email protected] --note "FYI"
```

For forwarding, autoreply, watch/Pub/Sub, filters, delegates, send-as, label colours, batch operations, and tracking, read `references/gmail.md`.

### Calendar

```bash
gog calendar calendars
gog calendar events primary --today --weekday
gog calendar events --all --from "2026-04-25T00:00:00+02:00" --to "2026-04-26T00:00:00+02:00"
gog calendar freebusy --cal primary --from "2026-04-25T09:00:00+02:00" --to "2026-04-25T17:00:00+02:00"
gog calendar create primary --summary "Planning" --from "2026-04-25T14:00:00+02:00" --to "2026-04-25T14:30:00+02:00" --attendees "[email protected],[email protected]" --with-meet
gog calendar respond primary <eventId> --status accepted --send-updates all
```

Use RFC3339 with timezone offsets for generated datetimes. Read `references/calendar.md` for aliases, subscriptions, secondary calendars, extended properties, Focus Time, OOO, working locations, team calendars, and conflict detection.

### Drive, Docs, Sheets, Slides, Forms, Apps Script

```bash
gog drive search "invoice filetype:pdf" --max 20
gog drive upload ./report.md --convert-to doc --parent <folderId>
gog drive upload ./deck.pdf --replace <fileId> --name "Board Deck.pdf"
gog drive share <fileId> --to user --email [email protected] --role commenter
gog docs write <docId> --file ./brief.md --replace --markdown
gog docs sed <docId> 's/status/{b c=green}approved/g' --dry-run
gog sheets update <spreadsheetId> 'Sheet1!A1' '[["Name","Score"],["Ada",98]]'
gog sheets chart list <spreadsheetId>
gog slides thumbnail <presentationId> <slideId> --out ./slide.png
gog forms responses list <formId> --max 20
gog appscript run <scriptId> myFunction --params '["arg1", 123]'
```

Read `references/drive-docs.md` for current file/content commands. For Docs sed formatting, read `references/sedmat.md`.

### Other services

```bash
gog contacts search "Ada"
gog tasks lists
gog tasks add <tasklistId> --title "Weekly review" --due "2026-04-27" --repeat weekly
gog chat messages send spaces/<spaceId> --text "Build complete"
gog groups members [email protected]
gog admin users list --domain example.com
gog keep search "receipt"
```

Read `references/other-services.md` for Chat, Classroom, Contacts, Tasks, People, Groups, Admin, Keep, and time utilities.

## Scripting patterns

```bash
# Inspect shape first
gog --json gmail search 'is:unread' --max 3 | jq .

# Use pagination/all-pages where available
gog --json calendar events primary --from today --to tomorrow --all-pages

# Fail cleanly when a supported list command has no results
gog --json calendar events primary --query "unlikely query" --fail-empty

# Batch with xargs after checking output
gog --json gmail search 'older_than:1y label:newsletter' --max 200 | \
  jq -r '.threads[].id' | \
  xargs -n 50 gog gmail labels modify --remove INBOX

# Agent-safe command surface
GOG_ENABLE_COMMANDS=calendar.events,calendar.freebusy,tasks \
  gog --no-input --json calendar events primary --today
```

## Reference map

- `references/command-reference.md` - generated command index from `gog schema --json`
- `references/authentication.md` - OAuth clients, service accounts, scopes, keyrings, headless auth
- `references/configuration.md` - config keys, environment variables, output modes, safety switches
- `references/gmail.md` - Gmail search, read, send, labels, settings, watch, tracking, autoreply
- `references/calendar.md` - Calendar listing, event writes, scheduling, special events, aliases
- `references/drive-docs.md` - Drive, Docs, Sheets, Slides, Forms, Apps Script
- `references/sedmat.md` - Docs sed/formatting DSL
- `references/other-services.md` - Chat, Classroom, Contacts, Tasks, People, Groups, Admin, Keep

© intellectronica · CC0-1.0 · intellectronica/agent-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой