Claude Code Plugins

Community-maintained marketplace

Feedback

calendar-scheduling

@benchflow-ai/skillsbench
18
0

Create and manage calendar events programmatically using iCal format. Use when scheduling invoice due date reminders, creating payment follow-up events, automating meeting schedules, or generating calendar files for deadlines.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name calendar-scheduling
description Create and manage calendar events programmatically using iCal format. Use when scheduling invoice due date reminders, creating payment follow-up events, automating meeting schedules, or generating calendar files for deadlines.

Calendar Scheduling

Provides patterns for creating calendar events and managing schedules.

Creating iCal Events

from datetime import datetime, timedelta
from typing import Optional

def create_ical_event(
    summary: str,
    start: datetime,
    end: datetime,
    description: str = "",
    location: str = "",
    uid: str = None
) -> str:
    """
    Create an iCal event string.

    Usage:
        event = create_ical_event(
            summary="Invoice INV-001 Due",
            start=datetime(2024, 2, 15, 9, 0),
            end=datetime(2024, 2, 15, 10, 0),
            description="Payment due for invoice INV-001"
        )
    """
    import uuid

    uid = uid or str(uuid.uuid4())
    now = datetime.utcnow().strftime("%Y%m%dT%H%M%SZ")
    start_str = start.strftime("%Y%m%dT%H%M%S")
    end_str = end.strftime("%Y%m%dT%H%M%S")

    return f'''BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Invoice System//EN
BEGIN:VEVENT
UID:{uid}
DTSTAMP:{now}
DTSTART:{start_str}
DTEND:{end_str}
SUMMARY:{summary}
DESCRIPTION:{description}
LOCATION:{location}
END:VEVENT
END:VCALENDAR'''

def save_ical_file(event: str, filepath: str):
    """Save iCal event to file."""
    from pathlib import Path
    Path(filepath).parent.mkdir(parents=True, exist_ok=True)
    Path(filepath).write_text(event)

Invoice Due Date Reminders

def create_due_date_reminder(
    invoice_number: str,
    due_date: datetime,
    amount: float,
    customer_name: str,
    reminder_days_before: int = 3
) -> str:
    """
    Create calendar reminder for invoice due date.

    Usage:
        reminder = create_due_date_reminder(
            invoice_number="INV-001",
            due_date=datetime(2024, 2, 15),
            amount=1500.00,
            customer_name="Acme Corp"
        )
        save_ical_file(reminder, "reminders/INV-001.ics")
    """
    reminder_date = due_date - timedelta(days=reminder_days_before)

    return create_ical_event(
        summary=f"Payment Due: Invoice {invoice_number}",
        start=reminder_date.replace(hour=9, minute=0),
        end=reminder_date.replace(hour=9, minute=30),
        description=f"Invoice: {invoice_number}\nAmount: ${amount:,.2f}\nCustomer: {customer_name}\nDue Date: {due_date.strftime('%Y-%m-%d')}"
    )

Payment Follow-up Schedule

def create_followup_schedule(
    invoice_number: str,
    due_date: datetime,
    amount: float
) -> list[str]:
    """
    Create follow-up reminder schedule.

    Returns list of iCal events:
    - 7 days before due date
    - 3 days before due date
    - On due date
    - 3 days after due date (if unpaid)
    """
    events = []

    schedules = [
        (-7, "Upcoming Payment Due"),
        (-3, "Payment Due Soon"),
        (0, "Payment Due Today"),
        (3, "Payment Overdue - Follow Up Required"),
    ]

    for days_offset, title in schedules:
        event_date = due_date + timedelta(days=days_offset)
        events.append(create_ical_event(
            summary=f"{title}: {invoice_number}",
            start=event_date.replace(hour=9, minute=0),
            end=event_date.replace(hour=9, minute=30),
            description=f"Invoice: {invoice_number}\nAmount: ${amount:,.2f}"
        ))

    return events

Recurring Events

def create_recurring_event(
    summary: str,
    start: datetime,
    end: datetime,
    recurrence_rule: str,
    description: str = ""
) -> str:
    """
    Create recurring calendar event.

    Recurrence rules:
    - FREQ=DAILY;COUNT=5 (daily for 5 occurrences)
    - FREQ=WEEKLY;BYDAY=MO,WE,FR (every Mon, Wed, Fri)
    - FREQ=MONTHLY;BYMONTHDAY=1 (first of every month)

    Usage:
        # Monthly invoice review meeting
        event = create_recurring_event(
            summary="Monthly Invoice Review",
            start=datetime(2024, 1, 15, 10, 0),
            end=datetime(2024, 1, 15, 11, 0),
            recurrence_rule="FREQ=MONTHLY;BYMONTHDAY=15"
        )
    """
    import uuid

    uid = str(uuid.uuid4())
    now = datetime.utcnow().strftime("%Y%m%dT%H%M%SZ")
    start_str = start.strftime("%Y%m%dT%H%M%S")
    end_str = end.strftime("%Y%m%dT%H%M%S")

    return f'''BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Invoice System//EN
BEGIN:VEVENT
UID:{uid}
DTSTAMP:{now}
DTSTART:{start_str}
DTEND:{end_str}
SUMMARY:{summary}
DESCRIPTION:{description}
RRULE:{recurrence_rule}
END:VEVENT
END:VCALENDAR'''

Multiple Events Calendar

def create_calendar_with_events(events: list[dict]) -> str:
    """
    Create calendar file with multiple events.

    Usage:
        events = [
            {"summary": "Event 1", "start": dt1, "end": dt2},
            {"summary": "Event 2", "start": dt3, "end": dt4}
        ]
        calendar = create_calendar_with_events(events)
    """
    import uuid

    event_strings = []
    for event in events:
        uid = str(uuid.uuid4())
        now = datetime.utcnow().strftime("%Y%m%dT%H%M%SZ")
        start_str = event["start"].strftime("%Y%m%dT%H%M%S")
        end_str = event["end"].strftime("%Y%m%dT%H%M%S")

        event_strings.append(f'''BEGIN:VEVENT
UID:{uid}
DTSTAMP:{now}
DTSTART:{start_str}
DTEND:{end_str}
SUMMARY:{event.get("summary", "")}
DESCRIPTION:{event.get("description", "")}
END:VEVENT''')

    events_block = "\n".join(event_strings)

    return f'''BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Invoice System//EN
{events_block}
END:VCALENDAR'''

Helper Script

Use helper.py for the CalendarManager class with comprehensive scheduling features.