Prompt
When a user requests a route calculation with addresses or coordinates, use this skill to calculate driving time, distance, and cost.
Usage:
- - INLINECODE0
- Start and goal must be in
longitude,latitude format OR addresses (convert using goplaces/naver-local-search first) - Returns: distance, duration, toll fare, taxi fare, fuel cost
Examples:
- -
/skill ncloud-maps "126.9633,37.5524" "127.0165,37.4889" (coordinates) - INLINECODE3 (addresses - requires geocoding skill first)
Ncloud Maps
Query Naver Cloud Maps APIs for intelligent routing (Directions5 + Directions15).
Key Feature: Smart Routing
v1.0.8+ — By default, the skill uses Directions5 for queries with fewer than 5 waypoints, and automatically switches to Directions15 when you have 5 or more waypoints. No manual selection needed.
| Waypoints | API Used | Max Waypoints |
|---|
| 0–4 | Directions5 | 5 |
| 5+ |
Directions15 | 15 |
Setup
- 1. Get API credentials from Naver Cloud Console:
- Create/register an Application in Naver Cloud Console
- Obtain
Client ID (API Key ID) and
Client Secret (API Key)
- Enable "Maps Directions15" API
- 2. Set environment variables (or use .env file):
CODEBLOCK0
Or create a .env file:
CODEBLOCK1
- 3. Install dependencies:
CODEBLOCK2
Usage
Using with Address-to-Coordinate Skills
ncloud-maps requires coordinates in longitude,latitude format. If you have address-based location data, use one of these compatible skills to convert addresses to coordinates:
Available Options (choose based on your environment):
| Skill | Provider | Coordinates | Setup Required |
|---|
| INLINECODE8 | Google Places API | Yes (lon,lat) | INLINECODE9 |
| INLINECODE10 |
Naver Local Search | Yes (lon,lat) |
NAVER_CLIENT_ID,
NAVER_CLIENT_SECRET |
| Custom API | Your choice | Yes (lon,lat) | Your setup |
Example workflow with goplaces:
CODEBLOCK3
Example workflow with naver-local-search:
CODEBLOCK4
Or integrate any other geocoding service that returns longitude,latitude coordinates.
Smart Routing (Default Behavior)
By default, no --api flag needed. The skill automatically:
- - Uses Directions5 for 0–4 waypoints (faster)
- Switches to Directions15 for 5+ waypoints (necessary)
Provide coordinates in longitude,latitude format:
CODEBLOCK5
Basic route query by coordinates (direct)
CODEBLOCK6
Force specific API (optional)
If you need to override the smart routing:
CODEBLOCK7
With waypoints (coordinates only)
CODEBLOCK8
Multiple waypoints:
CODEBLOCK9
Route options
Choose from: trafast (fast), tracomfort (comfort), traoptimal (default), traavoidtoll (toll-free), traavoidcaronly (avoid car-only roads)
CODEBLOCK10
Vehicle and fuel settings
CODEBLOCK11
Vehicle types:
- -
1 (default): Small sedan - INLINECODE22 : Medium van/cargo
- INLINECODE23 : Large vehicle
- INLINECODE24 : 3-axle cargo truck
- INLINECODE25 : 4+ axle special cargo
- INLINECODE26 : Compact car
Fuel types: gasoline (default), highgradegasoline, diesel, INLINECODE30
Output
CODEBLOCK12
Response Fields
- -
success - Whether the query succeeded - INLINECODE32 - Starting point coordinates
- INLINECODE33 - Destination coordinates
- INLINECODE34 - Total distance in meters
- INLINECODE35 - Total duration in milliseconds (÷1000 = seconds)
- INLINECODE36 - Toll/highway fare in KRW
- INLINECODE37 - Estimated taxi fare in KRW
- INLINECODE38 - Estimated fuel cost in KRW
- INLINECODE39 - Query timestamp
- INLINECODE40 - Error message (if success=false)
How It Works
- 1. Address Resolution (Optional - any geocoding skill)
- Use any available skill that provides coordinates (goplaces, naver-local-search, etc.)
- Extract
longitude,latitude format from the result
- Pass coordinates to ncloud-maps
- 2. Coordinate Validation
- Input: Coordinates in
longitude,latitude format (direct input or from geocoding skill)
- Validates format and range
- Returns error if format is invalid
- 3. Route Calculation (Directions15 or Directions5)
- Coordinates sent to appropriate Directions API
- Returns distance, duration, tolls, taxi fare, fuel cost
-
Only for vehicle (car) routes — not for pedestrian or public transit
- 4. Waypoints Support
- Each waypoint must be in
longitude,latitude format
- All coordinates sent to Directions API
Limitations
⚠️ This skill only calculates vehicle (car) routes. It does not support:
- - Public transportation (subway, bus, etc.)
- Walking routes
- Multi-modal journeys
- Transit-specific features (fare, stops, schedules)
For those use cases, use transit-specific APIs (e.g., Kakao Map, Naver Map Transit API).
Environment Variables
Required:
- -
NCLOUD_API_KEY_ID - Naver Cloud API Key ID - INLINECODE45 - Naver Cloud API Key Secret
API Limits
Smart Routing:
- - 0–4 waypoints: Directions5 API (max 5 waypoints)
- 5+ waypoints: Directions15 API (max 15 waypoints)
General:
- - Real-time traffic information included
- Request rate limits apply per your Naver Cloud plan
Error Handling
Common errors:
- -
좌표 형식 오류 - Invalid coordinate format (use longitude,latitude) - INLINECODE48 - Invalid API credentials
- INLINECODE49 - API rate limit hit
- INLINECODE50 - No valid route between points
Check Naver Cloud Console for:
- - API enablement for your application
- Quota/rate limit status
- Valid coordinates
References
See api-spec.md for detailed API specifications.
提示
当用户请求使用地址或坐标进行路线计算时,使用此技能计算驾驶时间、距离和费用。
用法:
- - /skill ncloud-maps <起点> <终点> [途经点]
- 起点和终点必须采用经度,纬度格式,或地址(先使用 goplaces/naver-local-search 进行转换)
- 返回:距离、耗时、通行费、出租车费、燃油费
示例:
- - /skill ncloud-maps 126.9633,37.5524 127.0165,37.4889(坐标)
- /skill ncloud-maps 阿岘站 瑞草站(地址 - 需要先使用地理编码技能)
Ncloud Maps
查询 Naver Cloud Maps API 实现智能路线规划(Directions5 + Directions15)。
核心功能:智能路由
v1.0.8+ — 默认情况下,当查询的途经点少于5个时,技能使用 Directions5;当途经点达到5个或更多时,自动切换至 Directions15。无需手动选择。
| 途经点数量 | 使用的 API | 最大途经点数量 |
|---|
| 0–4 | Directions5 | 5 |
| 5+ |
Directions15 | 15 |
设置
- 1. 从 Naver Cloud 控制台获取 API 凭证:
- 在 Naver Cloud 控制台中创建/注册应用程序
- 获取客户端 ID(API 密钥 ID)和客户端密钥(API 密钥)
- 启用Maps Directions15API
- 2. 设置环境变量(或使用 .env 文件):
bash
export NCLOUDAPIKEY_ID=your-api-key-id
export NCLOUDAPIKEY=your-api-key-secret
或者创建 .env 文件:
NCLOUDAPIKEY_ID=your-api-key-id
NCLOUDAPIKEY=your-api-key-secret
- 3. 安装依赖:
bash
cd ~/.openclaw/workspace/skills/ncloud-maps
npm install
使用方法
配合地址转坐标技能使用
ncloud-maps 需要采用经度,纬度格式的坐标。如果您拥有基于地址的位置数据,请使用以下兼容技能之一将地址转换为坐标:
可用选项(根据您的环境选择):
| 技能 | 提供商 | 坐标 | 需要设置 |
|---|
| goplaces | Google Places API | 是(经度,纬度) | GOOGLEPLACESAPIKEY |
| naver-local-search |
Naver Local Search | 是(经度,纬度) | NAVERCLIENT
ID, NAVERCLIENT_SECRET |
| 自定义 API | 自行选择 | 是(经度,纬度) | 自行设置 |
使用 goplaces 的示例工作流程:
bash
从地址获取坐标
COORDS=$(goplaces resolve 江南站, 首尔 --json | jq -r .places[0] | \(.location.longitude),\(.location.latitude))
使用坐标调用 ncloud-maps
npx ts-node scripts/index.ts --start $COORDS --goal 127.0049,37.4947
使用 naver-local-search 的示例工作流程:
bash
从地址获取坐标
COORDS=$(naver-local-search search 江南站 --format json | jq -r .[0] | \(.x),\(.y))
使用坐标调用 ncloud-maps
npx ts-node scripts/index.ts --start $COORDS --goal 127.0049,37.4947
或者集成任何其他返回经度,纬度坐标的地理编码服务。
智能路由(默认行为)
默认情况下,无需 --api 参数。技能会自动:
- - 对于 0–4 个途经点使用 Directions5(更快)
- 对于 5 个及以上途经点切换至 Directions15(必要)
以经度,纬度格式提供坐标:
bash
0–4 个途经点 → Directions5(自动)
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000|127.0200,37.5100
5+ 个途经点 → Directions15(自动)
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000|127.0200,37.5100|127.0300,37.5200|127.0400,37.5300|127.0500,37.5400
通过坐标进行基本路线查询(直接)
bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087
强制使用特定 API(可选)
如果需要覆盖智能路由:
bash
强制使用 Directions5(最多 5 个途经点)
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--api directions5 \
--waypoints 127.0100,37.5000|127.0200,37.5100
强制使用 Directions15(最多 15 个途经点)
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--api directions15 \
--waypoints 127.0100,37.5000|127.0200,37.5100|127.0300,37.5200|127.0400,37.5300|127.0500,37.5400
带途经点(仅坐标)
bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000
多个途经点:
bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000|127.0200,37.5100
路线选项
可选值:trafast(快速)、tracomfort(舒适)、traoptimal(默认)、traavoidtoll(避开收费)、traavoidcaronly(避开汽车专用道)
bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--option traavoidtoll
车辆和燃油设置
bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--cartype 2 \
--fueltype diesel \
--mileage 10.5
车辆类型:
- - 1(默认):小型轿车
- 2:中型货车/厢式货车
- 3:大型车辆
- 4:3轴货运卡车
- 5:4轴以上特种货运
- 6:紧凑型汽车
燃油类型:gasoline(默认)、highgradegasoline、diesel、lpg
输出
json
{
success: true,
start: 127.0683,37.4979,
goal: 126.9034,37.5087,
distance: 12850,
duration: 1145000,
toll_fare: 0,
taxi_fare: 18600,
fuel_price: 1550,
departure_time: 2026-02-21T14:10:00
}
响应字段
- - success - 查询是否成功
- start - 起点坐标
- goal - 目的地坐标
- distance - 总距离(米)
- duration - 总耗时(毫秒,÷1000 = 秒)
- toll_fare - 通行费/高速公路费(韩元)