Install
openclaw skills install smart-routeCalculate traffic-aware routes, travel times, and distances between locations using Google Routes API. Use when the user asks for "traffic to X", "how long to get to Y", "best route to Z", or "drive time". Returns JSON with duration, distance, and a direct Google Maps navigation link.
openclaw skills install smart-routeGet real-time traffic and routing information via Google Routes API (v2).
Use this skill immediately when the user asks:
This skill executes a Node.js script. It requires an API Key with "Routes API" enabled.
node skills/smart-route/scripts/get_route.js --origin "Origin Address" --destination "Destination Address" [--mode DRIVE|BICYCLE|WALK]
The script returns a JSON object:
{
"origin": "Union Square, San Francisco, CA",
"destination": "Golden Gate Bridge, San Francisco, CA",
"mode": "DRIVE",
"duration": "30 min",
"distance": "13.5 km",
"traffic_duration_seconds": 1835,
"route_link": "https://www.google.com/maps/dir/?api=1&origin=...&destination=...&travelmode=driving"
}
Check traffic in San Francisco:
node skills/smart-route/scripts/get_route.js --origin "Union Square, San Francisco, CA" --destination "Golden Gate Bridge, San Francisco, CA"
Drive time in Los Angeles:
node skills/smart-route/scripts/get_route.js --origin "Los Angeles, CA" --destination "Santa Monica, CA" --mode DRIVE
routes.googleapis.com.This skill requires a Google Cloud API Key with the Routes API enabled.
GOOGLE_ROUTES_API_KEYexport GOOGLE_ROUTES_API_KEY="your_api_key_here"