[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74HGEJ29M8WHPTCQAW9YN46":3,"skill-same:01M74HGEJ29M8WHPTCQAW9YN46":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M74HGEJ29M8WHPTCQAW9YN46","geospatial-routing-data",null,"Geospatial routing data handling for depot and station coordinates, route node IDs, internal index mappings, great-circle distance matrices, and route-distance reconstruction. Use when optimization or reporting tasks involve latitude\u002Flongitude, station IDs, depots, distance metrics, vehicle routes, or validating travel distance from reported paths.","Raidriar7170\u002Fhermes-skilleval","Raidriar7170","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118113656?v=4","01M74HF0DSG5XS53PVXERD6V51","Adrian Sun","01M74HF0EJJHQE5XJ0MV1MRFHX",29,"MIT","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Fartifacts\u002Fv0.3\u002Fskillsbench-pilot\u002Fv0.3-stage2-input-package-candidate-20260701T010000Z\u002Fcandidate-data\u002Fskill-sources\u002Fskillsbench__geospatial-routing-data\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: geospatial-routing-data\ndescription: Geospatial routing data handling for depot and station coordinates, route node IDs, internal index mappings, great-circle distance matrices, and route-distance reconstruction. Use when optimization or reporting tasks involve latitude\u002Flongitude, station IDs, depots, distance metrics, vehicle routes, or validating travel distance from reported paths.\n---\n\n# Geospatial Routing Data\n\nUse this skill before building a routing model or validating a routing report that contains coordinates, depots, station IDs, and route sequences.\n\nThe main risk is mixing user-facing IDs with internal array indices or using a different distance metric from the task.\n\n## Parse Data Safely\n\nLoad structured data with a parser and build explicit mappings:\n\n```python\nimport json\nfrom pathlib import Path\n\ndata = json.loads(Path(\"\u002Froot\u002Fdata.json\").read_text())\nstations_data = data[\"stations\"]\n\nstation_ids = [int(s[\"id\"]) for s in stations_data]\nif len(station_ids) != len(set(station_ids)):\n    raise ValueError(\"duplicate station ids\")\n\nid_to_idx = {sid: idx for idx, sid in enumerate(station_ids)}\nidx_to_id = {idx: sid for sid, idx in id_to_idx.items()}\n```\n\nUse internal indices in optimization variables. Use original station IDs in final reports.\n\n## Coordinate Validation\n\nCheck coordinates before building distances:\n\n```python\ndef parse_location(record, label):\n    lat = float(record[\"latitude\"])\n    lon = float(record[\"longitude\"])\n    if not (-90.0 \u003C= lat \u003C= 90.0):\n        raise ValueError(f\"{label} latitude out of range: {lat}\")\n    if not (-180.0 \u003C= lon \u003C= 180.0):\n        raise ValueError(f\"{label} longitude out of range: {lon}\")\n    return {\"latitude\": lat, \"longitude\": lon}\n\ndepot = parse_location(data[\"depot\"], \"depot\")\nstation_locations = [parse_location(s, f\"station {s['id']}\") for s in stations_data]\n```\n\nLatitude and longitude are degrees. Convert to radians only inside the distance function.\n\n## Great-Circle Distance\n\nMatch the task's declared distance metric. If the task specifies an Earth radius, use that exact value.\n\nFor great-circle miles with Earth radius `3960.0`, use:\n\n```python\nimport math\n\ndef great_circle_miles(a, b, radius=3960.0):\n    lat1 = float(a[\"latitude\"])\n    lon1 = float(a[\"longitude\"])\n    lat2 = float(b[\"latitude\"])\n    lon2 = float(b[\"longitude\"])\n\n    deg_to_rad = math.pi \u002F 180.0\n    phi1 = (90.0 - lat1) * deg_to_rad\n    phi2 = (90.0 - lat2) * deg_to_rad\n    theta1 = lon1 * deg_to_rad\n    theta2 = lon2 * deg_to_rad\n\n    cos_arc = (\n        math.sin(phi1) * math.sin(phi2) * math.cos(theta1 - theta2)\n        + math.cos(phi1) * math.cos(phi2)\n    )\n    cos_arc = max(-1.0, min(1.0, cos_arc))\n    return math.acos(cos_arc) * radius\n```\n\nClamp `cos_arc` into `[-1, 1]` to avoid floating-point domain errors.\n\nDo not mix:\n\n- Euclidean distance on degrees;\n- haversine with a different Earth radius;\n- miles and meters;\n- rounded distances inside the optimization objective.\n\n## Build Routing Nodes\n\nUse separate depot labels when the route output must show a start and end depot:\n\n```python\nSTART = \"depot_start\"\nEND = \"depot_end\"\n\nstations = range(len(stations_data))\nfrom_nodes = [START, *stations]\nto_nodes = [*stations, END]\n\ndef node_location(node):\n    if node in (START, END):\n        return depot\n    return station_locations[int(node)]\n```\n\nBuild distances over the same arc set used by the optimization model:\n\n```python\ndistances = {}\nfor i in from_nodes:\n    for j in to_nodes:\n        if i == j:\n            continue\n        if i == START and j == END:\n            continue  # omit if vehicles must visit at least one station\n        distances[i, j] = great_circle_miles(node_location(i), node_location(j))\n```\n\nIf direct depot-to-depot travel is allowed, keep the `(START, END)` arc.\n\n## Convert Routes Between IDs and Indices\n\nOptimization route using internal indices:\n\n```python\nroute_nodes = [START, 3, 7, 2, END]\n```\n\nReport route using original station IDs:\n\n```python\nreport_route = [\n    node if isinstance(node, str) else idx_to_id[int(node)]\n    for node in route_nodes\n]\n```\n\nParse a reported route back to internal indices:\n\n```python\ndef parse_report_route(route):\n    if route[0] != START or route[-1] != END:\n        raise ValueError(\"route must start at depot_start and end at depot_end\")\n\n    parsed = [START]\n    for raw in route[1:-1]:\n        sid = int(raw)\n        if sid not in id_to_idx:\n            raise ValueError(f\"unknown station id {sid}\")\n        parsed.append(id_to_idx[sid])\n    parsed.append(END)\n    return parsed\n```\n\nNever assume station IDs are `0..n-1`.\n\n## Reconstruct Route Distance\n\nRecompute reported travel distance from route sequences:\n\n```python\ndef pairwise(items):\n    return list(zip(items, items[1:]))\n\ndef route_distance_internal(route_nodes):\n    total = 0.0\n    for i, j in pairwise(route_nodes):\n        total += distances[i, j]\n    return total\n\ndef route_distance_reported_ids(route):\n    internal = parse_report_route(route)\n    return route_distance_internal(internal)\n```\n\nFor multiple vehicles:\n\n```python\ntravel_distance = sum(\n    route_distance_reported_ids(vehicle[\"route\"])\n    for vehicle in report[\"vehicles\"]\n)\n```\n\nCompare with tolerance, not exact string equality:\n\n```python\ndef assert_close(actual, expected, tol=1e-6):\n    if abs(actual - expected) > max(tol, tol * max(1.0, abs(expected))):\n        raise AssertionError(f\"{actual} != {expected}\")\n```\n\n## Route Data Checks\n\nBefore trusting a route:\n\n- first node is the start depot label;\n- last node is the end depot label;\n- every non-depot node is a known station ID;\n- route has at least one station if vehicles cannot stay at the depot;\n- station sequence length equals the stop list length;\n- no repeated station within a route when per-vehicle no-repeat is required;\n- distance is recomputed from coordinates, not copied from model output.\n","# Geospatial Routing Data\n\nUse this skill before building a routing model or validating a routing report that contains coordinates, depots, station IDs, and route sequences.\n\nThe main risk is mixing user-facing IDs with internal array indices or using a different distance metric from the task.\n\n## Parse Data Safely\n\nLoad structured data with a parser and build explicit mappings:\n\n```python\nimport json\nfrom pathlib import Path\n\ndata = json.loads(Path(\"\u002Froot\u002Fdata.json\").read_text())\nstations_data = data[\"stations\"]\n\nstation_ids = [int(s[\"id\"]) for s in stations_data]\nif len(station_ids) != len(set(station_ids)):\n    raise ValueError(\"duplicate station ids\")\n\nid_to_idx = {sid: idx for idx, sid in enumerate(station_ids)}\nidx_to_id = {idx: sid for sid, idx in id_to_idx.items()}\n```\n\nUse internal indices in optimization variables. Use original station IDs in final reports.\n\n## Coordinate Validation\n\nCheck coordinates before building distances:\n\n```python\ndef parse_location(record, label):\n    lat = float(record[\"latitude\"])\n    lon = float(record[\"longitude\"])\n    if not (-90.0 \u003C= lat \u003C= 90.0):\n        raise ValueError(f\"{label} latitude out of range: {lat}\")\n    if not (-180.0 \u003C= lon \u003C= 180.0):\n        raise ValueError(f\"{label} longitude out of range: {lon}\")\n    return {\"latitude\": lat, \"longitude\": lon}\n\ndepot = parse_location(data[\"depot\"], \"depot\")\nstation_locations = [parse_location(s, f\"station {s['id']}\") for s in stations_data]\n```\n\nLatitude and longitude are degrees. Convert to radians only inside the distance function.\n\n## Great-Circle Distance\n\nMatch the task's declared distance metric. If the task specifies an Earth radius, use that exact value.\n\nFor great-circle miles with Earth radius `3960.0`, use:\n\n```python\nimport math\n\ndef great_circle_miles(a, b, radius=3960.0):\n    lat1 = float(a[\"latitude\"])\n    lon1 = float(a[\"longitude\"])\n    lat2 = float(b[\"latitude\"])\n    lon2 = float(b[\"longitude\"])\n\n    deg_to_rad = math.pi \u002F 180.0\n    phi1 = (90.0 - lat1) * deg_to_rad\n    phi2 = (90.0 - lat2) * deg_to_rad\n    theta1 = lon1 * deg_to_rad\n    theta2 = lon2 * deg_to_rad\n\n    cos_arc = (\n        math.sin(phi1) * math.sin(phi2) * math.cos(theta1 - theta2)\n        + math.cos(phi1) * math.cos(phi2)\n    )\n    cos_arc = max(-1.0, min(1.0, cos_arc))\n    return math.acos(cos_arc) * radius\n```\n\nClamp `cos_arc` into `[-1, 1]` to avoid floating-point domain errors.\n\nDo not mix:\n\n- Euclidean distance on degrees;\n- haversine with a different Earth radius;\n- miles and meters;\n- rounded distances inside the optimization objective.\n\n## Build Routing Nodes\n\nUse separate depot labels when the route output must show a start and end depot:\n\n```python\nSTART = \"depot_start\"\nEND = \"depot_end\"\n\nstations = range(len(stations_data))\nfrom_nodes = [START, *stations]\nto_nodes = [*stations, END]\n\ndef node_location(node):\n    if node in (START, END):\n        return depot\n    return station_locations[int(node)]\n```\n\nBuild distances over the same arc set used by the optimization model:\n\n```python\ndistances = {}\nfor i in from_nodes:\n    for j in to_nodes:\n        if i == j:\n            continue\n        if i == START and j == END:\n            continue  # omit if vehicles must visit at least one station\n        distances[i, j] = great_circle_miles(node_location(i), node_location(j))\n```\n\nIf direct depot-to-depot travel is allowed, keep the `(START, END)` arc.\n\n## Convert Routes Between IDs and Indices\n\nOptimization route using internal indices:\n\n```python\nroute_nodes = [START, 3, 7, 2, END]\n```\n\nReport route using original station IDs:\n\n```python\nreport_route = [\n    node if isinstance(node, str) else idx_to_id[int(node)]\n    for node in route_nodes\n]\n```\n\nParse a reported route back to internal indices:\n\n```python\ndef parse_report_route(route):\n    if route[0] != START or route[-1] != END:\n        raise ValueError(\"route must start at depot_start and end at depot_end\")\n\n    parsed = [START]\n    for raw in route[1:-1]:\n        sid = int(raw)\n        if sid not in id_to_idx:\n            raise ValueError(f\"unknown station id {sid}\")\n        parsed.append(id_to_idx[sid])\n    parsed.append(END)\n    return parsed\n```\n\nNever assume station IDs are `0..n-1`.\n\n## Reconstruct Route Distance\n\nRecompute reported travel distance from route sequences:\n\n```python\ndef pairwise(items):\n    return list(zip(items, items[1:]))\n\ndef route_distance_internal(route_nodes):\n    total = 0.0\n    for i, j in pairwise(route_nodes):\n        total += distances[i, j]\n    return total\n\ndef route_distance_reported_ids(route):\n    internal = parse_report_route(route)\n    return route_distance_internal(internal)\n```\n\nFor multiple vehicles:\n\n```python\ntravel_distance = sum(\n    route_distance_reported_ids(vehicle[\"route\"])\n    for vehicle in report[\"vehicles\"]\n)\n```\n\nCompare with tolerance, not exact string equality:\n\n```python\ndef assert_close(actual, expected, tol=1e-6):\n    if abs(actual - expected) > max(tol, tol * max(1.0, abs(expected))):\n        raise AssertionError(f\"{actual} != {expected}\")\n```\n\n## Route Data Checks\n\nBefore trusting a route:\n\n- first node is the start depot label;\n- last node is the end depot label;\n- every non-depot node is a known station ID;\n- route has at least one station if vehicles cannot stay at the depot;\n- station sequence length equals the stop list length;\n- no repeated station within a route when per-vehicle no-repeat is required;\n- distance is recomputed from coordinates, not copied from model output.\n",{"name":5,"description":7},"main","8f6a21e53c1363ee18ea6d6e3db1f4b3805ff552","artifacts\u002Fv0.3\u002Fskillsbench-pilot\u002Fv0.3-stage2-input-package-candidate-20260701T010000Z\u002Fcandidate-data\u002Fskill-sources\u002Fskillsbench__geospatial-routing-data",1,"https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval","https:\u002F\u002Fgithub.com\u002FRaidriar7170","https:\u002F\u002Flinkedin.com\u002Fin\u002Fminghongsun","UCSD ECE M.S. '27 | LLM\u002FAgent algorithms, multimodal grounding, post-training & evaluation","2026-09-26 13:41:34",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Raidriar7170\u002Fhermes-skilleval --skill geospatial-routing-data",{"tool":39,"command":40},"bunx","bunx skills add Raidriar7170\u002Fhermes-skilleval --skill geospatial-routing-data",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Raidriar7170\u002Fhermes-skilleval --skill geospatial-routing-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Fartifacts\u002Fv0.3\u002Fskillsbench-pilot\u002Fv0.3-stage2-input-package-candidate-20260701T010000Z\u002Fcandidate-data\u002Fskill-sources\u002Fskillsbench__geospatial-routing-data\u002FSKILL.md",true,[],[48,54,61,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M74HPD1Y2K0FZDH27KCC8TN4","songwriting-and-ai-music","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fcreative\u002Fsongwriting-and-ai-music\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M74HPANJ9S5FJF4ENQNGSKBH","test-driven-development","Use when implementing behavior that can be covered by automated tests.","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fcoding\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M74HP9BHCYRS5NX8K8A2SKQD","systematic-debugging","Use when diagnosing failing tests, runtime errors, or unexpected behavior.","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fcoding\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M74HP77TN9ZZMXVVXFKDTHQ3","workflow-evidence-audit","Use when auditing validation workflow evidence before a maintainer review or diagnostic handoff.","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Fexamples\u002Fgithub-action\u002Fskills\u002Fworkflow-evidence-audit\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M74HP42HQ8KAJFT2HETRBPN6","release-note-review","Use when reviewing release notes for evidence boundaries, local validation summaries, and explicit non-goals.","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Fexamples\u002Fgithub-action\u002Fskills\u002Frelease-note-review\u002FSKILL.md",[],[],{"skillNo":83,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M74HP191NV4NH4C2NRZK2GY0","https:\u002F\u002Fgithub.com\u002FRaidriar7170\u002Fhermes-skilleval\u002Fblob\u002Fmain\u002Fdocs\u002Fdemo\u002Fexternal-skill-library-validation\u002Fsource\u002Fmarkdown-skills\u002Freview\u002Fworkflow-evidence-audit\u002FSKILL.md",[],[]]