home / skills / team-attention / plugins-for-claude-natives / google-calendar

This skill lets you view, create, modify, and delete Google Calendar events across work and personal accounts with fast, integrated results.

npx playbooks add skill team-attention/plugins-for-claude-natives --skill google-calendar

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
6.3 KB
---
name: google-calendar
description: Google 캘린더 일정 조회/생성/수정/삭제. "오늘 일정", "이번 주 일정", "미팅 추가해줘" 요청에 사용. 여러 계정(work, personal) 통합 조회 지원.
---

# Google Calendar Sync

## Overview

여러 Google 계정(회사, 개인 등)의 캘린더를 한 번에 조회하여 통합된 일정을 제공한다.
- 사전 인증된 refresh token 사용 (매번 로그인 불필요)
- Subagent 병렬 실행으로 빠른 조회
- 계정 간 일정 충돌 감지

## 트리거 조건

### 조회
- "오늘 일정", "이번 주 일정 알려줘"
- "캘린더 확인", "스케줄 뭐야"
- "다음 미팅", "내일 뭐 있어"
- "일정 충돌 확인해줘"

### 생성
- "새 일정 만들어줘", "미팅 추가해줘"
- "내일 3시에 회의 잡아줘"
- "다음 주 월요일 팀 미팅 생성"

### 수정
- "일정 시간 변경해줘", "미팅 시간 바꿔줘"
- "sync 미팅 14시 21분으로 변경"
- "회의 제목 수정해줘"

### 삭제
- "일정 삭제해줘", "미팅 취소해줘"
- "이벤트 지워줘"

## 사전 요구사항

### 1. Google Cloud 프로젝트 설정

1. [Google Cloud Console](https://console.cloud.google.com)에서 프로젝트 생성
2. Calendar API 활성화
3. OAuth 2.0 Client ID 생성 (Desktop 유형)
4. `credentials.json` 다운로드 → `references/credentials.json`에 저장

### 2. 계정별 인증 (최초 1회)

```bash
# 회사 계정
uv run python .claude/skills/google-calendar/scripts/setup_auth.py --account work

# 개인 계정
uv run python .claude/skills/google-calendar/scripts/setup_auth.py --account personal
```

브라우저에서 Google 로그인 → refresh token이 `accounts/{name}.json`에 저장됨

## 워크플로우

### 1. 등록된 계정 확인

```bash
ls .claude/skills/google-calendar/accounts/
# → work.json, personal.json
```

### 2. Subagent 병렬 실행

각 계정별로 Task 도구를 **병렬**로 호출:

```python
# 병렬 실행 - 단일 메시지에 여러 Task 호출
Task(subagent_type="general-purpose", prompt="fetch calendar for work account")
Task(subagent_type="general-purpose", prompt="fetch calendar for personal account")
```

각 subagent는 다음을 실행:
```bash
uv run python .claude/skills/google-calendar/scripts/fetch_events.py \
  --account {account_name} \
  --days 7
```

### 3. 결과 통합

- 모든 계정의 이벤트를 시간순 정렬
- 동일 시간대 이벤트 = 충돌로 표시
- 계정별 색상/아이콘 구분

## 출력 형식

```
📅 2026-01-06 (월) 일정

[09:00-10:00] 🔵 팀 스탠드업 (work)
[10:00-11:30] 🟢 치과 예약 (personal)
[14:00-15:00] 🔵 고객 미팅 - 삼양 (work)
              ⚠️ 충돌: 개인 일정과 겹침
[14:00-14:30] 🟢 은행 방문 (personal)

📊 오늘 총 4개 일정 (work: 2, personal: 2)
   ⚠️ 1건 충돌
```

## 실행 예시

사용자: "이번 주 일정 알려줘"

```
1. accounts/ 폴더 확인
   └── 등록된 계정: work, personal

2. Subagent 병렬 실행
   ├── Task: work 계정 이벤트 조회
   └── Task: personal 계정 이벤트 조회

3. 결과 수집 (각 subagent 완료 대기)
   ├── work: 8개 이벤트
   └── personal: 3개 이벤트

4. 통합 및 정렬
   └── 11개 이벤트, 2건 충돌 감지

5. 출력
   └── 일별로 그룹화하여 표시
```

## 에러 처리

| 상황 | 처리 |
|------|------|
| accounts/ 폴더 비어있음 | 초기 설정 안내 (setup_auth.py 실행 방법) |
| 특정 계정 토큰 만료 | 해당 계정 재인증 안내, 나머지 계정은 정상 조회 |
| API 할당량 초과 | 잠시 후 재시도 안내 |
| 네트워크 오류 | 연결 확인 요청 |

## Scripts

| 파일 | 용도 |
|------|------|
| `scripts/setup_auth.py` | 계정별 OAuth 인증 및 token 저장 |
| `scripts/fetch_events.py` | 특정 계정의 이벤트 조회 (CLI) |
| `scripts/manage_events.py` | 이벤트 생성/수정/삭제 (CLI) |
| `scripts/calendar_client.py` | Google Calendar API 클라이언트 라이브러리 |

## 일정 관리 (생성/수정/삭제)

### 일정 생성

```bash
uv run python .claude/skills/google-calendar/scripts/manage_events.py create \
    --summary "팀 미팅" \
    --start "2026-01-06T14:00:00" \
    --end "2026-01-06T15:00:00" \
    --account work
```

### 종일 일정 생성

```bash
uv run python .claude/skills/google-calendar/scripts/manage_events.py create \
    --summary "연차" \
    --start "2026-01-10" \
    --end "2026-01-11" \
    --account personal
```

### 일정 수정

```bash
uv run python .claude/skills/google-calendar/scripts/manage_events.py update \
    --event-id "abc123" \
    --summary "팀 미팅 (변경)" \
    --start "2026-01-06T14:21:00" \
    --account work
```

### 일정 삭제

```bash
uv run python .claude/skills/google-calendar/scripts/manage_events.py delete \
    --event-id "abc123" \
    --account work
```

### 옵션

| 옵션 | 설명 |
|------|------|
| `--summary` | 일정 제목 |
| `--start` | 시작 시간 (ISO format: 2026-01-06T14:00:00 또는 2026-01-06) |
| `--end` | 종료 시간 |
| `--description` | 일정 설명 |
| `--location` | 장소 |
| `--attendees` | 참석자 이메일 (쉼표 구분) |
| `--account` | 계정 (work, personal 등) |
| `--adc` | gcloud ADC 사용 |
| `--timezone` | 타임존 (기본값: Asia/Seoul) |
| `--json` | JSON 형식 출력 |

## References

| 문서 | 내용 |
|------|------|
| `references/setup.md` | 초기 설정 상세 가이드 |
| `references/credentials.json` | Google OAuth Client ID (gitignore) |

## 파일 구조

```
.claude/skills/google-calendar/
├── SKILL.md                    # 이 파일
├── scripts/
│   ├── calendar_client.py      # API 클라이언트
│   ├── setup_auth.py           # 인증 설정
│   ├── fetch_events.py         # 이벤트 조회 CLI
│   └── manage_events.py        # 이벤트 생성/수정/삭제 CLI
├── references/
│   ├── setup.md                # 설정 가이드
│   └── credentials.json        # OAuth Client ID (gitignore)
└── accounts/                   # 계정별 토큰 (gitignore)
    ├── work.json
    └── personal.json
```

## 보안 주의사항

- `accounts/*.json`: refresh token 포함, 절대 커밋 금지
- `references/credentials.json`: Client Secret 포함, 커밋 금지
- `.gitignore`에 추가 필수

Overview

This skill integrates multiple Google Calendar accounts to let you view, create, modify, and delete events across work and personal calendars. It uses pre-authorized refresh tokens to avoid repeated logins and runs per-account subagents in parallel for fast, consolidated schedules. The output highlights conflicts, account sources, and daily summaries for clear planning.

How this skill works

The skill checks a local accounts directory for stored refresh tokens, then launches parallel fetch tasks for each account to retrieve events for the requested range. Retrieved events are merged and time-sorted, with same-time overlaps flagged as conflicts and each event annotated by account. Creation, update, and deletion commands call a management script that issues API requests using the account-specific credentials.

When to use it

  • Ask for "today" or "this week" schedules across accounts
  • Add a meeting or create an all-day event for a specific account
  • Modify an event time, title, or attendees
  • Cancel an event or delete duplicate entries
  • Check for schedule conflicts before booking new meetings

Best practices

  • Run initial account setup once per account to store refresh tokens securely
  • Keep accounts/ and credentials files out of version control and encrypted where possible
  • Specify the account when creating or modifying events to avoid cross-account mistakes
  • Use explicit ISO timestamps for start/end to prevent timezone ambiguities
  • Check conflict warnings before confirming new meetings

Example use cases

  • "Show my schedule for this week" — aggregates work and personal calendars, highlights conflicts
  • "Add a team meeting Monday 14:00" — creates an event in the specified account with attendees and timezone
  • "Move my sync meeting to 14:21" — updates the event time for the chosen account and returns the updated event details
  • "Cancel Friday's dentist appointment" — deletes the matching personal event and confirms removal
  • "Check conflicts tomorrow" — lists overlapping events and suggests resolution options

FAQ

How do I add my Google accounts?

Run the provided setup_auth script once per account to authorize in the browser; refresh tokens are saved to the local accounts folder.

What if one account token expires?

The skill will report the expired account and continue fetching from other accounts; re-run the setup_auth script for that account to restore access.

Can I create all-day events?

Yes. Use date-only ISO values for start/end to create all-day events in the target account.