{"skills":[{"name":"Check a split-ticket rail itinerary","description":"Check the stations and restrictions on an ordinary Great Britain point-to-point split before comparing it with a through fare.","content":"# Check a split-ticket rail itinerary\n\nCheck the stations and restrictions on an ordinary Great Britain point-to-point split before comparing it with a through fare.\n\n## When to use this skill\n\n- Someone has bought or found two or more tickets that together cover one rail journey in Great Britain.\n- A split-ticket site shows a saving and the person wants to know it is valid on the train they plan to catch.\n- Someone is combining a season ticket, rover or other area ticket with an ordinary ticket.\n\n## When not to use it\n\n- Rail journeys outside Great Britain, where other operators' conditions apply.\n- Delay compensation, refunds or penalty fares. Each operator's own process applies.\n\n## What you need\n\n- Journey, ordered scheduled passenger stops, train operator and booked service.\n- Each ordinary point-to-point ticket, restrictions, required Railcard and fare, plus a comparable through fare.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which train will you catch, and does it call for passengers at each split station? A train that passes through, or calls for pick-up only or set-down only, can break the split.\n- What type is each ticket, such as Advance, Off-Peak, Anytime, season or rover, and what time, route, operator and Railcard conditions apply?\n- What is the through fare for the same train and conditions, and are there booking fees on either option?\n\n## Method\n\n1. Confirm the journey is on the National Rail network in Great Britain and list the tickets in travel order. Check they form an unbroken chain from origin to destination, each starting where the previous one ends.\n2. For ordinary point-to-point tickets, check in the timetable that the planned train calls for passengers at every split station. Passing through, or stopping only for operational reasons, does not count. A pick-up only call invalidates the ticket to that station; a set-down only call invalidates the ticket from it. The passenger need not leave the train.\n3. Check each ticket's own conditions on that train: time restrictions, route, operator, any reservation, and that any Railcard used is carried.\n4. Where a season ticket, daily zonal ticket or other area-based ticket such as a rover or ranger meets another ticket at the same boundary station, the train need not call there, unless either ticket's terms exclude combinations. Leave an unidentified pass as needing its special terms checked.\n5. Add up the split tickets and any booking fees and compare with the through fare for the same train and conditions. Report a saving only when every check passes.\n6. If a check fails, name the station or ticket that fails and suggest a train that calls there or a different split.\n\n## Checks before you deliver\n\n- Passengers need not leave the train at each valid split, but the ordinary split requires the relevant passenger stop.\n- A train shown travelling through a station on a route map might not call there.\n- A split at a station where the train calls for set-down only invalidates the ticket from that station.\n- Comparing the split with a through fare for a different time or ticket type overstates the saving.\n- An Advance ticket is valid only on its booked train, so a split with an Advance portion fails if the traveller takes another train.\n\n## How to present the result\n\nLead with whether the split is valid on the planned train and the saving, or the station or ticket that breaks it. Then list each ticket in travel order with its stations, price and the check that applies, and set the split total against the through fare. If it fails, say what to change, such as a train that calls at the split station.\n\n## Worked example\n\n**Request:** Check whether these two ordinary fares work on the same train.\n\n**Supplied material:**\n\n```text\nOne train from North to South; passenger calls North, Mill, South. Passes Vale without stopping. All times and operator restrictions satisfied. North\u2013Vale \u00a310, Vale\u2013South \u00a312, through \u00a330.\n```\n\n**Answer:** The \u00a322 split does not cover this express because it passes Vale without a passenger stop. The \u00a330 through fare covers the route. To use the split, look for a service that calls at Vale and meets both tickets\u2019 restrictions.\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 status 'valid-on-supplied-terms', 'invalid' or 'check-special-terms', split_gbp (sum of quoted tickets) and saving_gbp (through fare less split total, or null if validity is unresolved or fails). Return failed_at with exact split station or ticket ID in journey order; use an empty array when no failure is established.\n\n## Sources\n\n- [National Rail: split train tickets](https:\/\/www.nationalrail.co.uk\/tickets-railcards-and-offers\/buying-a-ticket\/split-train-tickets\/): National Rail says the train must stop to pick up and set down passengers where tickets are split, that passengers generally need not leave the train, that each ticket's time and train conditions still apply, and that any Railcard used must be carried. It points to section 14 of the National Rail Conditions of Travel.\n- [National Rail Conditions of Travel: condition 14, combinations of tickets](https:\/\/www.nationalrail.co.uk\/condition-14\/): Condition 14.2 requires the train to call at each station where one ticket changes to another; 14.3 removes that requirement for season, zonal and other area-based tickets that share a boundary station; and the notes say pick-up only or set-down only calls invalidate the ticket to or from that station. The skill applies these tests in order.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/check-split-rail-tickets\n","scope":"contextual","trigger_keywords":["Check a split-ticket rail itinerary","check-split-rail-tickets","check split rail tickets","Can I use these two split tickets for one train journey?","Can I use these two split tickets for one train journey","split rail tickets","split train tickets","split-ticket itinerary"],"is_private":true,"is_active":true,"scripts":[{"name":"check-split-rail-tickets-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":"check-split-rail-tickets-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: check-split-rail-tickets\ndescription: \"Check that a split-ticket rail journey in Great Britain is valid on the planned train, with every split station a passenger call and each ticket's conditions met, before working out the saving against the through fare. Use when someone has split tickets or asks if split ticketing works on their train.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/check-split-rail-tickets\n---\n\n# Check a split-ticket rail itinerary\n\nCheck the stations and restrictions on an ordinary Great Britain point-to-point split before comparing it with a through fare.\n\n## When to use this skill\n\n- Someone has bought or found two or more tickets that together cover one rail journey in Great Britain.\n- A split-ticket site shows a saving and the person wants to know it is valid on the train they plan to catch.\n- Someone is combining a season ticket, rover or other area ticket with an ordinary ticket.\n\n## When not to use it\n\n- Rail journeys outside Great Britain, where other operators' conditions apply.\n- Delay compensation, refunds or penalty fares. Each operator's own process applies.\n\n## What you need\n\n- Journey, ordered scheduled passenger stops, train operator and booked service.\n- Each ordinary point-to-point ticket, restrictions, required Railcard and fare, plus a comparable through fare.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which train will you catch, and does it call for passengers at each split station? A train that passes through, or calls for pick-up only or set-down only, can break the split.\n- What type is each ticket, such as Advance, Off-Peak, Anytime, season or rover, and what time, route, operator and Railcard conditions apply?\n- What is the through fare for the same train and conditions, and are there booking fees on either option?\n\n## Method\n\n1. Confirm the journey is on the National Rail network in Great Britain and list the tickets in travel order. Check they form an unbroken chain from origin to destination, each starting where the previous one ends.\n2. For ordinary point-to-point tickets, check in the timetable that the planned train calls for passengers at every split station. Passing through, or stopping only for operational reasons, does not count. A pick-up only call invalidates the ticket to that station; a set-down only call invalidates the ticket from it. The passenger need not leave the train.\n3. Check each ticket's own conditions on that train: time restrictions, route, operator, any reservation, and that any Railcard used is carried.\n4. Where a season ticket, daily zonal ticket or other area-based ticket such as a rover or ranger meets another ticket at the same boundary station, the train need not call there, unless either ticket's terms exclude combinations. Leave an unidentified pass as needing its special terms checked.\n5. Add up the split tickets and any booking fees and compare with the through fare for the same train and conditions. Report a saving only when every check passes.\n6. If a check fails, name the station or ticket that fails and suggest a train that calls there or a different split.\n\n## Checks before you deliver\n\n- Passengers need not leave the train at each valid split, but the ordinary split requires the relevant passenger stop.\n- A train shown travelling through a station on a route map might not call there.\n- A split at a station where the train calls for set-down only invalidates the ticket from that station.\n- Comparing the split with a through fare for a different time or ticket type overstates the saving.\n- An Advance ticket is valid only on its booked train, so a split with an Advance portion fails if the traveller takes another train.\n\n## How to present the result\n\nLead with whether the split is valid on the planned train and the saving, or the station or ticket that breaks it. Then list each ticket in travel order with its stations, price and the check that applies, and set the split total against the through fare. If it fails, say what to change, such as a train that calls at the split station.\n\n## Worked example\n\n**Request:** Check whether these two ordinary fares work on the same train.\n\n**Supplied material:**\n\n```text\nOne train from North to South; passenger calls North, Mill, South. Passes Vale without stopping. All times and operator restrictions satisfied. North\u2013Vale \u00a310, Vale\u2013South \u00a312, through \u00a330.\n```\n\n**Answer:** The \u00a322 split does not cover this express because it passes Vale without a passenger stop. The \u00a330 through fare covers the route. To use the split, look for a service that calls at Vale and meets both tickets\u2019 restrictions.\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 status 'valid-on-supplied-terms', 'invalid' or 'check-special-terms', split_gbp (sum of quoted tickets) and saving_gbp (through fare less split total, or null if validity is unresolved or fails). Return failed_at with exact split station or ticket ID in journey order; use an empty array when no failure is established.\n\n## Sources\n\n- [National Rail: split train tickets](https:\/\/www.nationalrail.co.uk\/tickets-railcards-and-offers\/buying-a-ticket\/split-train-tickets\/): National Rail says the train must stop to pick up and set down passengers where tickets are split, that passengers generally need not leave the train, that each ticket's time and train conditions still apply, and that any Railcard used must be carried. It points to section 14 of the National Rail Conditions of Travel.\n- [National Rail Conditions of Travel: condition 14, combinations of tickets](https:\/\/www.nationalrail.co.uk\/condition-14\/): Condition 14.2 requires the train to call at each station where one ticket changes to another; 14.3 removes that requirement for season, zonal and other area-based tickets that share a boundary station; and the notes say pick-up only or set-down only calls invalidate the ticket to or from that station. The skill applies these tests in order.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/check-split-rail-tickets\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\/check-split-rail-tickets\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# The express skips the cheaper split\n\nCheck whether these two ordinary fares work on the same train.\n\n## Supplied material\n\nOne train from North to South; passenger calls North, Mill, South. Passes Vale without stopping. All times and operator restrictions satisfied. North\u2013Vale \u00a310, Vale\u2013South \u00a312, through \u00a330.\n\n## Worked answer\n\nThe \u00a322 split does not cover this express because it passes Vale without a passenger stop. The \u00a330 through fare covers the route. To use the split, look for a service that calls at Vale and meets both tickets\u2019 restrictions.\n\n## Reasoning\n\nThe \u00a38 theoretical difference cannot be treated as a saving on this train.\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 whether these two ordinary fares work on the same train.\nReturn only the JSON specified in SKILL.md for this test.\n\nOne train from North to South; passenger calls North, Mill, South. Passes Vale without stopping. All times and operator restrictions satisfied. North\u2013Vale \u00a310, Vale\u2013South \u00a312, through \u00a330.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"status\": \"invalid\",\n    \"split_gbp\": 22,\n    \"saving_gbp\": null,\n    \"failed_at\": [\n        \"Vale\"\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The \u00a38 theoretical difference cannot be treated as a saving on this train.\n"},{"path":"tests\/case-2\/request.txt","content":"Do these tickets cover my journey?\nReturn only the JSON specified in SKILL.md for this test.\n\nOne service calls at East, Field, West. Tickets ordinary singles East\u2013Field \u00a37.50 and Field\u2013West \u00a39.10. Both permit this date, operator and service. No Railcard or booking fees. Through \u00a320.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"status\": \"valid-on-supplied-terms\",\n    \"split_gbp\": 16.6,\n    \"saving_gbp\": 3.4,\n    \"failed_at\": []\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"Field is an actual passenger stop, so the full split can be priced.\n"},{"path":"tests\/case-3\/request.txt","content":"Check the split on the stated service, using the supplied applicable terms.\nReturn only the JSON specified in SKILL.md for this test.\n\nOrigin to Boundary: qualifying ordinary season, allocated journey cost \u00a38 for this comparison. Boundary to End: \u00a37 point-to-point Anytime. Shared boundary; the train passes Boundary without a stop. Current applicable terms explicitly allow this combination without a call. Dates, route, operators and times valid; through fare \u00a322 with no fees.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"status\": \"valid-on-supplied-terms\",\n    \"split_gbp\": 15,\n    \"saving_gbp\": 7,\n    \"failed_at\": []\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"The season and adjoining ticket qualify for the exception. The \u00a37 difference uses the stated allocation; it is not the purchase price of a new season.\n"}],"is_active":true,"is_approved":false}]}]}