スキル一覧に戻る
DBS-Dev2000

get-calendar-events

by DBS-Dev2000

Version-controlled repository for Claude Code and Claude Desktop agents and skills

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: get-calendar-events description: Fetches calendar events from all accounts (M365 Prisma/Personal/Family/DataBusiness + Google) and populates schedule sections in daily briefing. Triggers on "Get my calendar events for today", "Populate the calendar sections", "Update calendars in briefing entry [id]". Called by briefing-generator after create-briefing-entry. Calculates meeting count and deep work hours. Transitions Phase from 1-Email to 2-Calendar.

Get Calendar Events

Retrieves calendar events from multiple sources and updates the briefing's schedule sections.

Input Parameters

ParameterRequiredFormatDescription
entry_idYesUUIDNotion page ID of briefing entry
dateYesYYYY-MM-DDDate to fetch events for

Execution Workflow

Step 1: List M365 Accounts

Tool: m365:list_accounts

Expected accounts: prisma, personal, databusiness, family

Step 2: Fetch Events from Each Calendar

M365 Calendars: m365:list_events

{
  "account_id": "prisma",
  "start_date": "2026-01-14T00:00:00-05:00",
  "end_date": "2026-01-14T23:59:59-05:00",
  "max_results": 100
}

Google Calendar: list_gcal_events

{
  "calendar_id": "primary",
  "time_min": "2026-01-14T00:00:00-05:00",
  "time_max": "2026-01-14T23:59:59-05:00",
  "time_zone": "America/New_York"
}

Step 3: Format Events

Property format (pipe-separated):

09:00 AM - Daily Huddle | 01:00 PM - Strategic Planning | 03:15 PM - Townhall

Content format (markdown table):

### Work Calendar (Prisma)
| Time | Event | Details |
|------|-------|---------|
| 8:00 AM | PromoStandard Discussion | With Shaeem |
| 9:00 AM | Daily Huddle | Team standup |

Formatting rules:

  • Time: 12-hour format with AM/PM
  • All-day events: "All Day - [Event Name]"
  • Declined events: Exclude
  • Tentative events: Include with "(tentative)" suffix
  • No events: "No events scheduled"

Step 4: Calculate Metrics

Meeting Count: Total events excluding all-day non-meetings (vacation, OOO)

Deep Work Hours: Continuous 2+ hour free blocks between 8 AM - 6 PM

// For each gap between meetings >= 2 hours, add to deep work total
// Example: Meeting 9-10 AM, Meeting 2-3 PM → Deep work = 4 hours (10 AM-2 PM)

Step 5: Update Notion

Tool: notion_update_page_properties

{
  "page_id": "entry_id",
  "command": "update_properties",
  "properties": {
    "Prisma Calendar": "09:00 AM - Daily Huddle | 01:00 PM - Planning",
    "Personal Calendar": "05:00 AM - Workout",
    "Family Calendar": "06:30 AM - School Drop-off",
    "DataBusiness Calendar": "No events scheduled",
    "Google Calendar": "02:00 PM - Travel time",
    "Meeting Count": 6,
    "Deep Work Hours": 3.5,
    "Phase": "2-Calendar"
  }
}

Then update page content with formatted tables using replace_content_range.

Output Format

{
  "success": true,
  "entry_id": "...",
  "date": "2026-01-14",
  "meeting_count": 6,
  "deep_work_hours": 3.5,
  "calendars_processed": ["prisma", "personal", "family", "databusiness", "google"],
  "events_by_calendar": {
    "prisma": 3,
    "personal": 5,
    "family": 2,
    "databusiness": 0,
    "google": 1
  },
  "errors": []
}

Error Handling

CodeDescriptionSeverityAction
CAL001M365 account unavailableWarningContinue with available accounts
CAL002Google Calendar unavailableWarningContinue with M365
NOTION001Entry not foundCriticalFail with error

Partial success: If some calendars fail, continue with available data and note warnings.

Configuration

const CONFIG = {
  m365_accounts: ["prisma", "personal", "databusiness", "family"],
  google_calendar: "primary",
  timezone: "America/New_York",
  work_hours: { start: 8, end: 18 },
  min_deep_work_block: 2
};

⛔ MANDATORY: SAVE BEFORE COMPLETING

This skill is NOT complete until data is SAVED to Notion.
DO NOT return success until notion_update_page_properties succeeds.
Unsaved data WILL BE LOST on context compaction.

Integration

  • Called by: briefing-generator orchestrator after create-briefing-entry
  • Followed by: get-email-summary (Phase 3)
  • API calls: ~9 (list accounts, 4 M365 calendars, 1 Google, 2 Notion updates)
  • Expected time: 8-15 seconds
  • ⛔ MUST SAVE: Calendar data to Notion BEFORE returning

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です