{"skills":[{"name":"Turn school emails into a family calendar","description":"Reconcile school notices for the right child, keep consent deadlines separate from trips and update events when plans change.","content":"# Turn school emails into a family calendar\n\nReconcile school notices for the right child, keep consent deadlines separate from trips and update events when plans change.\n\n## When to use this skill\n\n- A parent has a pile of school emails or newsletters and wants the dates in the family calendar.\n- A trip has been moved or cancelled and the calendar needs updating for one child but not another.\n- Someone wants a list of what to sign, pay or pack, and by when.\n\n## When not to use it\n\n- Replying to the school, giving consent or paying on the parent's behalf. The skill lists the actions; the parent does them.\n- Exam timetables. Use the exam clash skill.\n- Writing into a shared calendar without the owner's agreement.\n\n## What you need\n\n- The dated notices and any calendar entries already made.\n- Children\u2019s year groups and the school time zone for timed entries.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which children are in which year groups or classes, and at which schools?\n- Which school year or term do the notices belong to, if any date has no year?\n- Do you want a list, an .ics file, or changes to an existing calendar? If it is shared, may I write to it?\n\n## Method\n\n1. Order notices by the date the school issued them, not the date they were forwarded. Take the year from the notice's own date or term. If only a forwarding date exists and more than one school year fits, ask before creating an entry.\n2. Identify each event by school, group and event name. A later notice with a new date for the same group and event replaces the earlier date; different year groups stay separate even for the same trip.\n3. Track consent, payment, kit and other actions separately from the event, each with its own due date. A change to the event date leaves those deadlines alone unless the notice changes them too.\n4. Remove cancelled events for the group named. Put an event with no confirmed date under unresolved, never on a guessed date.\n5. Sort events and actions by date and then label, undated last, and write a plain agenda and to-do list.\n6. If a calendar file is wanted, give each event a stable UID so a revision updates the existing entry, increase its SEQUENCE number with each change, and write all-day events as DATE values with DTEND set to the following day, because the iCalendar end date is exclusive.\n\n## Checks before you deliver\n\n- A newsletter issue date is rarely the trip date.\n- A cancellation for one year group does not cancel the same trip for another.\n- Adding a new entry for a moved trip instead of updating the old one leaves both dates in the calendar.\n- Setting DTEND to the event day itself. A one-day event on 14 April ends on 15 April in iCalendar.\n- Taking the year from the forwarding date of an old email.\n\n## How to present the result\n\nGive the agenda first, in date order: date, child or group, event. Then the to-do list: what to sign, pay or pack and by when. Then anything unresolved and the question to ask the school. If an entry changed, say which old entry to update or delete.\n\n## Worked example\n\n**Request:** Make a family agenda for Years 3 and 5.\n\n**Supplied material:**\n\n```text\n10 March 2027, school office: Year 3 Museum on 12 April. Consent due 25 March. Year 5 Museum on 13 April.\n17 March: Year 3 Museum moved to 14 April. Consent deadline unchanged.\n```\n\n**Answer:** 25 March 2027: Year 3 consent due.\n13 April: Year 5 Museum.\n14 April: Year 3 Museum. Replace the old 12 April Year 3 entry; the Year 5 date and consent deadline still stand.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nFor a fixture return events as [group,event,date] rows, actions as [group,action,due] rows and unresolved as event names. Use exact supplied labels and ISO dates or null. Sort each list by date then label, undated last.\n\n## Sources\n\n- [IETF RFC 5545: iCalendar, event component](https:\/\/datatracker.ietf.org\/doc\/html\/rfc5545#section-3.6.1): The iCalendar standard: all-day events use a DATE value for DTSTART, DTEND marks the non-inclusive end, and UID is the persistent identifier of an event. This is why revisions keep the UID and a one-day event ends on the next date.\n- [IETF RFC 5546: iCalendar transport-independent interoperability protocol](https:\/\/datatracker.ietf.org\/doc\/html\/rfc5546#section-2.1.4): Says the organiser increments SEQUENCE when a date or time changes, and that the component with the same UID and the highest SEQUENCE replaces earlier versions, even when messages arrive out of order. The skill applies the same rule to school notices.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/school-mail-calendar\n","scope":"contextual","trigger_keywords":["Turn school emails into a family calendar","school-mail-calendar","school mail calendar","Can you pull the dates out of these school emails into our family calendar?","Can you pull the dates out of these school emails into our family calendar","school emails into a calendar","calendar from these school emails","school newsletter dates"],"is_private":true,"is_active":true,"scripts":[{"name":"school-mail-calendar-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"school-mail-calendar-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: school-mail-calendar\ndescription: \"Turn school emails, newsletters and letters into dated family calendar entries and a to-do list of consent, payment and kit deadlines, updating entries when an event moves or is cancelled. Use when a parent asks to put school emails in the calendar, track trip deadlines, or match notices to children.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/school-mail-calendar\n---\n\n# Turn school emails into a family calendar\n\nReconcile school notices for the right child, keep consent deadlines separate from trips and update events when plans change.\n\n## When to use this skill\n\n- A parent has a pile of school emails or newsletters and wants the dates in the family calendar.\n- A trip has been moved or cancelled and the calendar needs updating for one child but not another.\n- Someone wants a list of what to sign, pay or pack, and by when.\n\n## When not to use it\n\n- Replying to the school, giving consent or paying on the parent's behalf. The skill lists the actions; the parent does them.\n- Exam timetables. Use the exam clash skill.\n- Writing into a shared calendar without the owner's agreement.\n\n## What you need\n\n- The dated notices and any calendar entries already made.\n- Children\u2019s year groups and the school time zone for timed entries.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which children are in which year groups or classes, and at which schools?\n- Which school year or term do the notices belong to, if any date has no year?\n- Do you want a list, an .ics file, or changes to an existing calendar? If it is shared, may I write to it?\n\n## Method\n\n1. Order notices by the date the school issued them, not the date they were forwarded. Take the year from the notice's own date or term. If only a forwarding date exists and more than one school year fits, ask before creating an entry.\n2. Identify each event by school, group and event name. A later notice with a new date for the same group and event replaces the earlier date; different year groups stay separate even for the same trip.\n3. Track consent, payment, kit and other actions separately from the event, each with its own due date. A change to the event date leaves those deadlines alone unless the notice changes them too.\n4. Remove cancelled events for the group named. Put an event with no confirmed date under unresolved, never on a guessed date.\n5. Sort events and actions by date and then label, undated last, and write a plain agenda and to-do list.\n6. If a calendar file is wanted, give each event a stable UID so a revision updates the existing entry, increase its SEQUENCE number with each change, and write all-day events as DATE values with DTEND set to the following day, because the iCalendar end date is exclusive.\n\n## Checks before you deliver\n\n- A newsletter issue date is rarely the trip date.\n- A cancellation for one year group does not cancel the same trip for another.\n- Adding a new entry for a moved trip instead of updating the old one leaves both dates in the calendar.\n- Setting DTEND to the event day itself. A one-day event on 14 April ends on 15 April in iCalendar.\n- Taking the year from the forwarding date of an old email.\n\n## How to present the result\n\nGive the agenda first, in date order: date, child or group, event. Then the to-do list: what to sign, pay or pack and by when. Then anything unresolved and the question to ask the school. If an entry changed, say which old entry to update or delete.\n\n## Worked example\n\n**Request:** Make a family agenda for Years 3 and 5.\n\n**Supplied material:**\n\n```text\n10 March 2027, school office: Year 3 Museum on 12 April. Consent due 25 March. Year 5 Museum on 13 April.\n17 March: Year 3 Museum moved to 14 April. Consent deadline unchanged.\n```\n\n**Answer:** 25 March 2027: Year 3 consent due.\n13 April: Year 5 Museum.\n14 April: Year 3 Museum. Replace the old 12 April Year 3 entry; the Year 5 date and consent deadline still stand.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nFor a fixture return events as [group,event,date] rows, actions as [group,action,due] rows and unresolved as event names. Use exact supplied labels and ISO dates or null. Sort each list by date then label, undated last.\n\n## Sources\n\n- [IETF RFC 5545: iCalendar, event component](https:\/\/datatracker.ietf.org\/doc\/html\/rfc5545#section-3.6.1): The iCalendar standard: all-day events use a DATE value for DTSTART, DTEND marks the non-inclusive end, and UID is the persistent identifier of an event. This is why revisions keep the UID and a one-day event ends on the next date.\n- [IETF RFC 5546: iCalendar transport-independent interoperability protocol](https:\/\/datatracker.ietf.org\/doc\/html\/rfc5546#section-2.1.4): Says the organiser increments SEQUENCE when a date or time changes, and that the component with the same UID and the highest SEQUENCE replaces earlier versions, even when messages arrive out of order. The skill applies the same rule to school notices.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/school-mail-calendar\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/school-mail-calendar\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# A revised trip\n\nMake a family agenda for Years 3 and 5.\n\n## Supplied material\n\n10 March 2027, school office: Year 3 Museum on 12 April. Consent due 25 March. Year 5 Museum on 13 April.\n17 March: Year 3 Museum moved to 14 April. Consent deadline unchanged.\n\n## Worked answer\n\n25 March 2027: Year 3 consent due.\n13 April: Year 5 Museum.\n14 April: Year 3 Museum. Replace the old 12 April Year 3 entry; the Year 5 date and consent deadline still stand.\n\n## Reasoning\n\nThe revision replaces only the Year 3 event; the original consent deadline still applies.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Make a family agenda for Years 3 and 5.\nReturn only the JSON specified in SKILL.md for this test.\n\n10 March 2027, school office: Year 3 Museum on 12 April. Consent due 25 March. Year 5 Museum on 13 April.\n17 March: Year 3 Museum moved to 14 April. Consent deadline unchanged.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"events\": [\n        [\n            \"Year 5\",\n            \"Museum\",\n            \"2027-04-13\"\n        ],\n        [\n            \"Year 3\",\n            \"Museum\",\n            \"2027-04-14\"\n        ]\n    ],\n    \"actions\": [\n        [\n            \"Year 3\",\n            \"Consent\",\n            \"2027-03-25\"\n        ]\n    ],\n    \"unresolved\": []\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The revision replaces only the Year 3 event; the original consent deadline still applies.\n"},{"path":"tests\/case-2\/request.txt","content":"Update the Year 4 calendar.\nReturn only the JSON specified in SKILL.md for this test.\n\nSchool office, 3 May 2027: Year 4 Sports day on 18 May. Year 4 Choir concert date to follow.\nSchool office, 9 May: Year 4 Sports day cancelled.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"events\": [],\n    \"actions\": [],\n    \"unresolved\": [\n        \"Choir concert\"\n    ]\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A cancelled date and a missing date require different treatment.\n"},{"path":"tests\/case-3\/request.txt","content":"Update the family agenda from this message alone.\nReturn only the JSON specified in SKILL.md for this test.\n\nForwarded on 2 September 2027. Original notice is undated. Year 4 River Walk is on 12 June. Parent says it could be from either of two school years. No payment or consent tasks are stated.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"events\": [],\n    \"actions\": [],\n    \"unresolved\": [\n        \"River Walk\"\n    ]\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"The forwarding timestamp cannot identify the year of the original event.\n"}],"is_active":true,"is_approved":false}]}]}