Install
openclaw skills install openclaw-commute-trafficCheck 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.
openclaw skills install openclaw-commute-trafficQuery 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.
The origin and destination are not static — you must determine them from what the user tells you. Examples:
Rules:
Execute the script with origin and destination as arguments:
python3 {baseDir}/scripts/check_traffic.py --origin "<ORIGIN>" --destination "<DESTINATION>"
Examples:
python3 {baseDir}/scripts/check_traffic.py --origin "Basel, Switzerland" --destination "Zurich, Switzerland"
python3 {baseDir}/scripts/check_traffic.py --origin "Basel SBB" --destination "Paradeplatz, Zürich"
python3 {baseDir}/scripts/check_traffic.py --origin "Aeschenplatz, Basel" --destination "ETH Zürich"
The script returns JSON with one or more route alternatives. For each route:
| Field | Meaning |
|---|---|
travel_time_min | Total travel time with current live traffic |
no_traffic_time_min | Travel time with zero traffic (free-flow) |
historic_traffic_time_min | Typical travel time based on historical patterns |
live_traffic_time_min | Time including live incident data |
traffic_delay_min | Extra delay caused by current traffic |
traffic_delay_pct | Delay as percentage of free-flow time |
congestion | Derived level: light, moderate, or heavy |
distance_km | Route distance in kilometers |
departure_time / arrival_time | Departure and estimated arrival timestamps |
When presenting traffic data, always include:
Keep it concise and practical. The user wants to know: "How long will it take and should I go now?"
{"status": "error"}, relay the error message to the user.TOMTOM_API_KEY is not configured, tell the user to set it up in ~/.openclaw/openclaw.json.