brouter
This OpenClaw skill queries the brouter.de webservice and generate GPX bike tracks.
Usage
Natural language prompts
You can trigger this skill with prompts like:
- - "Create a GPX for a bike route from [origin] to [destination] (profile: [profile])."
- "Give me a quiet route from Prenzlauer Berg to Kreuzberg as a GPX."
- "I need a fast bike route from Berlin Hauptbahnhof to Alexanderplatz as a GPX file."
Parameters to extract
When using this skill, identify:
- - origin: Free-text description of the starting location.
- destination: Free-text description of the end location.
- profile : One of the supported brouter profiles below.
Parse all location data to coordinates before using index.js. Never use free-text descriptions of locations directly as input for index.js. Use coordinates as origin and destination input for index.js.
Heuristics for choosing a profile
- - Prefer
trekking when the user does not specify a preference. - Prefer
trekking-fast when the user asks for a fast or time-efficient route. - Prefer
trekking-safe or shortbike when the user asks for a quiet, safe, or kid-friendly route. - Prefer
fastbike when the user mentions road bike, speed, or being an experienced cyclist. - Prefer
moped only if the user explicitly indicates using a moped or similar vehicle.
Agent implementation: coordinates
When this skill is triggered, the agent should first derive coordinates from the user's origin and destination, then use index.js to make structured request to brouter.de
1. Derive coordinates from user input
- 1. Extract plain-text locations:
-
origin — starting point
-
destination — end point
- 2. If the user already supplies coordinates (e.g.
13.4244,52.5388), use them directly. - Otherwise, geocode the locations into
lon,lat pairs - Ensure the final values are strings in the form:
-
"<lon>,<lat>" (longitude first, then latitude)
2. Use index.js
Once you have start and end as lon,lat strings and a chosen profile, use the index.js as follows:
CODEBLOCK0
Reply to the user with the response file found in routes/ folder.
See the earlier "Derive coordinates from user input" section for
recommended heuristics when turning user prompts into coordinates.
brouter
此OpenClaw技能用于查询brouter.de网络服务并生成GPX自行车轨迹。
使用方法
自然语言提示
您可以通过以下提示触发此技能:
- - 创建一条从[起点]到[终点]的自行车路线GPX文件(配置文件:[配置文件])。
- 给我一条从普伦茨劳贝格到克罗伊茨贝格的安静路线,保存为GPX格式。
- 我需要一条从柏林中央火车站到亚历山大广场的快速自行车路线GPX文件。
需要提取的参数
使用此技能时,请识别:
- - 起点:起始位置的自由文本描述。
- 终点:终点位置的自由文本描述。
- 配置文件:下方支持的brouter配置文件之一。
在使用index.js之前,将所有位置数据解析为坐标。切勿直接将自由文本位置描述作为index.js的输入。请使用坐标作为index.js的起点和终点输入。
选择配置文件的启发式规则
- - 当用户未指定偏好时,优先选择trekking。
- 当用户要求快速或省时路线时,优先选择trekking-fast。
- 当用户要求安静、安全或适合儿童的路线时,优先选择trekking-safe或shortbike。
- 当用户提到公路自行车、速度或经验丰富的骑行者时,优先选择fastbike。
- 仅当用户明确表示使用轻便摩托车或类似车辆时,才选择moped。
代理实现:坐标
当此技能被触发时,代理应首先从用户的起点和终点推导出坐标,然后使用index.js向brouter.de发出结构化请求。
1. 从用户输入推导坐标
- 1. 提取纯文本位置:
- 起点 — 起始点
- 终点 — 结束点
- 2. 如果用户已提供坐标(例如13.4244,52.5388),则直接使用。
- 否则,将位置地理编码为经度,纬度对
- 确保最终值采用以下格式的字符串:
- <经度>,<纬度>(经度在前,纬度在后)
2. 使用index.js
一旦您将起点和终点作为经度,纬度字符串以及选定的配置文件,请按如下方式使用index.js:
cd workspace/skills/brouter && node -e (async () => { const run = require(./index); const result = await run({ start: <经度>,<纬度>, end: <经度>,<纬度>, profile: <配置文件> }); console.log(result); })().catch(err => console.error(err));
使用routes/文件夹中找到的响应文件回复用户。
有关将用户提示转换为坐标时的推荐启发式规则,请参阅前面的从用户输入推导坐标部分。