agentleFS
FizeFize/workspace-kit/skills/google-calendar/SKILL.md

google-calendar

Skill0 starsChanged 2 months agoMITView on GitHub

Google Calendar API integration with managed OAuth. Manage calendars and events with full CRUD operations. Use this skill when users want to read, create, update, or delete calendars and events in Google Calendar. For local iCalendar (.ics) files on disk, use standard file reading tools instead. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).

  • Pipes a download into a shell
  • Reads credentials
  • Installs packages
  • Sends data out

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use google-chat, google-gmail and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • antoniolgSkill

    google-chat

    Read Google Chat spaces/threads via the Chat API, create/refresh OAuth tokens, parse Gmail Chat URLs, and list spaces. Use when asked to look up or verify messages in Google Chat or when you need API access to Chat from the CLI.

    Also in 3 projects that use this

  • leolionartSkill

    google-gmail

    Operate Gmail via the Google Workspace CLI (gws) — send emails, reply with threading, triage inbox, and stream new messages as NDJSON. Use when users ask to send/forward/reply emails, check inbox summary, or automate email workflows.

    Also in 3 projects that use this

  • refly-aiSkill

    gmail

    Integrate with Gmail for email management and automation. Use when you need to: (1) send and compose emails with attachments, (2) read and search emails by criteria, (3) manage drafts and email labels, or (4) reply to email threads and conversations.

    Also in 10 projects that use this

  • OpenAISkill

    google-drive

    Use connected Google Drive as the single entrypoint for Drive, Docs, Sheets, and Slides work. Use when the user wants to find, fetch, organize, share, export, copy, or delete Drive files, or summarize and edit Google Docs, Google Sheets, and Google Slides through one unified Google Drive plugin.

    Also in 6 projects that use this

  • refly-aiSkill

    asana

    Integrate with Asana for task management. Use when you need to: (1) create and manage Asana tasks, (2) organize project work, or (3) automate team task tracking workflows.

    Also in 3 projects that use this

  • OpenAISkill

    linear

    Manage issues, projects & team workflows in Linear. Use when the user wants to read, create or updates tickets in Linear.

    Also in 5 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 12 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After installation, verify with:

    line 82
  2. Distinctive:

    If you have multiple Google Calendar connections, specify which one to use:

    line 226
  3. Distinctive:

    If you have multiple connections, always specify the connection to ensure requests go to the intended account.

    line 250
  4. Distinctive:

    All write operations require explicit user approval: Before executing any create, update, or delete call, confirm the target resource and …

    line 255
  5. Distinctive:

    Delete all events from a primary calendar.

    line 341
  6. Distinctive:

    Add a calendar to the user's calendar list (does not create a new calendar).

    line 355
  7. Distinctive:

    Remove a calendar from the user's calendar list (does not delete the calendar itself).

    line 374
  8. Distinctive:

    Import an event from ICS/VCAL data.

    line 515
  9. Distinctive:

    Read-only listing of events from one or all calendars.

    line 544
  10. Distinctive:

    Read Google Calendar user settings.

    line 679
  11. Distinctive:

    Check your auth state:

    line 874
  12. Distinctive:

    Verify the API key is valid by listing connections:

    line 880
  13. Very specific:

    Check that the MATON_API_KEY environment variable is set:

    line 888
  14. Very specific:

    Ensure your URL path starts with google-calendar.

    line 907

“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Calendar

Access the Google Calendar API with managed OAuth authentication. Manage calendars, events, agenda views, ACLs, colors, free/busy queries, and settings.

Quick Start

CLI:

maton google-calendar calendar list
maton google-calendar event list -c primary --time-min 2026-07-22T00:00:00Z --time-max 2026-07-23T00:00:00Z

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/google-calendar/calendar/v3/users/me/calendarList')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Base URL

https://api.maton.ai/google-calendar/{native-api-path}

Maton proxies requests to calendar.googleapis.com and automatically injects your OAuth token.

CLI Installation (optional — agent decides)

Maton CLI is optional. Agent can decide whether to install it based on the environment.

macOS / Linux

curl -fsSL https://maton.ai/install.sh | bash

Windows

irm https://maton.ai/install.ps1 | iex

npm (cross-platform)

npm install -g @maton/cli

Homebrew (macOS)

brew install maton-ai/cli/maton

After installation, verify with:

maton --version

Authentication

CLI:

maton login                          # Opens browser for API key
maton login --interactive            # Skip browser, paste API key directly
maton whoami                         # Show current auth state

Manual:

  1. Sign in or create an account at maton.ai
  2. Go to maton.ai/settings
  3. Copy your API key
  4. Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"

Connection Management

Manage your Google Calendar OAuth connections at https://api.maton.ai.

List Connections

CLI:

maton connection list google-calendar --status ACTIVE
maton api -X GET /connections -f app=google-calendar -f status=ACTIVE

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=google-calendar&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Create Connection

CLI:

maton connection create google-calendar
maton api /connections -f app=google-calendar

Python:

python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'google-calendar'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Get Connection

CLI:

maton connection get {connection_id}                 # alias: maton connection view
maton api /connections/{connection_id}

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Response:

{
  "connection": {
    "connection_id": "{connection_id}",
    "status": "ACTIVE",
    "creation_time": "2026-02-07T02:35:51.002199Z",
    "last_updated_time": "2026-02-07T05:32:30.369186Z",
    "url": "https://connect.maton.ai/?session_token=...",
    "app": "google-calendar",
    "metadata": {}
  }
}

Open the returned url in a browser to complete OAuth authorization.

Delete Connection

CLI:

maton connection delete {connection_id}
maton api -X DELETE /connections/{connection_id}

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Specifying Connection

If you have multiple Google Calendar connections, specify which one to use:

CLI:

maton google-calendar calendar list --connection {connection_id}
maton api /google-calendar/calendar/v3/users/me/calendarList --connection {connection_id}

Python:

python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/google-calendar/calendar/v3/users/me/calendarList')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

If you have multiple connections, always specify the connection to ensure requests go to the intended account.

Security & Permissions

  • Access is scoped to calendars and events with full CRUD operations within the connected Google Calendar account.
  • All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.

API Reference

Calendar

List All Calendars

GET /google-calendar/calendar/v3/users/me/calendarList

Query Parameters:

  • maxResults - Maximum entries to return
  • pageToken - Token for pagination
  • showDeleted - Include deleted calendars
  • showHidden - Include hidden calendars

Example:

maton google-calendar calendar list

Get Calendar

GET /google-calendar/calendar/v3/calendars/{calendarId}

Example:

maton google-calendar calendar get primary

Create Calendar

POST /google-calendar/calendar/v3/calendars
Content-Type: application/json

{
  "summary": "Project X",
  "timeZone": "America/Los_Angeles"
}

Example:

maton google-calendar calendar create --summary 'Project X' --timezone America/Los_Angeles

Update Calendar (PATCH)

PATCH /google-calendar/calendar/v3/calendars/{calendarId}
Content-Type: application/json

{
  "summary": "Updated Title",
  "timeZone": "Asia/Shanghai"
}

Example:

maton google-calendar calendar update primary --summary 'Updated Title' --timezone Asia/Shanghai

Delete Calendar

DELETE /google-calendar/calendar/v3/calendars/{calendarId}

Example:

maton google-calendar calendar delete {calendarId}

Clear Calendar

Delete all events from a primary calendar.

POST /google-calendar/calendar/v3/calendars/{calendarId}/clear

Example:

maton google-calendar calendar clear primary

Subscribe to Calendar

Add a calendar to the user's calendar list (does not create a new calendar).

POST /google-calendar/calendar/v3/users/me/calendarList
Content-Type: application/json

{
  "id": "en.usa#holiday@group.v.calendar.google.com"
}

Example:

maton google-calendar calendar subscribe en.usa#holiday@group.v.calendar.google.com

Unsubscribe from Calendar

Remove a calendar from the user's calendar list (does not delete the calendar itself).

DELETE /google-calendar/calendar/v3/users/me/calendarList/{calendarId}

Example:

maton google-calendar calendar unsubscribe en.usa#holiday@group.v.calendar.google.com

Event

List Events

GET /google-calendar/calendar/v3/calendars/{calendarId}/events

Query Parameters:

  • maxResults - Max events per page (1-2500)
  • pageToken - Pagination token
  • showDeleted - Include deleted events
  • showHiddenInvitations - Include hidden invitations
  • singleEvents - Expand recurring events into instances (default: true)
  • orderBy - startTime or updated
  • q - Free text search across event fields
  • timeMin - Lower bound (RFC 3339)
  • timeMax - Upper bound (RFC 3339)
  • updatedMin - Filter to events updated after this timestamp
  • timeZone - IANA timezone for response times

Example:

maton google-calendar event list -c primary
maton google-calendar event list -c primary --time-min 2026-07-22T00:00:00Z --time-max 2026-07-23T00:00:00Z
maton google-calendar event list -c primary --query 'standup' --paginate

Get Event

GET /google-calendar/calendar/v3/calendars/{calendarId}/events/{eventId}

Example:

maton google-calendar event get {eventId} -c primary

Create Event

Required: --summary, --start (RFC 3339), --end (RFC 3339)

Optional: --description, --location, --attendee (repeatable), --meet (Google Meet), --send-updates (all|externalOnly|none), -c (calendar ID, default "primary")

POST /google-calendar/calendar/v3/calendars/{calendarId}/events
Content-Type: application/json

{
  "summary": "Standup",
  "start": {"dateTime": "2026-07-22T09:00:00Z"},
  "end": {"dateTime": "2026-07-22T09:30:00Z"},
  "attendees": [{"email": "alice@example.com"}],
  "location": "Room 301"
}

Example:

maton google-calendar event create --summary 'Standup' --start 2026-07-22T09:00:00Z --end 2026-07-22T09:30:00Z
maton google-calendar event create --summary 'Review' --start 2026-07-22T10:00:00Z --end 2026-07-22T11:00:00Z --attendee alice@example.com --attendee bob@example.com
maton google-calendar event create --summary 'Demo' --start 2026-07-22T14:00:00Z --end 2026-07-22T15:00:00Z --meet

Update Event (PATCH - partial update)

PATCH /google-calendar/calendar/v3/calendars/{calendarId}/events/{eventId}
Content-Type: application/json

{
  "summary": "New Title"
}

Example:

maton google-calendar event update {eventId} -c primary --summary 'New title'

Delete Event

DELETE /google-calendar/calendar/v3/calendars/{calendarId}/events/{eventId}

Example:

maton google-calendar event delete {eventId} -c primary

Move Event

Move an event to another calendar.

POST /google-calendar/calendar/v3/calendars/{calendarId}/events/{eventId}/move?destination={destinationCalendarId}

Example:

maton google-calendar event move {eventId} -c primary --destination {otherCalendarId}

Quick Add Event

Natural language event creation.

POST /google-calendar/calendar/v3/calendars/{calendarId}/events/quickAdd?text={text}

Example:

maton google-calendar event quick-add --text 'Lunch with Alice tomorrow at noon'

Import Event

Import an event from ICS/VCAL data.

POST /google-calendar/calendar/v3/calendars/{calendarId}/events/import
Content-Type: application/json

{
  "summary": "Imported Event",
  "start": {"dateTime": "2026-07-22T09:00:00Z"},
  "end": {"dateTime": "2026-07-22T10:00:00Z"}
}

List Recurring Event Instances

GET /google-calendar/calendar/v3/calendars/{calendarId}/events/{eventId}/instances

Example:

maton google-calendar event instances {eventId} -c primary

Agenda

Read-only listing of events from one or all calendars. Defaults to the next 1 day window.

CLI flags: --today, --tomorrow, --week, --days <int>, --calendar <string>, --timezone <string>, --json, --paginate

Example:

maton google-calendar agenda
maton google-calendar agenda --today
maton google-calendar agenda --week
maton google-calendar agenda --days 3 --timezone America/New_York
maton google-calendar agenda --calendar 'Work' --json

ACL

List ACL Rules

GET /google-calendar/calendar/v3/calendars/{calendarId}/acl

Example:

maton google-calendar acl list -c primary

Get ACL

GET /google-calendar/calendar/v3/calendars/{calendarId}/acl/{ruleId}

Example:

maton google-calendar acl get {ruleId} -c primary

Create ACL

POST /google-calendar/calendar/v3/calendars/{calendarId}/acl
Content-Type: application/json

{
  "role": "reader",
  "scope": {
    "type": "user",
    "value": "alice@example.com"
  }
}

Flags: --role (reader|writer|owner|freeBusyReader), --scope (scope value)

Example:

maton google-calendar acl create -c primary --role reader --scope alice@example.com

Update ACL

PATCH /google-calendar/calendar/v3/calendars/{calendarId}/acl/{ruleId}

Example:

maton google-calendar acl update {ruleId} -c primary --role writer

Delete ACL

DELETE /google-calendar/calendar/v3/calendars/{calendarId}/acl/{ruleId}

Example:

maton google-calendar acl delete {ruleId} -c primary

Colors

Get available calendar and event color palettes.

GET /google-calendar/calendar/v3/colors

Example:

maton google-calendar colors get

Freebusy

Query busy time periods across calendars.

POST /google-calendar/calendar/v3/freeBusy
Content-Type: application/json

{
  "timeMin": "2026-07-22T00:00:00Z",
  "timeMax": "2026-07-23T00:00:00Z",
  "items": [{"id": "primary"}]
}

Flags: --time-min (RFC 3339), --time-max (RFC 3339), --calendar (repeatable)

Example:

maton google-calendar freebusy --time-min 2026-07-22T00:00:00Z --time-max 2026-07-23T00:00:00Z --calendar primary
maton google-calendar freebusy --time-min 2026-07-22T00:00:00Z --time-max 2026-07-23T00:00:00Z --calendar primary --calendar work@example.com

Settings

Read Google Calendar user settings.

List Settings

GET /google-calendar/calendar/v3/users/me/settings

Example:

maton google-calendar settings list

Get Setting

GET /google-calendar/calendar/v3/users/me/settings/{setting}

Example:

maton google-calendar settings get timezone
maton google-calendar settings get locale

Common settings: timezone, locale, weekStartDay, format24HourTime, defaultReminders, defaultEventLength.


Pagination

Google Calendar uses token-based pagination. The CLI automatically paginates with --paginate.

Example:

maton google-calendar event list -c primary --paginate

For raw API, pass nextPageToken as pageToken to get the next page.

Event Resource Fields

FieldTypeDescription
kindstringAlways "calendar#event" (output only)
idstringEvent identifier
etagstringETag of the resource
statusstring"confirmed", "tentative", or "cancelled"
htmlLinkstringLink to event in Google Calendar UI (output only)
createdstringCreation time (RFC 3339, output only)
updatedstringLast modification time (RFC 3339, output only)
summarystringEvent title
descriptionstringEvent description
locationstringEvent location
colorIdstringColor ID from the color palette
creatorobjectCreator info (email, displayName, self)
organizerobjectOrganizer info
startobjectStart time (dateTime + timeZone, or date for all-day)
endobjectEnd time
endTimeUnspecifiedbooleanWhether end time is unspecified
recurrencearrayRRULE, EXRULE, RDATE, EXDATE lines
recurringEventIdstringID of the parent recurring event
originalStartTimeobjectOriginal start time of the instance
attendeesarrayList of attendees (email, responseStatus, optional, etc.)
attendeesOmittedbooleanWhether attendees may be omitted
hangoutLinkstringGoogle Meet link (output only)
conferenceDataobjectConference data (Meet, Hangouts, etc.)
iCalUIDstringiCalendar UID
sequenceintegerSequence number
remindersobjectReminder overrides (useDefault, overrides)
sourceobjectSource (url, title)
attachmentsarrayFile attachments
eventTypestring"default", "outOfOffice", "focusTime", "workingLocation"
privateCopybooleanWhether it's a private copy
guestsCanModifybooleanWhether guests can modify
guestsCanSeeOtherGuestsbooleanWhether guests can see other guests
guestsCanInviteOthersbooleanWhether guests can invite others
transparencystring"opaque" or "transparent"
visibilitystring"default", "public", "private", "confidential"
anyoneCanAddSelfbooleanWhether anyone can add themselves
lockedbooleanWhether the event is locked
outOfOfficePropertiesobjectOut-of-office properties

Code Examples

CLI

# List all calendars
maton google-calendar calendar list

# Filter with jq — e.g., extract calendar summaries
maton google-calendar calendar list --json --jq '.items[].summary'

# List today's events
maton google-calendar agenda --today

# Create an event with attendees and Google Meet
maton google-calendar event create --summary 'Sprint Review' \
  --start 2026-07-22T15:00:00Z --end 2026-07-22T16:00:00Z \
  --attendee alice@example.com --attendee bob@example.com --meet

# Quick add with natural language
maton google-calendar event quick-add --text 'Coffee with Sarah next Monday at 10am'

# Check free/busy
maton google-calendar freebusy --time-min 2026-07-22T00:00:00Z --time-max 2026-07-23T00:00:00Z --calendar primary

# Get calendar colors
maton google-calendar colors get

JavaScript

// List all calendars
const response = await fetch(
  'https://api.maton.ai/google-calendar/calendar/v3/users/me/calendarList',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`
    }
  }
);

// Create a new event
const createResponse = await fetch(
  `https://api.maton.ai/google-calendar/calendar/v3/calendars/primary/events`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      summary: 'Team Standup',
      start: { dateTime: '2026-07-22T09:00:00Z' },
      end: { dateTime: '2026-07-22T09:30:00Z' },
      attendees: [{ email: 'alice@example.com' }]
    })
  }
);

Python

import os
import requests

# List all calendars
response = requests.get(
    'https://api.maton.ai/google-calendar/calendar/v3/users/me/calendarList',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)

# Create a new event
create_response = requests.post(
    'https://api.maton.ai/google-calendar/calendar/v3/calendars/primary/events',
    headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
    json={
        'summary': 'Team Standup',
        'start': {'dateTime': '2026-07-22T09:00:00Z'},
        'end': {'dateTime': '2026-07-22T09:30:00Z'},
        'attendees': [{'email': 'alice@example.com'}]
    }
)

Notes

  • Calendar IDs are opaque strings; primary is the alias for the user's default calendar
  • Event IDs are opaque strings (base64-encoded)
  • Timestamps use RFC 3339 format: 2026-07-22T09:00:00Z or 2026-07-22T09:00:00+08:00
  • IMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing
  • IMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.

Error Handling

StatusMeaning
400Missing Google Calendar connection
401Invalid or missing Maton API key
404Calendar, event, or ACL rule not found
409Conflict (e.g., trying to create a duplicate)
429Rate limited
4xx/5xxPassthrough error from Google Calendar API

Troubleshooting: API Key Issues

CLI:

  1. Check your auth state:
maton whoami
  1. Verify the API key is valid by listing connections:
maton connection list

Manual:

  1. Check that the MATON_API_KEY environment variable is set:
echo $MATON_API_KEY
  1. Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

Troubleshooting: Invalid App Name

  1. Ensure your URL path starts with google-calendar. For example:
  • Correct: https://api.maton.ai/google-calendar/calendar/v3/users/me/calendarList
  • Incorrect: https://api.maton.ai/calendar/v3/users/me/calendarList

Resources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.