{"skills":[{"name":"Find dates missing from a reporting series","description":"Compare a dated extract with its promised reporting calendar, including holidays, duplicates and unexpected dates.","content":"# Find dates missing from a reporting series\n\nCompare a dated extract with its promised reporting calendar, including holidays, duplicates and unexpected dates.\n\n## When to use this skill\n\n- Someone wants to know which daily, weekday or weekend reports are missing from an extract.\n- Several branches, devices or feeds should each report on every scheduled date.\n- Dates may have shifted because of time zones or clock changes.\n\n## When not to use it\n\n- Filling gaps or estimating the missing values. The skill finds gaps; filling them needs a separate, agreed rule.\n- Checking the figures inside each report. The skill checks which dates are present.\n\n## What you need\n\n- Inclusive expected start and end dates, permitted weekdays and explicit holiday exceptions.\n- One observed date per record, with the reporting timezone already agreed.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- What are the first and last dates the reports should cover, and are both included?\n- Which days should have a report, and which holidays are excluded? Name the holiday calendar rather than assuming one.\n- Which time zone defines a reporting day, and are the timestamps stored in UTC or local time?\n- Does each branch, device or feed owe its own report?\n\n## Method\n\n1. Build the expected date set from the declared start and end dates, not from the first and last rows. Apply the weekday schedule and remove only the holidays the reporting agreement names. If each branch, device or other named series owes its own report, build a separate calendar for every expected series, including one with no rows.\n2. Use the holiday calendar the agreement names. In the UK, England and Wales, Scotland and Northern Ireland have different bank holidays, so ask which applies rather than importing one.\n3. Convert each timestamp to a reporting date in the agreed time zone before counting. A UTC timestamp late in the evening can belong to the next local date, and a clock change makes a day 23 or 25 hours long without adding or removing a date. Ask if the time zone or calendar is unclear.\n4. Subtract observed dates from expected dates to find gaps, and observed minus expected to find dates outside the calendar. Count repeated dates separately from both tests and list each once.\n5. Report each series separately in the requested order. Keep gaps visible: a gap does not mean a value of zero and should not be filled from a neighbouring date without a separate rule.\n\n## Checks before you deliver\n\n- Using the earliest and latest observed rows as the expected boundaries hides missing reports at either end.\n- Weekends and local holidays depend on the reporting agreement. Do not import a national holiday calendar implicitly.\n- Converting timestamps to dates in UTC when the agreement uses local time moves late-evening records to the wrong day.\n- Letting one series' report cover another series' gap.\n\n## How to present the result\n\nLead with the number of missing dates for each series and the full list. Then list unexpected dates and duplicated dates separately, and state the calendar used (date range, days, holidays and time zone) so the owner can check it. Give the missing dates in a form that can be pasted into a request to the data supplier.\n\n## Worked example\n\n**Request:** Check dates from 2026-05-01 to 2026-05-08 inclusive. Expect Monday to Friday. Monday 2026-05-04 is excluded.\n\n**Supplied material:**\n\n```text\nObserved dates\n2026-05-01\n2026-05-03\n2026-05-05\n2026-05-05\n2026-05-07\n```\n\n**Answer:** Request the missing reports for 6 and 8 May 2026. Check the duplicate on 5 May and the unexpected Sunday record on 3 May. The schedule excludes the holiday on 4 May.\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\nReturn missing, unexpected and duplicated as chronological arrays of distinct ISO dates. List each duplicate date once regardless of how many rows share it. For several independently required series, return series as an array in the requested series order, each object containing id and those three date lists.\n\n## Sources\n\n- [pandas: bdate_range](https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.bdate_range.html): pandas builds a business-date range between start and end bounds, both included by default, with a weekmask and a holiday list that apply when a custom frequency such as 'C' is passed. It gives a reproducible way to build the expected calendar; the skill's cases were checked with it.\n- [GOV.UK: UK bank holidays](https:\/\/www.gov.uk\/bank-holidays): GOV.UK lists different bank holidays for England and Wales, Scotland and Northern Ireland, including substitute days. This is why the skill asks which calendar the reporting agreement uses.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/find-missing-reporting-dates\n","scope":"contextual","trigger_keywords":["Find dates missing from a reporting series","find-missing-reporting-dates","find missing reporting dates","Which weekday reports are missing from this extract?","Which weekday reports are missing from this extract","missing reporting dates","gaps in the reporting calendar","missing dates in this series"],"is_private":true,"is_active":true,"scripts":[{"name":"find-missing-reporting-dates-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":"find-missing-reporting-dates-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: find-missing-reporting-dates\ndescription: \"Compare the dates in a report or data extract with the calendar it should cover, and list missing, unexpected and duplicated dates for each series. Use when checking daily, weekday or weekend reports, meter readings, branch returns or data feeds for gaps.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/find-missing-reporting-dates\n---\n\n# Find dates missing from a reporting series\n\nCompare a dated extract with its promised reporting calendar, including holidays, duplicates and unexpected dates.\n\n## When to use this skill\n\n- Someone wants to know which daily, weekday or weekend reports are missing from an extract.\n- Several branches, devices or feeds should each report on every scheduled date.\n- Dates may have shifted because of time zones or clock changes.\n\n## When not to use it\n\n- Filling gaps or estimating the missing values. The skill finds gaps; filling them needs a separate, agreed rule.\n- Checking the figures inside each report. The skill checks which dates are present.\n\n## What you need\n\n- Inclusive expected start and end dates, permitted weekdays and explicit holiday exceptions.\n- One observed date per record, with the reporting timezone already agreed.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- What are the first and last dates the reports should cover, and are both included?\n- Which days should have a report, and which holidays are excluded? Name the holiday calendar rather than assuming one.\n- Which time zone defines a reporting day, and are the timestamps stored in UTC or local time?\n- Does each branch, device or feed owe its own report?\n\n## Method\n\n1. Build the expected date set from the declared start and end dates, not from the first and last rows. Apply the weekday schedule and remove only the holidays the reporting agreement names. If each branch, device or other named series owes its own report, build a separate calendar for every expected series, including one with no rows.\n2. Use the holiday calendar the agreement names. In the UK, England and Wales, Scotland and Northern Ireland have different bank holidays, so ask which applies rather than importing one.\n3. Convert each timestamp to a reporting date in the agreed time zone before counting. A UTC timestamp late in the evening can belong to the next local date, and a clock change makes a day 23 or 25 hours long without adding or removing a date. Ask if the time zone or calendar is unclear.\n4. Subtract observed dates from expected dates to find gaps, and observed minus expected to find dates outside the calendar. Count repeated dates separately from both tests and list each once.\n5. Report each series separately in the requested order. Keep gaps visible: a gap does not mean a value of zero and should not be filled from a neighbouring date without a separate rule.\n\n## Checks before you deliver\n\n- Using the earliest and latest observed rows as the expected boundaries hides missing reports at either end.\n- Weekends and local holidays depend on the reporting agreement. Do not import a national holiday calendar implicitly.\n- Converting timestamps to dates in UTC when the agreement uses local time moves late-evening records to the wrong day.\n- Letting one series' report cover another series' gap.\n\n## How to present the result\n\nLead with the number of missing dates for each series and the full list. Then list unexpected dates and duplicated dates separately, and state the calendar used (date range, days, holidays and time zone) so the owner can check it. Give the missing dates in a form that can be pasted into a request to the data supplier.\n\n## Worked example\n\n**Request:** Check dates from 2026-05-01 to 2026-05-08 inclusive. Expect Monday to Friday. Monday 2026-05-04 is excluded.\n\n**Supplied material:**\n\n```text\nObserved dates\n2026-05-01\n2026-05-03\n2026-05-05\n2026-05-05\n2026-05-07\n```\n\n**Answer:** Request the missing reports for 6 and 8 May 2026. Check the duplicate on 5 May and the unexpected Sunday record on 3 May. The schedule excludes the holiday on 4 May.\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\nReturn missing, unexpected and duplicated as chronological arrays of distinct ISO dates. List each duplicate date once regardless of how many rows share it. For several independently required series, return series as an array in the requested series order, each object containing id and those three date lists.\n\n## Sources\n\n- [pandas: bdate_range](https:\/\/pandas.pydata.org\/docs\/reference\/api\/pandas.bdate_range.html): pandas builds a business-date range between start and end bounds, both included by default, with a weekmask and a holiday list that apply when a custom frequency such as 'C' is passed. It gives a reproducible way to build the expected calendar; the skill's cases were checked with it.\n- [GOV.UK: UK bank holidays](https:\/\/www.gov.uk\/bank-holidays): GOV.UK lists different bank holidays for England and Wales, Scotland and Northern Ireland, including substitute days. This is why the skill asks which calendar the reporting agreement uses.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/find-missing-reporting-dates\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\/find-missing-reporting-dates\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# A short working week\n\nCheck dates from 2026-05-01 to 2026-05-08 inclusive. Expect Monday to Friday. Monday 2026-05-04 is excluded.\n\n## Supplied material\n\nObserved dates\n2026-05-01\n2026-05-03\n2026-05-05\n2026-05-05\n2026-05-07\n\n## Worked answer\n\nRequest the missing reports for 6 and 8 May 2026. Check the duplicate on 5 May and the unexpected Sunday record on 3 May. The schedule excludes the holiday on 4 May.\n\n## Reasoning\n\nThe absent final Friday is visible because the promised end date was supplied.\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":"Check dates from 2026-05-01 to 2026-05-08 inclusive. Expect Monday to Friday. Monday 2026-05-04 is excluded.\nReturn only the JSON specified in SKILL.md for this test.\n\nObserved dates\n2026-05-01\n2026-05-03\n2026-05-05\n2026-05-05\n2026-05-07\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"missing\": [\n        \"2026-05-06\",\n        \"2026-05-08\"\n    ],\n    \"unexpected\": [\n        \"2026-05-03\"\n    ],\n    \"duplicated\": [\n        \"2026-05-05\"\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The absent final Friday is visible because the promised end date was supplied.\n"},{"path":"tests\/case-2\/request.txt","content":"Check Saturdays and Sundays only, from 2026-05-09 through 2026-05-17. No holidays.\nReturn only the JSON specified in SKILL.md for this test.\n\nObserved dates\n2026-05-10\n2026-05-11\n2026-05-16\n2026-05-17\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"missing\": [\n        \"2026-05-09\"\n    ],\n    \"unexpected\": [\n        \"2026-05-11\"\n    ],\n    \"duplicated\": []\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A conventional Monday-to-Friday calendar would reverse the intended check.\n"},{"path":"tests\/case-3\/request.txt","content":"Each branch A and B must report once per local calendar day, 1 through 3 November 2025 inclusive, America\/New_York. Check both series separately.\nReturn only the JSON specified in SKILL.md for this test.\n\nA dates: 2025-11-01, 2025-11-01, 2025-11-03\nB dates: 2025-11-01, 2025-11-02, 2025-11-03\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"series\": [\n        {\n            \"id\": \"A\",\n            \"missing\": [\n                \"2025-11-02\"\n            ],\n            \"unexpected\": [],\n            \"duplicated\": [\n                \"2025-11-01\"\n            ]\n        },\n        {\n            \"id\": \"B\",\n            \"missing\": [],\n            \"unexpected\": [],\n            \"duplicated\": []\n        }\n    ]\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"B cannot supply A\u2019s missing report. The clock change lengthens a day without creating an extra calendar date.\n"}],"is_active":true,"is_approved":false}]}]}