calendarpythonverified

calendar meeting series skill

An iCalendar file (RFC 5545): one VCALENDAR with VERSION:2.0 and exactly the given PRODID, containing exactly one VEVENT with the given UID and SUMMARY, the given LOCATION, DTSTART and DTEND as UTC stamps (the given times, ending in Z), an RRULE that repeats WEEKLY on exactly the given weekdays with exactly the given COUNT, and one VALARM inside the event with ACTION:DISPLAY and a TRIGGER of the given number of minutes before the start (a negative duration). The file must parse with the icalendar library and use CRLF line endings.

rec_2e2daa08322849fba91a24b7fccf560c · banked 2026-09-04 · by neruva
SKILL.md
Certificate

A program checked this on cases it had never seen. You can run it.

Download the checker
Model alone
38%
With this skill
88%
Near-misses it rejects
6/6
Signed
ed25519
What was checked
  • Output built to the specification is accepted.
  • Each of these deliberate breaks is rejected: prodid_mismatch, missing_alarm, wrong_count, bare_lf_endings, dtstart_not_utc, wrong_alarm_action.
  • An empty file is rejected.
What was not
  • Anything a person would call taste: layout, tone, whether it looks good. No program can check that, and this one does not claim to.
  • Behaviour outside the specification's clauses.
  • Inputs the checker was never given. See the evidence line for the corpus.
Scorecard

An iCalendar file with a weekly recurrence on given weekdays and a display alarm before the start.

The model on its own
38%16 unseen cases
The same model with this skill
88%deepseek-chat
Cost per task with the skill
0.071 cents
Smallest model measured
Qwen3-0.6B, on a laptop, no API8/8
Cost to build it once
$0.13
Checked by
forged and mutation-gated, parses the file with the icalendar library
Where it does not apply
  • One event per file.
  • Recurrences other than weekly are untested.

Every figure comes from one run, kept in the repository as probe6b_forged_meeting_series_result.json.

Evidence

  • held-out 16 specs, best-of-2, deepseek-chat: cold 0.375 -> 0.875 with the rung (CI +0.250..+0.750); helper reuse 1.00
  • checker forged and mutation-gated, not hand-written: references accepted, every spoiler rejected, empty rejected, on 2 given specs plus 6 generated ($0.13)
  • stage-1 gate before forging: 2/8 for the cheap tier cold, so the gate opened

Use it

# in Claude Code (MCP tools from neruva-mcp)
rung_search(q="calendar_meeting_series_rungs")
rung_install(id="rec_2e2daa08322849fba91a24b7fccf560c", dir="~/.claude/skills")
# the skill folder is now loaded like any other skill

Usage guide

What the model reads to call the skill. This is the whole interface.

Show the guide
Helper functions for building an RFC 5545 iCalendar file with one VEVENT,
an RRULE, and one VALARM, using CRLF line endings.

1. parse_utc_stamp(dtstr)
   - Parameters: dtstr (str) - a UTC timestamp string ending in 'Z',
     e.g. "20250503T060000Z"
   - Returns: an aware datetime.datetime in UTC
   - Example: parse_utc_stamp("20250503T060000Z")

2. create_vevent(uid, summary, location, dtstart, dtend, byday, count, alarm_minutes)
   - Parameters:
       uid (str), summary (str), location (str)
       dtstart (str), dtend (str): UTC timestamp strings ending in 'Z'
       byday (list[str]): weekday codes like ["MO", "SA", "FR"]
       count (int): RRULE COUNT
       alarm_minutes (int): minutes before dtstart the VALARM triggers
   - Returns: icalendar.Event populated with DTSTART, DTEND, SUMMARY,
     LOCATION, UID, RRULE (FREQ=WEEKLY;BYDAY=...;COUNT=...), and a VALARM
     child component with ACTION:DISPLAY and a negative-duration TRIGGER.
   - Example:
       create_vevent("call-0139@stark.example", "Retro", "Room 5",
                     "20250503T060000Z", "20250503T063000Z",
                     ["MO", "SA", "FR"], 15, 30)

3. create_calendar(prodid, events)
   - Parameters:
       prodid (str): PRODID value
       events: a single icalendar.Event or a list of them
   - Returns: icalendar.Calendar with VERSION:2.0, the given PRODID, and
     the given VEVENT(s) added.
   - Example: create_calendar("-//Stark//Cal//EN", event)

4. serialize_calendar(cal)
   - Parameters: cal (icalendar.Calendar)
   - Returns: bytes of the serialized calendar with CRLF line endings
   - Example: serialize_calendar(cal)

5. write_ics(path, data_bytes)
   - Parameters: path (str) output file path, data_bytes (bytes) content
   - Returns: None (writes file to disk in binary mode)
   - Example: write_ics("/tmp/out.ics", data_bytes)

Code

120 lines of python, hashed and signed below.

Show the code
import os
import datetime
from icalendar import Calendar, Event, Alarm


def parse_utc_stamp(dtstr):
    """Parse a UTC timestamp string like '20250503T060000Z' into a
    timezone-aware datetime.datetime (UTC).

    Parameters:
        dtstr (str): timestamp string ending in 'Z', format %Y%m%dT%H%M%SZ

    Returns:
        datetime.datetime: aware UTC datetime

    Example:
        parse_utc_stamp("20250503T060000Z")
    """
    dt = datetime.datetime.strptime(dtstr, "%Y%m%dT%H%M%SZ")
    return dt.replace(tzinfo=datetime.timezone.utc)


def create_vevent(uid, summary, location, dtstart, dtend, byday, count,
                   alarm_minutes):
    """Build an icalendar Event component with an RRULE and a VALARM.

    Parameters:
        uid (str): unique identifier for the event
        summary (str): SUMMARY text
        location (str): LOCATION text
        dtstart (str): UTC timestamp string (e.g. '20250503T060000Z')
        dtend (str): UTC timestamp string (e.g. '20250503T063000Z')
        byday (list[str]): list of weekday codes, e.g. ["MO", "SA", "FR"]
        count (int): number of occurrences for the RRULE COUNT
        alarm_minutes (int): number of minutes before start the alarm fires

    Returns:
        icalendar.Event: fully populated event component (with VALARM)

    Example:
        create_vevent("uid@example", "Retro", "Room 5",
                      "20250503T060000Z", "20250503T063000Z",
                      ["MO", "SA", "FR"], 15, 30)
    """
    event = Event()
    event.add("uid", uid)
    event.add("summary", summary)
    event.add("location", location)
    event.add("dtstart", parse_utc_stamp(dtstart))
    event.add("dtend", parse_utc_stamp(dtend))
    event.add("rrule", {"freq": "weekly", "byday": list(byday), "count": int(count)})

    alarm = Alarm()
    alarm.add("action", "DISPLAY")
    alarm.add("description", summary)
    alarm.add("trigger", datetime.timedelta(minutes=-abs(int(alarm_minutes))))
    event.add_component(alarm)

    return event


def create_calendar(prodid, events):
    """Build an icalendar Calendar with VERSION:2.0, the given PRODID, and
    the given event component(s).

    Parameters:
        prodid (str): PRODID value for the calendar
        events (icalendar.Event or list[icalendar.Event]): one or more
            events to add as VEVENT components

    Returns:
        icalendar.Calendar: fully populated calendar

    Example:
        create_calendar("-//Stark//Cal//EN", event)
    """
    cal = Calendar()
    cal.add("prodid", prodid)
    cal.add("version", "2.0")
    if not isinstance(events, (list, tuple)):
        events = [events]
    for ev in events:
        cal.add_component(ev)
    return cal


def serialize_calendar(cal):
    """Serialize an icalendar Calendar to bytes using CRLF line endings.

    Parameters:
        cal (icalendar.Calendar): the calendar to serialize

    Returns:
        bytes: the serialized .ics content with CRLF line endings

    Example:
        serialize_calendar(cal)
    """
    data = cal.to_ical()
    text = data.decode("utf-8")
    text = text.replace("\r\n", "\n").replace("\n", "\r\n")
    return text.encode("utf-8")


def write_ics(path, data_bytes):
    """Write raw bytes to a file path (binary mode, no newline translation).

    Parameters:
        path (str): filesystem path to write to
        data_bytes (bytes): the content to write

    Returns:
        None

    Example:
        write_ics("/tmp/out.ics", b"BEGIN:VCALENDAR\\r\\n...")
    """
    with open(path, "wb") as f:
        f.write(data_bytes)

Certificate

Code sha256 49e3cb7a727c6c0cc007fc90c45c885d8dc85c0933cc820d75142fa0e170d813
Signature ed25519, present
Last re-checked
passing

Re-checked today. The signature was recomputed from the code served by the API, and the checking program was run again on freshly generated cases: 4/4 references accepted, 24/24 deliberate corruptions rejected.

A certificate proves the code has not changed. Re-running the check proves it still works today, on today's libraries.