.claude/skills/api-google-calendar/SKILL.md
Google Calendar API for events and schedules. Uses OAuth2 refresh token for headless/CI. Activate for calendar operations.
npx skillsauth add d0nghyun/neuron api-google-calendarInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/weekly commandCredentials File: .credentials/google.json
{
"client_id": "...",
"client_secret": "...",
"refresh_token": "..."
}
Create credentials at: https://console.cloud.google.com/apis/credentials
Setup Steps:
.credentials/google.jsonLoad credentials before API calls:
GOOGLE_CLIENT_ID=$(jq -r '.client_id' /Users/dhlee/Git/personal/neuron/.credentials/google.json)
GOOGLE_CLIENT_SECRET=$(jq -r '.client_secret' /Users/dhlee/Git/personal/neuron/.credentials/google.json)
GOOGLE_REFRESH_TOKEN=$(jq -r '.refresh_token' /Users/dhlee/Git/personal/neuron/.credentials/google.json)
https://www.googleapis.com/calendar/v3
Refresh tokens to get short-lived access tokens:
ACCESS_TOKEN=$(curl -s -X POST "https://oauth2.googleapis.com/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=$GOOGLE_CLIENT_ID" \
-d "client_secret=$GOOGLE_CLIENT_SECRET" \
-d "refresh_token=$GOOGLE_REFRESH_TOKEN" \
-d "grant_type=refresh_token" | jq -r '.access_token')
TODAY=$(date +%Y-%m-%dT00:00:00Z)
TOMORROW=$(date -v+1d +%Y-%m-%dT00:00:00Z)
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://www.googleapis.com/calendar/v3/calendars/${GOOGLE_CALENDAR_ID:-primary}/events?timeMin=$TODAY&timeMax=$TOMORROW&singleEvents=true&orderBy=startTime"
TODAY=$(date +%Y-%m-%dT00:00:00Z)
WEEK_END=$(date -v+7d +%Y-%m-%dT23:59:59Z)
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://www.googleapis.com/calendar/v3/calendars/${GOOGLE_CALENDAR_ID:-primary}/events?timeMin=$TODAY&timeMax=$WEEK_END&singleEvents=true&orderBy=startTime"
curl -s -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"summary": "Meeting Title",
"description": "Meeting description",
"start": {
"dateTime": "2026-01-20T14:00:00+09:00",
"timeZone": "Asia/Seoul"
},
"end": {
"dateTime": "2026-01-20T15:00:00+09:00",
"timeZone": "Asia/Seoul"
},
"attendees": [
{"email": "[email protected]"}
]
}' \
"https://www.googleapis.com/calendar/v3/calendars/${GOOGLE_CALENDAR_ID:-primary}/events"
curl -s -X PATCH \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"summary": "Updated Title"
}' \
"https://www.googleapis.com/calendar/v3/calendars/${GOOGLE_CALENDAR_ID:-primary}/events/{eventId}"
curl -s -X DELETE \
-H "Authorization: Bearer $ACCESS_TOKEN" \
"https://www.googleapis.com/calendar/v3/calendars/${GOOGLE_CALENDAR_ID:-primary}/events/{eventId}"
The /weekly command can query calendar events to auto-populate the weekly update:
# Load credentials
GOOGLE_CLIENT_ID=$(jq -r '.client_id' /Users/dhlee/Git/personal/neuron/.credentials/google.json)
GOOGLE_CLIENT_SECRET=$(jq -r '.client_secret' /Users/dhlee/Git/personal/neuron/.credentials/google.json)
GOOGLE_REFRESH_TOKEN=$(jq -r '.refresh_token' /Users/dhlee/Git/personal/neuron/.credentials/google.json)
# Get this week's meetings for /weekly
ACCESS_TOKEN=$(curl -s -X POST "https://oauth2.googleapis.com/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=$GOOGLE_CLIENT_ID" \
-d "client_secret=$GOOGLE_CLIENT_SECRET" \
-d "refresh_token=$GOOGLE_REFRESH_TOKEN" \
-d "grant_type=refresh_token" | jq -r '.access_token')
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=$(date -v-7d +%Y-%m-%dT00:00:00Z)&timeMax=$(date +%Y-%m-%dT23:59:59Z)&singleEvents=true&orderBy=startTime" \
| jq '.items[] | {summary, start: .start.dateTime, attendees: [.attendees[]?.email]}'
| Status | Meaning | Action | |--------|---------|--------| | 401 | Invalid/expired token | Refresh access token | | 403 | Insufficient permissions | Check OAuth2 scopes | | 404 | Calendar/event not found | Verify calendar ID | | 429 | Rate limit exceeded | Wait and retry |
https://www.googleapis.com/auth/calendar.readonly - Read eventshttps://www.googleapis.com/auth/calendar.events - Create/update/delete eventsdatabases
Notion schedule management. Query today/weekly schedules, add/modify/complete schedules.
testing
Recap session memory into vault and validate vault structure
testing
Counterfactual review of decision paths after Moderate+ tasks
tools
Create a release with version tag. Converts UNRELEASED.md to version file and creates git tag.