Map Route Reader
by @wuyunting555
直接读取高德 / 百度地图上的真实路线结果,返回用户能照着走的公交、地铁、打车或步行方案。适用于用户问怎么从 A 到 B、哪条线路更快、哪条路线更省事、打车是不是更方便、是否有更优替代路线时使用。重点不是给模糊估计,而是尽量给真实可执行路线。
clawhub install map-route-reader📖 About This Skill
name: map-route-reader description: | 直接读取高德 / 百度地图上的真实路线结果,返回用户能照着走的公交、地铁、打车或步行方案。适用于用户问怎么从 A 到 B、哪条线路更快、哪条路线更省事、打车是不是更方便、是否有更优替代路线时使用。重点不是给模糊估计,而是尽量给真实可执行路线。
Map Route Reader
产品定位
把“地图路线查询”变成更像结果型产品的 skill:不是只说个大概时间,而是尽量把真实路线读出来,整理成用户可以立刻参考的出行方案。一句话卖点
直接读取高德 / 百度地图上的真实路线结果,优先返回用户能照着走的公交、地铁、打车或步行方案。为什么更有下载欲望
很多同类路线能力看起来很强,但实际要:这个 skill 主打的是:
你装它,想得到的是什么
Use this skill when the user asks for:
Goal
Return a route the user can actually follow. Do not stop at vague estimates when a real route can be extracted.
Priority: 1. exact route from a real map result 2. if the user proposes an alternate route/line, extract that route too and compare side by side 3. if exact route cannot be extracted, explain precisely where extraction failed and switch to the user-browser map tab via Browser Relay 4. only as a temporary fallback, give a clearly-labeled estimate
Preferred workflow
0) For Amap, prefer uriapi route pages with lnglat when coordinates are available
If you can get origin/destination coordinates, prefer opening a direct Amap route URL like:
https://ditu.amap.com/dir?type=bus&policy=2&from[lnglat]=&from[name]=...&to[lnglat]=&to[name]=...&src=uriapi&innersrc=uriapi&dateTime=now Why:
document.body.innerText1) Try normal read first
1.5) On Amap route pages, extract hidden detail siblings
After the recommended route card renders, the full step-by-step transit detail may exist in the hidden sibling node right after the current.planTitle (for example an ol.p_route).
Do not stop at total duration. Read that hidden detail block and extract:
2) If the map page needs interaction
If the site asks to confirm the start/end place, or the route card is hidden behind dynamic UI:3) For China map sites, prefer the user's real map tab when city context matters
For Amap/Baidu route pages, the isolated browser may resolve the wrong city or fail to expand the route card. If the page shows the wrong city, cannot resolve start/end places, or keeps asking to choose the correct place, switch early to the user's map tab via Browser Relay and read the live route result there.4) If normal browser still cannot read the real route
Switch to the user’s browser tab via Browser Relay.Comparison rule
If the user asks whether a specific route/line would be better, for example:
then you must: 1. keep the current recommended route 2. extract the user-specified route too 3. present a side-by-side comparison
Do not guess. Do not answer from intuition alone. Do not say “应该不会” or “大概率更慢” unless the alternate route has been pulled out and compared.
Output format
For a single route, return in this structure:
If route detail is available, include:
For a route comparison, return side-by-side: