{"skills":[{"name":"Check a cabin bag against every flight","description":"Use the allowance on each booked fare and the bag\u2019s packed external measurements to find the legs on which it fits.","content":"# Check a cabin bag against every flight\n\nUse the allowance on each booked fare and the bag\u2019s packed external measurements to find the legs on which it fits.\n\n## When to use this skill\n\n- Someone is taking one bag on a trip with different airlines or fares on the way out and back.\n- A low fare includes only a small under-seat bag and the person wants to know if their case qualifies.\n- Someone has measured and weighed their packed bag and wants a leg-by-leg answer before going to the airport.\n\n## When not to use it\n\n- What can pass through security, such as liquids or sharp items. Airport security rules set those and can differ between airports.\n- Checked hold baggage allowances or the cost of adding a bag. Use the airline's booking for that.\n\n## What you need\n\n- Operating carrier, booked fare and included or purchased bag type per flight leg, along with its stated limits.\n- Packed external dimensions including wheels and handles, weight, and the number of pieces carried.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which airline operates each flight, and what fare or bag option did you book on each? The outbound allowance does not carry over to a return on another airline or fare.\n- What are the bag's packed outside measurements, including wheels, handles and pockets, and its packed weight?\n- How many bags will you carry on, counting a handbag, laptop bag or duty-free?\n\n## Method\n\n1. For each leg, take the allowance from the booking confirmation for the airline operating that flight: number of pieces, type (under-seat item or overhead bag), size limit and weight limit. Count only items included in the fare or paid for.\n2. Measure the packed bag on the outside, including wheels, handles that do not retract and full pockets, and convert to the allowance's units.\n3. Compare size against one allowance at a time with all three dimensions together. If the bag may be turned, sort both sets of dimensions largest to smallest before comparing; otherwise compare them as stated.\n4. Check piece count and weight separately from size. A bag within the size limit can still fail on weight or count.\n5. Mark a leg fits only when pieces, size and weight are all known to pass, or the airline states there is no weight limit. Mark it exceeds as soon as one breach is proved, even if another figure is missing. Otherwise mark it check and say what to measure.\n6. Give the result leg by leg with each breach and its size, and suggest the fix the booking offers, such as adding a larger cabin bag online, which some airlines charge more for at the gate.\n\n## Checks before you deliver\n\n- A cabin-size marketing label is not a measurement.\n- Dimensions within limits do not compensate for exceeding the weight limit. If a policy explicitly has no weight limit, distinguish that from an unknown limit.\n- Using the outbound airline's allowance for a return flight run by a different airline or booked on a different fare.\n- Measuring the bag empty, or without wheels and handles, when the limit applies to the packed bag including them.\n- Comparing dimensions in a fixed order when the bag may be turned, which can fail a bag that fits.\n\n## How to present the result\n\nLead with a one-line answer for each leg: fits, exceeds or check. Then give a table with each leg's allowance, the bag's measurements and weight, and each breach with how far over it is. Finish with the options: a smaller bag, a larger cabin bag added online, or the measurement still needed.\n\n## Worked example\n\n**Request:** Can my one packed bag go on both flights?\n\n**Supplied material:**\n\n```text\nBag 54 x 38 x 21 cm, 8 kg, handles included. Rotation allowed. Out: one bag up to 55 x 40 x 23 cm, 10 kg. Back: one bag up to 45 x 36 x 20 cm, 10 kg.\n```\n\n**Answer:** The 54 \u00d7 38 \u00d7 21 cm bag fits the outbound allowance and weighs 2 kg under the limit. On the return it exceeds the 45 \u00d7 36 \u00d7 20 cm allowance on all three dimensions. Use a smaller bag for the round trip or check the return fare\u2019s larger-bag options.\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 an object keyed by leg ID with status ('fits', 'exceeds' or 'check') and reasons, an array containing applicable codes in this order: 'pieces', 'size', 'weight', 'missing'. Sort each set of dimensions largest to smallest when rotation is allowed. Omit 'missing' when a proven breach is sufficient.\n\n## Sources\n\n- [easyJet: cabin bags](https:\/\/www.easyjet.com\/en\/help\/baggage\/cabin-bags): easyJet's page shows that the allowance depends on what was booked: every passenger gets one under-seat bag up to 45 x 36 x 20 cm, a large cabin bag up to 56 x 45 x 25 cm must be included in the fare or bought, both limits include handles and wheels, and adding the large bag at the gate costs more than online. Figures were current when checked and illustrate why each leg's own entitlement matters.\n- [GOV.UK: hand luggage restrictions at UK airports](https:\/\/www.gov.uk\/hand-luggage-restrictions): Tells travellers to check with their airline how many bags and what size they can take on board, and treats liquids and other security restrictions separately, noting that rules differ between airports. This is why size, weight and count come from the airline and security rules are out of scope.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/check-cabin-bag-by-flight\n","scope":"contextual","trigger_keywords":["Check a cabin bag against every flight","check-cabin-bag-by-flight","check cabin bag by flight","Will my cabin bag be allowed on both airlines on this trip?","Will my cabin bag be allowed on both airlines on this trip","cabin bag allowance","will my cabin bag","carry-on allowance"],"is_private":true,"is_active":true,"scripts":[{"name":"check-cabin-bag-by-flight-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-cabin-bag-by-flight-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-cabin-bag-by-flight\ndescription: \"Check a packed cabin bag against the allowance on each booked flight: size including wheels and handles, weight and number of pieces, using the operating airline's rules for that fare. Use when someone asks whether their carry-on or hand luggage will be accepted on every leg of a trip.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/check-cabin-bag-by-flight\n---\n\n# Check a cabin bag against every flight\n\nUse the allowance on each booked fare and the bag\u2019s packed external measurements to find the legs on which it fits.\n\n## When to use this skill\n\n- Someone is taking one bag on a trip with different airlines or fares on the way out and back.\n- A low fare includes only a small under-seat bag and the person wants to know if their case qualifies.\n- Someone has measured and weighed their packed bag and wants a leg-by-leg answer before going to the airport.\n\n## When not to use it\n\n- What can pass through security, such as liquids or sharp items. Airport security rules set those and can differ between airports.\n- Checked hold baggage allowances or the cost of adding a bag. Use the airline's booking for that.\n\n## What you need\n\n- Operating carrier, booked fare and included or purchased bag type per flight leg, along with its stated limits.\n- Packed external dimensions including wheels and handles, weight, and the number of pieces carried.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which airline operates each flight, and what fare or bag option did you book on each? The outbound allowance does not carry over to a return on another airline or fare.\n- What are the bag's packed outside measurements, including wheels, handles and pockets, and its packed weight?\n- How many bags will you carry on, counting a handbag, laptop bag or duty-free?\n\n## Method\n\n1. For each leg, take the allowance from the booking confirmation for the airline operating that flight: number of pieces, type (under-seat item or overhead bag), size limit and weight limit. Count only items included in the fare or paid for.\n2. Measure the packed bag on the outside, including wheels, handles that do not retract and full pockets, and convert to the allowance's units.\n3. Compare size against one allowance at a time with all three dimensions together. If the bag may be turned, sort both sets of dimensions largest to smallest before comparing; otherwise compare them as stated.\n4. Check piece count and weight separately from size. A bag within the size limit can still fail on weight or count.\n5. Mark a leg fits only when pieces, size and weight are all known to pass, or the airline states there is no weight limit. Mark it exceeds as soon as one breach is proved, even if another figure is missing. Otherwise mark it check and say what to measure.\n6. Give the result leg by leg with each breach and its size, and suggest the fix the booking offers, such as adding a larger cabin bag online, which some airlines charge more for at the gate.\n\n## Checks before you deliver\n\n- A cabin-size marketing label is not a measurement.\n- Dimensions within limits do not compensate for exceeding the weight limit. If a policy explicitly has no weight limit, distinguish that from an unknown limit.\n- Using the outbound airline's allowance for a return flight run by a different airline or booked on a different fare.\n- Measuring the bag empty, or without wheels and handles, when the limit applies to the packed bag including them.\n- Comparing dimensions in a fixed order when the bag may be turned, which can fail a bag that fits.\n\n## How to present the result\n\nLead with a one-line answer for each leg: fits, exceeds or check. Then give a table with each leg's allowance, the bag's measurements and weight, and each breach with how far over it is. Finish with the options: a smaller bag, a larger cabin bag added online, or the measurement still needed.\n\n## Worked example\n\n**Request:** Can my one packed bag go on both flights?\n\n**Supplied material:**\n\n```text\nBag 54 x 38 x 21 cm, 8 kg, handles included. Rotation allowed. Out: one bag up to 55 x 40 x 23 cm, 10 kg. Back: one bag up to 45 x 36 x 20 cm, 10 kg.\n```\n\n**Answer:** The 54 \u00d7 38 \u00d7 21 cm bag fits the outbound allowance and weighs 2 kg under the limit. On the return it exceeds the 45 \u00d7 36 \u00d7 20 cm allowance on all three dimensions. Use a smaller bag for the round trip or check the return fare\u2019s larger-bag options.\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 an object keyed by leg ID with status ('fits', 'exceeds' or 'check') and reasons, an array containing applicable codes in this order: 'pieces', 'size', 'weight', 'missing'. Sort each set of dimensions largest to smallest when rotation is allowed. Omit 'missing' when a proven breach is sufficient.\n\n## Sources\n\n- [easyJet: cabin bags](https:\/\/www.easyjet.com\/en\/help\/baggage\/cabin-bags): easyJet's page shows that the allowance depends on what was booked: every passenger gets one under-seat bag up to 45 x 36 x 20 cm, a large cabin bag up to 56 x 45 x 25 cm must be included in the fare or bought, both limits include handles and wheels, and adding the large bag at the gate costs more than online. Figures were current when checked and illustrate why each leg's own entitlement matters.\n- [GOV.UK: hand luggage restrictions at UK airports](https:\/\/www.gov.uk\/hand-luggage-restrictions): Tells travellers to check with their airline how many bags and what size they can take on board, and treats liquids and other security restrictions separately, noting that rules differ between airports. This is why size, weight and count come from the airline and security rules are out of scope.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/check-cabin-bag-by-flight\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-cabin-bag-by-flight\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# The return flight is stricter\n\nCan my one packed bag go on both flights?\n\n## Supplied material\n\nBag 54 x 38 x 21 cm, 8 kg, handles included. Rotation allowed. Out: one bag up to 55 x 40 x 23 cm, 10 kg. Back: one bag up to 45 x 36 x 20 cm, 10 kg.\n\n## Worked answer\n\nThe 54 \u00d7 38 \u00d7 21 cm bag fits the outbound allowance and weighs 2 kg under the limit. On the return it exceeds the 45 \u00d7 36 \u00d7 20 cm allowance on all three dimensions. Use a smaller bag for the round trip or check the return fare\u2019s larger-bag options.\n\n## Reasoning\n\nThe outbound allowance does not transfer to the return leg.\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":"Can my one packed bag go on both flights?\nReturn only the JSON specified in SKILL.md for this test.\n\nBag 54 x 38 x 21 cm, 8 kg, handles included. Rotation allowed. Out: one bag up to 55 x 40 x 23 cm, 10 kg. Back: one bag up to 45 x 36 x 20 cm, 10 kg.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"Out\": {\n        \"status\": \"fits\",\n        \"reasons\": []\n    },\n    \"Back\": {\n        \"status\": \"exceeds\",\n        \"reasons\": [\n            \"size\"\n        ]\n    }\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The outbound allowance does not transfer to the return leg.\n"},{"path":"tests\/case-2\/request.txt","content":"I have not weighed my two bags. Check both legs.\nReturn only the JSON specified in SKILL.md for this test.\n\nTwo bags 38 x 25 x 15 cm each, packed weights unknown. Rotation allowed. A: one bag only, max 40 x 30 x 20 cm, 7 kg per bag. B: two bags, each max 40 x 30 x 20 cm, 7 kg.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"A\": {\n        \"status\": \"exceeds\",\n        \"reasons\": [\n            \"pieces\"\n        ]\n    },\n    \"B\": {\n        \"status\": \"check\",\n        \"reasons\": [\n            \"missing\"\n        ]\n    }\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A already fails on piece count. Weighing the bags could resolve B.\n"}],"is_active":true,"is_approved":false}]}]}