smart-route
Calculate 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.
Why use this skill?
Integrate Google Routes API into OpenClaw to get real-time traffic updates, travel times, and navigation links for any two locations with ease.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/vemec/smart-routeWhat This Skill Does
The smart-route skill integrates OpenClaw with the Google Routes API (v2) to provide real-time, traffic-aware navigation data. It functions as a specialized utility for calculating travel times, physical distances, and optimal routes between two geographic locations. Unlike simple static mapping, this skill accounts for live traffic conditions, making it an essential tool for logistical planning and trip estimation. When executed, the skill triggers a Node.js script that communicates securely with Google's backend servers and returns a structured JSON payload containing duration, distance, and a direct URL to Google Maps for turn-by-turn navigation.
Installation
To integrate this skill into your environment, use the OpenClaw package manager. Execute the following command in your terminal:
clawhub install openclaw/skills/skills/vemec/smart-route
Post-installation, you must authenticate the skill by obtaining a Google Cloud API Key. Once you have enabled the 'Routes API' in your Google Cloud Console, set the following environment variable in your session configuration:
export GOOGLE_ROUTES_API_KEY="your_api_key_here"
Ensure this variable is correctly exported, as the script employs a strict validation mode that will terminate execution if the credential is missing.
Use Cases
This skill is designed for scenarios requiring precise location-based intelligence. Primary use cases include daily commute planning, fleet management coordination, delivery scheduling, and personal travel assistance. It is particularly effective when integrated into agents tasked with assisting users who are mobile or managing time-sensitive appointments in urban environments where traffic variability is high.
Example Prompts
- "What does traffic look like if I drive from downtown to the airport right now?"
- "How long will it take to get to the conference center from my hotel, and can you give me the link for directions?"
- "Calculate the driving distance between the office in San Jose and the warehouse in Oakland."
Tips & Limitations
- Privacy: Be mindful that origin and destination strings are transmitted to external Google APIs. Do not use highly sensitive or private locations if privacy is a primary concern.
- Precision: The accuracy of the duration depends on the real-time data provided by Google. Always verify critical arrival times.
- Modes: The skill supports DRIVE, BICYCLE, and WALK modes. Specify the mode to receive accurate travel estimates for non-automotive transit.
- Scope: Ensure the Google Cloud project has billing enabled, as the Routes API may incur costs based on usage volume.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-vemec-smart-route": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, code-execution