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

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

Команда для управления календарями, событиями и правами доступа в Google Calendar прямо из Claude Code через утилиту gws.

Установить в Claude Code · Через claude-code-templates Все способы и платформы ↓
npx claude-code-templates@latest --command google-workspace/gws-calendar
Открыть на GitHub

Что делает gws-calendar

Команда связывает Claude Code с Google Workspace CLI (gws) для работы с Google Calendar API v3. Ассистент проверяет схему параметров через gws schema calendar.<resource>.<method>, собирает флаги --params и тело запроса --json, после чего вызывает нужную операцию.

Внутри доступны ресурсы events, calendars, calendarList, acl, freebusy, colors и settings. Команда умеет создавать встречи методом quickAdd, проверять статус занятости через freebusy, настраивать списки доступа и переносить события. Без установленной утилиты gws и пройденной авторизации через gws auth status вызовы работать не будут.

Для создания календарей разработчики не рекомендуют использовать сервисные аккаунты, иначе сервисный аккаунт станет владельцем данных.

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

  • создавать события и встречи по текстовому описанию через quickAdd
  • проверять занятость участников через запрос freebusy
  • управлять правами доступа к календарям через методы acl
  • получать расписание и списки событий с фильтрацией

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

  • /gws-calendar events list --params '{"calendarId": "primary"}'
  • /gws-calendar events quickAdd --params '{"calendarId": "primary", "text": "Созвон завтра в 15:00"}'
  • /gws-calendar `freebusy query --json '{"timeMin": "2025-05-01T00:00:00Z", "timeMax": "2025-05-02T00:00:00Z", "items": [{"id": "primary"}]}'`

Как установить gws-calendar

1Через claude-code-templates

npx claude-code-templates@latest --command google-workspace/gws-calendar

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

.claude/commands/gws-calendar.md

Вызов — /gws-calendar. Для всех проектов — ~/.claude/commands/

Вопросы о gws-calendar

Как установить gws-calendar в Claude Code?

Выполните команду npx claude-code-templates@latest --command google-workspace/gws-calendar, чтобы добавить файл команды в .claude/commands/gws-calendar.md.

Что нужно подготовить перед запуском gws-calendar?

В системе должен стоять Google Workspace CLI (gws), а авторизация должна быть подтверждена через gws auth status.

Почему нельзя авторизоваться через сервисный аккаунт?

При создании вторичного календаря владельцем данных становится автор запроса. Сервисный аккаунт в роли владельца ломает привычный доступ к календарю.

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

gws-calendar.md · MIT
---
allowed-tools: Bash, Read, Write, Edit
argument-hint: "[resource] [method] [flags]"
description: "Google Calendar: Manage calendars and events."
---

# Google Workspace Calendar

Execute Google Workspace Calendar operations: $ARGUMENTS

## Prerequisites

- Google Workspace CLI (`gws`) must be installed
- Authentication configured: Run `gws auth status` to verify
- Review `gws calendar --help` for all available commands

## Available Resources and Methods

# calendar (v3)

> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.

```bash
gws calendar <resource> <method> [flags]
```

## Helper Commands

| Command | Description |
|---------|-------------|
| [`+insert`](../gws-calendar-insert/SKILL.md) | create a new event |
| [`+agenda`](../gws-calendar-agenda/SKILL.md) | Show upcoming events across all calendars |

## API Resources

### acl

  - `delete` — Deletes an access control rule.
  - `get` — Returns an access control rule.
  - `insert` — Creates an access control rule.
  - `list` — Returns the rules in the access control list for the calendar.
  - `patch` — Updates an access control rule. This method supports patch semantics.
  - `update` — Updates an access control rule.
  - `watch` — Watch for changes to ACL resources.

### calendarList

  - `delete` — Removes a calendar from the user's calendar list.
  - `get` — Returns a calendar from the user's calendar list.
  - `insert` — Inserts an existing calendar into the user's calendar list.
  - `list` — Returns the calendars on the user's calendar list.
  - `patch` — Updates an existing calendar on the user's calendar list. This method supports patch semantics.
  - `update` — Updates an existing calendar on the user's calendar list.
  - `watch` — Watch for changes to CalendarList resources.

### calendars

  - `clear` — Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account.
  - `delete` — Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars.
  - `get` — Returns metadata for a calendar.
  - `insert` — Creates a secondary calendar.
The authenticated user for the request is made the data owner of the new calendar.

Note: We recommend to authenticate as the intended data owner of the calendar. You can use domain-wide delegation of authority to allow applications to act on behalf of a specific user. Don't use a service account for authentication. If you use a service account for authentication, the service account is the data owner, which can lead to unexpected behavior.
  - `patch` — Updates metadata for a calendar. This method supports patch semantics.
  - `update` — Updates metadata for a calendar.

### channels

  - `stop` — Stop watching resources through this channel

### colors

  - `get` — Returns the color definitions for calendars and events.

### events

  - `delete` — Deletes an event.
  - `get` — Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.
  - `import` — Imports an event. This operation is used to add a private copy of an existing event to a calendar. Only events with an eventType of default may be imported.
Deprecated behavior: If a non-default event is imported, its type will be changed to default and any event-type-specific properties it may have will be dropped.
  - `insert` — Creates an event.
  - `instances` — Returns instances of the specified recurring event.
  - `list` — Returns events on the specified calendar.
  - `move` — Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; birthday, focusTime, fromGmail, outOfOffice and workingLocation events cannot be moved.
  - `patch` — Updates an event. This method supports patch semantics.
  - `quickAdd` — Creates an event based on a simple text string.
  - `update` — Updates an event.
  - `watch` — Watch for changes to Events resources.

### freebusy

  - `query` — Returns free/busy information for a set of calendars.

### settings

  - `get` — Returns a single user setting.
  - `list` — Returns all user settings for the authenticated user.
  - `watch` — Watch for changes to Settings resources.

## Discovering Commands

Before calling any API method, inspect it:

```bash
# Browse resources and methods
gws calendar --help

# Inspect a method's required params, types, and defaults
gws schema calendar.<resource>.<method>
```

Use `gws schema` output to build your `--params` and `--json` flags.

## Usage

```bash
# List available resources and methods
gws calendar --help

# Inspect method schema before calling
gws schema calendar.<resource>.<method>

# Execute command with arguments
gws calendar $ARGUMENTS
```

## Task

Execute the requested Calendar operation: $ARGUMENTS

1. **Verify Prerequisites**
   - Check `gws` is installed: `gws --version`
   - Verify authentication: `gws auth status`
   - Review available commands: `gws calendar --help`

2. **Inspect Method Schema**
   - Before calling any method, inspect its parameters
   - Use `gws schema` to understand required fields
   - Review parameter types and constraints

3. **Execute Operation**
   - Build command with appropriate flags
   - Use `--params` for query/path parameters
   - Use `--json` for request body
   - Handle pagination with `--max-results` or `--page-token`

4. **Error Handling**
   - Check command output for errors
   - Review API quotas and rate limits
   - Handle authentication issues
   - Retry transient failures

---

**License**: Apache License 2.0
**Source**: [Google Workspace CLI](https://github.com/googleworkspace/cli)
**Original Skill**: `gws-calendar`

© davila7 · MIT · davila7/claude-code-templates

Похожие слэш-команды

Все слэш-команды по теме «Заметки, задачи и проекты» →

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

Весь набор →
gws-sheets Слэш-команда запускает операции Google Sheets через CLI gws: чтение значений, запись строк, создание таблиц и пакетные обновления. 77установок linear Скилл помогает вести тикеты, планировать спринты и распределять нагрузку в Linear прямо из диалога с Claude Code. 76установок commit-work Скилл помогает разобрать изменения в рабочей копии, разделить их на логичные части и оформить сообщения по стандарту Conventional Commits. 76установок server-management Скилл для Claude, который учит агента думать о процессах, мониторинге, логах и масштабировании продакшена, а не заучивать команды. 76установок resume-ats-optimizer Разбирает резюме так же, как это делает софт для скрининга: ищет ключевые слова из вакансии, ломающую парсинг вёрстку и считает процент совпадения. 75установок skill-installer Загружает готовые инструменты в папку $CODEX_HOME/skills из каталога OpenAI или внешних репозиториев GitHub. Помогает быстро подключать новые возможности агента. 74установок android-cicd Скилл настраивает сборку и публикацию Android-приложения в Google Play через GitHub Actions: мастер сам определит фреймворк и разложит секреты. 74установок gws-admin Слэш-команда для Claude, которая выполняет операции Google Workspace Admin SDK: пользователи, группы, устройства, домены. 74установок

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

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