{"skill":{"slug":"openclaw-commute-traffic","displayName":"Commute Traffic","summary":"Check real-time traffic conditions for a route between two locations using TomTom. Use when the user asks about traffic, commute time, best time to leave, dr...","description":"---\nname: commute-traffic\ndescription: Check real-time traffic conditions for a route between two locations using TomTom. Use when the user asks about traffic, commute time, best time to leave, driving conditions, or road congestion. The user provides origin and destination conversationally — extract them from context.\nversion: 2.0.0\nuser-invocable: true\nmetadata:\n  {\"openclaw\": {\"emoji\": \"🚗\", \"requires\": {\"bins\": [\"python3\"], \"env\": [\"TOMTOM_API_KEY\"]}, \"primaryEnv\": \"TOMTOM_API_KEY\"}}\n---\n\n# Commute Traffic Checker (TomTom)\n\n## Purpose\n\nQuery real-time traffic data from TomTom for any route and provide the user with actionable travel advice. The script handles geocoding (resolving place names to coordinates) and routing (calculating travel time with live traffic) — all via the same TomTom API key.\n\n## Determining Origin and Destination\n\nThe origin and destination are **not static** — you must determine them from what the user tells you. Examples:\n\n- \"How's traffic from the office to home?\" → You must know (or ask) where their office and home are.\n- \"Check traffic Basel to Zurich\" → origin=Basel, destination=Zurich.\n- \"Should I leave now?\" → Use previously discussed or known origin/destination. If unknown, ask.\n- \"What's the commute like?\" → If you know the user's regular commute, use that. Otherwise, ask.\n\n**Rules:**\n1. If both origin and destination are clear from context, proceed immediately.\n2. If only one is clear, ask for the missing one.\n3. If neither is clear and you have no prior context, ask the user for both.\n4. Accept any format: addresses, city names, landmarks, coordinates — the script geocodes automatically.\n\n## Running the Traffic Check\n\nExecute the script with origin and destination as arguments:\n\n```bash\npython3 {baseDir}/scripts/check_traffic.py --origin \"<ORIGIN>\" --destination \"<DESTINATION>\"\n```\n\n**Examples:**\n\n```bash\npython3 {baseDir}/scripts/check_traffic.py --origin \"Basel, Switzerland\" --destination \"Zurich, Switzerland\"\npython3 {baseDir}/scripts/check_traffic.py --origin \"Basel SBB\" --destination \"Paradeplatz, Zürich\"\npython3 {baseDir}/scripts/check_traffic.py --origin \"Aeschenplatz, Basel\" --destination \"ETH Zürich\"\n```\n\n## Interpreting the Output\n\nThe script returns JSON with one or more route alternatives. For each route:\n\n| Field | Meaning |\n|-------|---------|\n| `travel_time_min` | Total travel time **with current live traffic** |\n| `no_traffic_time_min` | Travel time with zero traffic (free-flow) |\n| `historic_traffic_time_min` | Typical travel time based on historical patterns |\n| `live_traffic_time_min` | Time including live incident data |\n| `traffic_delay_min` | Extra delay caused by current traffic |\n| `traffic_delay_pct` | Delay as percentage of free-flow time |\n| `congestion` | Derived level: `light`, `moderate`, or `heavy` |\n| `distance_km` | Route distance in kilometers |\n| `departure_time` / `arrival_time` | Departure and estimated arrival timestamps |\n\n### Congestion classification:\n- **Light**: traffic delay adds less than 20% to free-flow time\n- **Moderate**: 20–50% above free-flow\n- **Heavy**: more than 50% above free-flow\n\n## Presenting Results to the User\n\nWhen presenting traffic data, always include:\n\n1. **The fastest route** and its estimated travel time.\n2. **Traffic delay** in plain language (e.g., \"Currently 8 minutes delay due to traffic on the A2, adding about 15% to the normal drive time\").\n3. **Comparison of alternatives** if multiple routes are returned.\n4. **A recommendation**: whether to leave now or wait, based on congestion level.\n\nKeep it concise and practical. The user wants to know: *\"How long will it take and should I go now?\"*\n\n## Error Handling\n\n- If the script returns `{\"status\": \"error\"}`, relay the error message to the user.\n- If `TOMTOM_API_KEY` is not configured, tell the user to set it up in `~/.openclaw/openclaw.json`.\n- If geocoding fails (no coordinates found), the location may be too vague — ask the user to be more specific.\n- If no routes are returned, suggest trying different location descriptions.\n","tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":836,"installsAllTime":32,"installsCurrent":2,"stars":1,"versions":1},"createdAt":1772369440833,"updatedAt":1778994241657},"latestVersion":{"version":"0.1.0","createdAt":1772369440833,"changelog":"**Major update for commute-traffic: now smarter at understanding user queries and delivers clear, real-time TomTom traffic info.**\n\n- Determines origin and destination dynamically from the user's conversation, with guidance on resolving missing details.\n- Accepts any address, city, landmark, or coordinate as input; no rigid format required.\n- Presents practical commute advice, including current travel time, delay, alternative routes, and clear recommendations.\n- Provides robust error-handling for missing API keys, vague locations, and route issues.\n- Updated to version 2.0.0 with improved conversational context support and user-oriented results.","license":null},"metadata":{"setup":[{"key":"TOMTOM_API_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"xavjer","userId":"s17b0gzkct8zszac3t9685pd6983kth8","displayName":"Xavjer","image":"https://avatars.githubusercontent.com/u/4498205?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779970332103}}