Community코딩 & 개발github.com

googleworkspace/gws-gmail-watch

Gmail: 새 이메일을 감시하고 NDJSON으로 스트리밍합니다.

gws-gmail-watch란 무엇인가요?

이 스킬은 Google Workspace Gmail API의 Watch 기능을 활용하여 사용자 Gmail 계정의 새 이메일을 실시간으로 감시하고, 이를 NDJSON(Newline Delimited JSON) 형식으로 스트리밍 출력합니다. 개발자는 이 스킬을 통해 이메일 알림, 자동 응답, 콘텐츠 분석 등 다양한 워크플로우를 구축할 수 있습니다. 주로 Claude Code와 같은 AI 에이전트 플랫폼에서 사용되며, Gmail API 인증(예: OAuth)이 사전에 설정되어 있어야 합니다. 이 스킬은 변경 사항을 지속적으로 폴링하는 대신 효율적인 푸시 알림을 제공하여 리소스를 절약하고, 새 메일이 도착할 때마다 즉시 데이터를 처리할 수 있게 해줍니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail-watch

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

gws-gmail-watch은(는) 무엇을 하나요?

Gmail: 새 이메일을 감시하고 NDJSON으로 스트리밍합니다.

개요

이 스킬은 Gmail API의 Watch 기능을 사용하여 새 이메일이 도착할 때마다 효율적으로 감지하고, 각 메시지의 메타데이터(발신자, 제목, 수신 시간 등)를 NDJSON 형식으로 스트리밍합니다. 실시간 이메일 모니터링이 필요한 애플리케이션에 적합합니다.

사용 방법

  1. 전제 조건

    • Google Cloud 프로젝트에서 Gmail API 활성화되어 있어야 합니다.
    • OAuth 2.0 클라이언트 ID 또는 서비스 계정이 설정되어 있어야 합니다.
    • Gmail 사용자 계정에 대한 액세스 권한이 필요합니다.
  2. 인증 설정

    • 필요한 환경 변수를 설정하세요:
      export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
      export GMAIL_USER_EMAIL="[email protected]"
      
  3. 실행

    • 다음 명령어로 스킬을 실행하세요:
      npx @anthropic-ai/claude-code --skill googleworkspace/gws-gmail-watch
      
    • 또는 에이전트 내에서 /gws-gmail-watch 명령어를 사용하세요.

출력 형식

출력은 각 줄이 하나의 이메일 이벤트를 나타내는 NDJSON 스트림입니다. 각 객체는 다음과 같은 필드를 포함합니다:

{
  "id": "message-id",
  "threadId": "thread-id",
  "from": "[email protected]",
  "subject": "이메일 제목",
  "date": "2023-10-01T12:34:56Z",
  "snippet": "이메일 내용의 미리보기..."
}

지원 플랫폼

  • Claude Code
  • 기타 AI 에이전트 플랫폼 (적절한 인증 및 API 호출 지원 시)

참고 사항

  • 이 스킬은 장기 실행 프로세스로 설계되었습니다. 중단하려면 Ctrl+C를 누르세요.
  • Gmail API의 Watch 요청은 기본적으로 7일 후에 만료되므로, 필요에 따라 갱신해야 합니다.
  • 자세한 내용은 Gmail API 문서를 참조하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

googleworkspace/gws-admin-reports

Google Workspace Admin SDK: Audit logs and usage reports.

googleworkspace/gws-calendar

Google Calendar: Manage calendars and events.

googleworkspace/gws-calendar-agenda

Google Calendar: Show upcoming events across all calendars.

googleworkspace/gws-calendar-insert

Google Calendar: Create a new event.

googleworkspace/gws-chat

Google Chat: Manage Chat spaces and messages.

googleworkspace/gws-chat-send

Google Chat: Send a message to a space.

googleworkspace/gws-classroom

Google Classroom: Manage classes, rosters, and coursework.

googleworkspace/gws-docs

Read and write Google Docs.

googleworkspace/gws-docs-write

Google Docs: Append text to a document.

googleworkspace/gws-drive

Google Drive: Manage files, folders, and shared drives.

googleworkspace/gws-drive-upload

Google Drive: Upload a file with automatic metadata.

googleworkspace/gws-events

Subscribe to Google Workspace events.

googleworkspace/gws-events-renew

Google Workspace Events: Renew/reactivate Workspace Events subscriptions.

googleworkspace/gws-events-subscribe

Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON.

googleworkspace/gws-forms

Read and write Google Forms.

googleworkspace/gws-gmail

Gmail: Send, read, and manage email.

googleworkspace/gws-gmail-forward

Gmail: Forward a message to new recipients.

googleworkspace/gws-gmail-read

Gmail: Read a message and extract its body or headers.

googleworkspace/gws-gmail-reply

Gmail: Reply to a message (handles threading automatically).

googleworkspace/gws-gmail-reply-all

Gmail: Reply-all to a message (handles threading automatically).

관련 스킬