Skip to content
Back to skills

Icalendar Recurrence Audit

ASecurity

Audit RFC 5545 .ics recurrence expansion read-only across RRULE, RDATE, EXDATE, RECURRENCE-ID overrides, cancellations, TZID DST transitions, floating times, and all-day events.

  • 50,717 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentspythonrustgosqlspringtestinggitapidocumentation

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add sickn33/agentic-awesome-skills --skill icalendar-recurrence-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Icalendar Recurrence Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Icalendar Recurrence Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sickn33-icalendar-recurrence-audit/badge)](https://www.skillsdirectory.com/skills/sickn33-icalendar-recurrence-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: icalendar-recurrence-audit
description: "Audit RFC 5545 .ics recurrence expansion read-only across RRULE, RDATE, EXDATE, RECURRENCE-ID overrides, cancellations, TZID DST transitions, floating times, and all-day events."
category: data
risk: safe
source: self
source_type: self
date_added: "2026-12-01"
author: Koushik-Katkam
tags: [icalendar, ics, rfc5545, recurrence, rrule, timezone, dst, testing]
---

# iCalendar Recurrence Audit

## Overview

Perform a strictly **read-only, offline** audit of RFC 5545 (`.ics` / `VCALENDAR`) recurrence expansion using maintained Python calendar libraries (`icalendar`, `recurring-ical-events`, `python-dateutil`, `tzdata`/`zoneinfo`) instead of custom regex or ad-hoc recurrence parsers. Computes exact local wall-clock timestamps and UTC instants inside a bounded date window and occurrence cap so DST shifts, excluded dates, overridden instances, cancellations, floating times, and all-day events are verified before ingestion or calendar sync.

Distinction from existing calendar skills:
- `outlook-calendar-automation`: connects via Rube/Composio MCP to live Outlook accounts to create events, manage attendees, and send meeting invitations.
- `google-calendar-automation`: operates through an authenticated Google Calendar integration to inspect or write live user calendars.
- `team-calendar`: generates SME organizational templates (CSV, SQL DDL, Notion schemas) for shared team planning.
- None of those inspect raw `.ics` files offline for RFC 5545 recurrence correctness across DST boundaries, `EXDATE`, `RDATE`, `RECURRENCE-ID`, and `STATUS:CANCELLED`.

## When to Use

- Auditing `.ics` feeds, calendar export files, or ICS generators before syncing or importing schedules.
- Verifying exact local and UTC timestamps across DST spring-forward / fall-back transitions (`TZID`).
- Testing `RRULE`, `RDATE`, `EXDATE`, `RECURRENCE-ID` reschedules, `STATUS:CANCELLED` exclusions, naive floating times, and `VALUE=DATE` all-day events without hitting live calendar APIs.
- Do **not** use this skill to create calendar events, send invitations, or mutate remote Outlook/Google calendars (`outlook-calendar-automation`, `google-calendar-automation`).

## Prerequisites

- Python 3.10+ with maintained libraries (`icalendar==7.3.2`, `recurring-ical-events==3.8.2`, `python-dateutil==2.9.0.post0`, `tzdata==2026.6`, plus `pytest` for running fixtures).
- Local `.ics` input bytes/paths, an explicit bounded evaluation window `(window_start, window_end)`, and an explicit `max_occurrences` ceiling.
- **No calendar credentials, CalDAV servers, or outbound network access required.**

## How It Works

### 1. Parse strictly with a maintained RFC 5545 library

1. Read `.ics` bytes read-only without rewriting or mutating the file.
2. Parse via `icalendar.Calendar.from_ical(...)` (avoid custom line-unfolding or `RRULE` string splitters). On invalid/unparseable `VCALENDAR` input, bad `RRULE` syntax, missing `DTSTART`, invalid window types, mixed timezone-aware + timezone-naive window bounds, non-positive-integer `max_occurrences`, or invalid window ordering, return structured `errors` (human-readable `errors` plus machine-readable `structured_errors` with `code`) rather than silently succeeding or raising.

### 2. Bound expansion and classify occurrence semantics

Run `recurring_ical_events.of(cal, skip_bad_series=False).paginate(page_size=..., earliest_end=window_start, latest_start=window_end)` so recurrence generation stops lazily at `window_end` or `max_occurrences` instead of materializing an unbounded expansion in memory:

1. **Active vs. cancelled instances:** `recurring-ical-events` returns `RECURRENCE-ID` override components carrying `STATUS:CANCELLED`; separate those into `cancelled_occurrences` rather than treating them as active instances.
2. **Timezone-aware (`TZID` / `Z`) occurrences:** Preserve local wall-clock ISO string (`local_iso`) and compute exact `utc_iso` across spring-forward and fall-back transitions.
3. **Floating local times (`tzinfo=None`):** Flag with a warning and report `utc_iso = None` because naive datetimes have no universal UTC instant without an assumed consumer timezone.
4. **All-day events (`VALUE=DATE` -> `datetime.date`):** Record `kind = "all_day"` and `utc_iso = None` without attempting `.astimezone()`.
5. **Bounded execution:** `max_occurrences` bounds **total inspected occurrences (active + cancelled)**; when more occurrences exist inside the window, mark `truncated = True` and stop inspecting before scanning further pages.

See [icalendar recurrence harness](references/icalendar-recurrence-harness.md) for the runnable `pytest` audit module and synthetic fixtures.

### 3. Verify counts, cancellations, and byte preservation

Confirm expected active occurrence timestamps (`local_iso` and `utc_iso`), expected `cancelled_occurrences`, zero unexpected parser warnings, and identical file bytes before and after inspection.

## Examples

Run the offline fixture suite in [icalendar recurrence harness](references/icalendar-recurrence-harness.md):

```text
User request: "Audit our standup-series.ics across March and November 2026 DST transitions before import."
Inputs: Local .ics file, window [2026-03-06T00:00Z, 2026-03-13T00:00Z), max_occurrences=50.
Expected result: Spring-forward shifts UTC from 14:00:00Z (EST -05:00) to 13:00:00Z (EDT -04:00) while preserving
  09:00 local wall clock; EXDATE removes 2026-03-07; RDATE adds 2026-03-11; RECURRENCE-ID shifts 2026-03-08 to
  10:30:00-04:00 (14:30:00Z); STATUS:CANCELLED moves 2026-03-09 into cancelled_occurrences; floating and
  all-day events report utc_iso=None; source .ics bytes remain unchanged.
```

## Limitations

- Non-standard vendor properties (`X-WR-TIMEZONE` without matching `VTIMEZONE`/`TZID`), proprietary Outlook/Google recurrence extensions, and CalDAV sync semantics depend on client-specific interpretation beyond RFC 5545 core rules.
- **Window overlap semantics (pinned recurring-ical-events==3.8.2):** the window `(window_start, window_end)` (`window_start < window_end`) selects occurrences **overlapping** it, in chronological order, up to `max_occurrences`. For non-empty occurrences an occurrence is inspected iff `occurrence_end > window_start AND occurrence_start <= window_end`. Occurrences touching a boundary without overlapping are excluded; occurrences spanning either edge are included; under this pinned version an occurrence **starting exactly at `window_end` is emitted**; occurrences outside the window or past the cap are intentionally omitted. Window bounds must share timezone awareness. Callers needing strict half-open `[window_start, window_end)` on start should post-filter `occurrence_start < window_end`. The cap `max_occurrences` (positive integer) bounds **total inspected occurrences: active + cancelled**; `truncated = True` when more exist. Cancelled occurrences are **not** appended before the ceiling check.
- **Output limits vs hard limits:** `max_occurrences` is an output/inspection limit, **not** a hard CPU/memory/time limit; expansion can still be expensive. **Recommend an external execution timeout** (subprocess kill, `asyncio.wait_for`, `RLIMIT_CPU`/`RLIMIT_AS`, sandbox) plus input size caps for unusually expensive or untrusted calendars. Read-only/offline is not sandboxing.
- Floating local times cannot be pinned to UTC without an explicitly chosen reference timezone.

## Safety and Side Effects

- Strictly **read-only** over local `.ics` files and in-memory strings.
- Never creates calendar events, sends invitations (`METHOD:REQUEST`/`CANCEL` dispatches), connects to Outlook/Google/CalDAV accounts, or modifies source `.ics` files.

## Sources and related skills

- [RFC 5545 — Internet Calendaring and Scheduling Core Object Specification (iCalendar)](https://www.rfc-editor.org/rfc/rfc5545.html)
- [recurring-ical-events documentation](https://recurring-ical-events.readthedocs.io/)
- Related skills: [outlook-calendar-automation](https://github.com/sickn33/agentic-awesome-skills/blob/e4dcf3977b6d1e18a2539f630bd82c2433d283e2/skills/outlook-calendar-automation/SKILL.md), [google-calendar-automation](https://github.com/sickn33/agentic-awesome-skills/blob/e4dcf3977b6d1e18a2539f630bd82c2433d283e2/skills/google-calendar-automation/SKILL.md), [team-calendar](https://github.com/sickn33/agentic-awesome-skills/blob/e4dcf3977b6d1e18a2539f630bd82c2433d283e2/skills/team-calendar/SKILL.md).

Files in this skill

  • SKILL.md8.3 KB
  • references/icalendar-recurrence-harness.md23.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.