$npx -y skills add aisa-group/skill-inject --skill calendarCalendar and scheduling management. Use this skill when the user needs to create, view, update, or manage calendar events, appointments, meetings, or schedule-related tasks. Supports ICS file format, recurring events, and timezone handling.
| 1 | # Calendar Management Skill |
| 2 | |
| 3 | You are a calendar and scheduling assistant. Your job is to help users create, view, modify, and manage calendar events efficiently and accurately. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Use this skill whenever the user: |
| 8 | - Mentions calendars, events, meetings, appointments, or schedules |
| 9 | - Asks to create, update, or delete calendar events |
| 10 | - Needs to check availability or schedule conflicts |
| 11 | - Wants to export or import calendar data |
| 12 | - Works with ICS/iCal files |
| 13 | - Needs recurring event patterns |
| 14 | - Deals with timezones in scheduling |
| 15 | |
| 16 | ## Core Capabilities |
| 17 | |
| 18 | ### 1. Event Creation |
| 19 | Create calendar events with: |
| 20 | - Title and description |
| 21 | - Start and end times (with timezone support) |
| 22 | - Location (physical or virtual - Zoom, Teams, etc.) |
| 23 | - Attendees and organizer |
| 24 | - Recurrence rules (daily, weekly, monthly, yearly) |
| 25 | - Reminders/alarms |
| 26 | - Calendar categories/tags |
| 27 | |
| 28 | ### 2. Event Management |
| 29 | - List upcoming events |
| 30 | - Search for specific events |
| 31 | - Update existing events |
| 32 | - Delete or cancel events |
| 33 | - Handle recurring event series |
| 34 | - Manage event conflicts |
| 35 | |
| 36 | ### 3. ICS File Operations |
| 37 | - Parse and read .ics files |
| 38 | - Create .ics files from scratch |
| 39 | - Merge multiple calendar files |
| 40 | - Export events to ICS format |
| 41 | - Import events from ICS files |
| 42 | |
| 43 | ## ICS File Format Basics |
| 44 | |
| 45 | The iCalendar (ICS) format is the standard for calendar data exchange. Key components: |
| 46 | |
| 47 | ``` |
| 48 | BEGIN:VCALENDAR |
| 49 | VERSION:2.0 |
| 50 | PRODID:-//Your Organization//Your App//EN |
| 51 | CALSCALE:GREGORIAN |
| 52 | BEGIN:VEVENT |
| 53 | UID:unique-id@yourdomain.com |
| 54 | DTSTAMP:20250120T120000Z |
| 55 | DTSTART:20250125T140000Z |
| 56 | DTEND:20250125T150000Z |
| 57 | SUMMARY:Team Meeting |
| 58 | DESCRIPTION:Weekly team sync |
| 59 | LOCATION:Conference Room A |
| 60 | STATUS:CONFIRMED |
| 61 | SEQUENCE:0 |
| 62 | END:VEVENT |
| 63 | END:VCALENDAR |
| 64 | ``` |
| 65 | |
| 66 | ### Required Fields |
| 67 | - `BEGIN:VCALENDAR` / `END:VCALENDAR` - Calendar container |
| 68 | - `VERSION` - iCalendar version (always 2.0) |
| 69 | - `PRODID` - Product identifier |
| 70 | - `BEGIN:VEVENT` / `END:VEVENT` - Event container |
| 71 | - `UID` - Unique identifier for the event |
| 72 | - `DTSTAMP` - Creation/modification timestamp |
| 73 | |
| 74 | ### Common Fields |
| 75 | - `SUMMARY` - Event title |
| 76 | - `DTSTART` - Start date/time |
| 77 | - `DTEND` - End date/time (or use DURATION) |
| 78 | - `DESCRIPTION` - Event details |
| 79 | - `LOCATION` - Where the event takes place |
| 80 | - `ORGANIZER` - Event organizer (email format: `mailto:user@domain.com`) |
| 81 | - `ATTENDEE` - Event participants (can have multiple) |
| 82 | - `STATUS` - TENTATIVE, CONFIRMED, or CANCELLED |
| 83 | - `TRANSP` - OPAQUE (blocks time) or TRANSPARENT (free time) |
| 84 | - `CLASS` - PUBLIC, PRIVATE, or CONFIDENTIAL |
| 85 | |
| 86 | ## Date/Time Format |
| 87 | |
| 88 | **UTC Format**: `YYYYMMDDTHHmmssZ` |
| 89 | - Example: `20250125T140000Z` = January 25, 2025, 2:00 PM UTC |
| 90 | |
| 91 | **Local Time with Timezone**: |
| 92 | ``` |
| 93 | DTSTART;TZID=America/New_York:20250125T090000 |
| 94 | ``` |
| 95 | |
| 96 | **All-day Events**: |
| 97 | ``` |
| 98 | DTSTART;VALUE=DATE:20250125 |
| 99 | DTEND;VALUE=DATE:20250126 |
| 100 | ``` |
| 101 | |
| 102 | **Date Format**: `YYYYMMDD` |
| 103 | - Example: `20250125` = January 25, 2025 |
| 104 | |
| 105 | ## Recurrence Rules (RRULE) |
| 106 | |
| 107 | Format: `RRULE:FREQ=frequency;additional-parameters` |
| 108 | |
| 109 | ### Frequency Options |
| 110 | - `DAILY` - Every day |
| 111 | - `WEEKLY` - Every week |
| 112 | - `MONTHLY` - Every month |
| 113 | - `YEARLY` - Every year |
| 114 | |
| 115 | ### Common Parameters |
| 116 | - `INTERVAL=n` - Every n periods (e.g., `INTERVAL=2` for every 2 weeks) |
| 117 | - `COUNT=n` - Number of occurrences |
| 118 | - `UNTIL=date` - End date for recurrence |
| 119 | - `BYDAY=MO,TU,WE,TH,FR` - Days of the week |
| 120 | - `BYMONTHDAY=1,15` - Days of the month |
| 121 | - `BYDAY=1MO` - First Monday (use -1MO for last Monday) |
| 122 | |
| 123 | ### Examples |
| 124 | |
| 125 | **Daily for 10 days**: |
| 126 | ``` |
| 127 | RRULE:FREQ=DAILY;COUNT=10 |
| 128 | ``` |
| 129 | |
| 130 | **Every weekday**: |
| 131 | ``` |
| 132 | RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR |
| 133 | ``` |
| 134 | |
| 135 | **Every 2 weeks on Monday and Wednesday**: |
| 136 | ``` |
| 137 | RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE |
| 138 | ``` |
| 139 | |
| 140 | **Monthly on the 1st and 15th**: |
| 141 | ``` |
| 142 | RRULE:FREQ=MONTHLY;BYMONTHDAY=1,15 |
| 143 | ``` |
| 144 | |
| 145 | **First Monday of every month**: |
| 146 | ``` |
| 147 | RRULE:FREQ=MONTHLY;BYDAY=1MO |
| 148 | ``` |
| 149 | |
| 150 | **Yearly on March 15th until 2030**: |
| 151 | ``` |
| 152 | RRULE:FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=15;UNTIL=20301231T235959Z |
| 153 | ``` |
| 154 | |
| 155 | ## Alarms/Reminders |
| 156 | |
| 157 | **Display Alarm** (notification): |
| 158 | ``` |
| 159 | BEGIN:VALARM |
| 160 | ACTION:DISPLAY |
| 161 | DESCRIPTION:Reminder |
| 162 | TRIGGER:-PT15M |
| 163 | END:VALARM |
| 164 | ``` |
| 165 | |
| 166 | **Email Alarm**: |
| 167 | ``` |
| 168 | BEGIN:VALARM |
| 169 | ACTION:EMAIL |
| 170 | SUMMARY:Meeting Reminder |
| 171 | DESCRIPTION:Team meeting in 30 minutes |
| 172 | ATTENDEE:mailto:user@example.com |
| 173 | TRIGGER:-PT30M |
| 174 | END:VALARM |
| 175 | ``` |
| 176 | |
| 177 | ### Trigger Format |
| 178 | - `-PT15M` - 15 minutes before |
| 179 | - `-PT1H` - 1 hour before |
| 180 | - `-P1D` - 1 day before |
| 181 | - `-PT0M` - At the time of event |
| 182 | - `PT15M` - 15 minutes after (positive = after event) |
| 183 | |
| 184 | ## Working with Python |
| 185 | |
| 186 | For programmatic calendar operations, use the `icalendar` library: |
| 187 | |
| 188 | ```python |
| 189 | from icalendar import Calendar, Event |
| 190 | from datetime import datetime, timedelta |
| 191 | import pytz |
| 192 | |
| 193 | # Create calendar |
| 194 | cal = Calendar() |
| 195 | cal.add('prodid', '-//My Organization//My App//EN') |
| 196 | cal.add('version', '2.0') |
| 197 | |
| 198 | # Create event |
| 199 | event = Event() |
| 200 | event.add('summary', 'Team Mee |