When to Use
User needs place search, forward geocoding, reverse geocoding, routing, travel-time estimates, static map links, or provider selection for a maps workflow.
Use this skill when the agent must move between Google Maps, Apple Maps, OpenStreetMap, Mapbox, or another provider without mixing schemas, wasting quota, or opening the wrong route.
Architecture
Memory lives in ~/maps/. If ~/maps/ does not exist, run setup.md. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
Load only the file needed for the current map task.
| Topic | File |
|---|
| Setup and activation behavior | INLINECODE4 |
| Memory schema and status model |
memory-template.md |
| Provider choice by task and constraint |
provider-matrix.md |
| Canonical schema and coordinate normalization |
normalization-guide.md |
| Search, route, and launch workflows |
execution-patterns.md |
| Cost controls and fallback logic |
cost-controls.md |
| Common failures and recovery steps |
troubleshooting.md |
Requirements
- - No credentials required for provider selection, normalization, and map-link planning.
- Live Google Maps, Mapbox, HERE, or other paid API calls need user-approved credentials.
- Apple Maps app launching is macOS-specific, but Apple Maps link generation works anywhere a browser can open
https://maps.apple.com. - Confirm before sending sensitive origin, destination, or itinerary data to a live provider.
Coverage
This skill is designed for mixed map work that usually fails when an agent treats every provider as interchangeable:
- - place search and place-detail workflows
- forward and reverse geocoding
- route and matrix calculations
- static map or shareable map-link generation
- provider fallback when quota, privacy, or coverage changes the right choice
Core Rules
1. Separate structured data from launch actions
- - Decide first whether the user wants machine-readable output, an interactive map, or both.
- Use APIs for structured records and calculations.
- Use app or browser links only when the user wants to open, preview, or share a map.
2. Normalize every provider before comparing results
- - Keep coordinates internally as decimal
lat and lng, then serialize per provider. - Track result type, confidence, place status, provider ID, timezone, and distance units before merging outputs.
- Use
normalization-guide.md whenever provider schemas disagree.
3. Bound ambiguous searches with context and confidence
- - Add city, region, postal code, country, or nearby coordinates before calling search or geocode endpoints.
- If top candidates disagree on locality or type, ask a disambiguation question instead of guessing.
- Do not treat the first geocode result as truth when the provider reports approximate or partial matches.
4. Route travel distance through a route engine
- - Haversine is only for radius filters, rough proximity checks, and clustering.
- For ETA, driving distance, cycling, transit, or waypoint order, use a routing or matrix engine.
- Explicitly set travel mode and units before comparing providers.
5. Choose the provider by task, cost, and privacy
- - Use
provider-matrix.md to pick the cheapest provider that still meets the accuracy and policy needs of the task. - Default to Apple Maps for app-launch workflows, Google for broad place detail coverage, and the OpenStreetMap stack for low-cost open-data fallback.
- Switch providers only when the delta is clear: richer data, safer privacy posture, better coverage, or lower cost.
6. Preview high-impact executions
- - Show final route mode, origin, destination, and provider before opening routes or sharing links.
- For multiple links, repeated launches, or route changes, require explicit confirmation.
- If a link contains private notes or sensitive addresses, confirm again before execution.
7. Degrade gracefully when providers fail
- - Fall back from premium APIs to open-data providers when the result quality remains acceptable.
- Cache canonicalized queries and provider IDs so repeated geocodes do not burn quota.
- If no trustworthy fallback exists, stop and explain whether the blocker is quota, precision, coverage, or privacy.
Common Traps
- - Swapping
lat,lng and lng,lat -> routes jump continents or geofences miss targets. - Truncating coordinates below 5-6 decimals -> rooftop and curbside results drift by tens to hundreds of meters.
- Treating the first geocode result as final -> duplicate street names and chain locations cause silent errors.
- Using straight-line distance for delivery or commute promises -> travel times can be off by 2-5x.
- Mixing launch URLs with API schemas -> a valid Apple Maps link does not imply a complete structured place record.
- Ignoring place status and confidence -> closed businesses and approximate addresses leak into downstream logic.
- Repeating the same paid lookup -> avoidable quota burn and inconsistent results when provider ordering changes.
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| https://maps.googleapis.com | addresses, coordinates, place queries, route parameters | Google geocoding, places, routes, and static maps |
| https://maps.apple.com |
search text, coordinates, and route parameters | Apple Maps links and app or browser launch |
| https://nominatim.openstreetmap.org | address text or reverse-geocode coordinates | OpenStreetMap geocoding fallback |
| https://router.project-osrm.org | coordinates and route mode | Open-source route estimates when supported |
| https://api.mapbox.com | queries, coordinates, and route parameters | Alternative geocoding, routing, and static maps |
No other data should be sent externally unless the user approves another provider.
Security & Privacy
Data that may leave your machine:
- - address queries
- coordinates
- route origin and destination
- place-search text
- optional static-map parameters
Data that stays local:
- - notes in INLINECODE18
- provider preferences and fallback rules
- user-approved recurring contexts
- failure logs and verified fixes
This skill does NOT:
- - store API keys in local notes
- guess precise destinations from vague requests
- treat a launch URL as proof of data accuracy
- modify its own INLINECODE19
Trust
This skill can send addresses, coordinates, and route parameters to the map provider selected for the task.
Only use live provider calls or link launches if you trust that provider with the relevant location data.
Scope
This skill ONLY:
- - selects providers and execution modes for map work
- normalizes place, geocode, route, and link workflows
- prepares safe request plans, links, or structured summaries
This skill NEVER:
- - invent place data, ETAs, or coverage claims
- scrape undeclared providers behind anti-bot flows
- share map links externally without approval
- persist sensitive location history without telling the user first
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
apple-maps - Open Apple Maps search and route flows on macOS with local command automation. - INLINECODE22 - Turn approved routes, places, and movement constraints into broader trip plans.
- INLINECODE23 - Add venue comparison and official travel-data workflows to place shortlists.
- INLINECODE24 - Connect route assumptions, pickup zones, and transport choices to rental planning.
Feedback
- - If useful: INLINECODE25
- Stay updated: INLINECODE26
何时使用
用户需要地点搜索、正向地理编码、反向地理编码、路线规划、行程时间估算、静态地图链接,或为地图工作流选择服务提供商时使用此技能。
当智能体需要在谷歌地图、苹果地图、OpenStreetMap、Mapbox或其他提供商之间切换,且不混合数据模式、不浪费配额、不打开错误路线时,使用此技能。
架构
数据存储在 ~/maps/ 目录下。如果 ~/maps/ 不存在,请运行 setup.md。结构请参考 memory-template.md。
text
~/maps/
|-- memory.md # 激活规则、默认提供商以及隐私/成本边界
|-- provider-notes.md # 已知的提供商特性、配额说明和已验证的解决方案
|-- recurring-places.md # 用户批准的常用起点、终点和地图场景
-- run-log.md # 关于失败、模糊匹配和修复的可选记录
快速参考
仅加载当前地图任务所需的文件。
| 主题 | 文件 |
|---|
| 设置和激活行为 | setup.md |
| 内存模式和状态模型 |
memory-template.md |
| 按任务和约束选择提供商 | provider-matrix.md |
| 规范模式和坐标标准化 | normalization-guide.md |
| 搜索、路线和启动工作流 | execution-patterns.md |
| 成本控制和回退逻辑 | cost-controls.md |
| 常见故障和恢复步骤 | troubleshooting.md |
要求
- - 提供商选择、标准化和地图链接规划无需凭证。
- 实时谷歌地图、Mapbox、HERE或其他付费API调用需要用户批准的凭证。
- 苹果地图应用启动仅限macOS,但苹果地图链接生成可在任何能打开 https://maps.apple.com 的浏览器上使用。
- 在将敏感的起点、终点或行程数据发送到实时提供商之前,需进行确认。
覆盖范围
此技能专为混合地图工作设计,当智能体将所有提供商视为可互换时,此类工作通常会失败:
- - 地点搜索和地点详情工作流
- 正向和反向地理编码
- 路线和矩阵计算
- 静态地图或可分享地图链接生成
- 当配额、隐私或覆盖范围改变正确选择时的提供商回退
核心规则
1. 将结构化数据与启动操作分离
- - 首先确定用户需要的是机器可读的输出、交互式地图,还是两者都需要。
- 使用API获取结构化记录和计算结果。
- 仅在用户想要打开、预览或分享地图时使用应用或浏览器链接。
2. 在比较结果前标准化每个提供商
- - 内部将坐标保持为十进制 lat 和 lng,然后按提供商序列化。
- 在合并输出前,跟踪结果类型、置信度、地点状态、提供商ID、时区和距离单位。
- 当提供商模式不一致时,使用 normalization-guide.md。
3. 用上下文和置信度限定模糊搜索
- - 在调用搜索或地理编码端点前,添加城市、地区、邮政编码、国家或附近坐标。
- 如果排名靠前的候选结果在地点或类型上不一致,提出澄清问题,而非猜测。
- 当提供商报告近似或部分匹配时,不要将第一个地理编码结果视为事实。
4. 通过路线引擎规划行驶距离
- - 哈弗辛公式仅用于半径筛选、粗略邻近检查和聚类。
- 对于预计到达时间、驾驶距离、骑行、公共交通或航点顺序,使用路线或矩阵引擎。
- 在比较提供商前,明确设置出行模式和单位。
5. 根据任务、成本和隐私选择提供商
- - 使用 provider-matrix.md 选择既能满足任务精度和政策要求,又是成本最低的提供商。
- 默认情况下,应用启动工作流使用苹果地图,广泛地点详情覆盖使用谷歌,低成本开放数据回退使用OpenStreetMap栈。
- 仅在差异明确时切换提供商:更丰富的数据、更安全的隐私姿态、更好的覆盖范围或更低的成本。
6. 预览高影响执行
- - 在打开路线或分享链接前,显示最终路线模式、起点、终点和提供商。
- 对于多个链接、重复启动或路线变更,需要明确确认。
- 如果链接包含私人备注或敏感地址,在执行前再次确认。
7. 提供商失败时优雅降级
- - 当结果质量仍可接受时,从高级API回退到开放数据提供商。
- 缓存标准化查询和提供商ID,以避免重复地理编码消耗配额。
- 如果没有可信的回退方案,停止操作并解释障碍是配额、精度、覆盖范围还是隐私。
常见陷阱
- - 混淆 lat,lng 和 lng,lat -> 路线跨越大洲或地理围栏错过目标。
- 将坐标截断到5-6位小数以下 -> 屋顶和路边结果偏移数十至数百米。
- 将第一个地理编码结果视为最终结果 -> 重复街道名称和连锁位置导致静默错误。
- 使用直线距离进行配送或通勤承诺 -> 行程时间可能偏差2-5倍。
- 混淆启动URL与API模式 -> 有效的苹果地图链接并不意味着完整的结构化地点记录。
- 忽略地点状态和置信度 -> 已关闭的商家和近似地址渗入下游逻辑。
- 重复相同的付费查询 -> 当提供商排序变化时,导致可避免的配额消耗和不一致结果。
外部端点
| 端点 | 发送的数据 | 用途 |
|---|
| https://maps.googleapis.com | 地址、坐标、地点查询、路线参数 | 谷歌地理编码、地点、路线和静态地图 |
| https://maps.apple.com |
搜索文本、坐标和路线参数 | 苹果地图链接以及应用或浏览器启动 |
| https://nominatim.openstreetmap.org | 地址文本或反向地理编码坐标 | OpenStreetMap地理编码回退 |
| https://router.project-osrm.org | 坐标和路线模式 | 受支持时的开源路线估算 |
| https://api.mapbox.com | 查询、坐标和路线参数 | 替代地理编码、路线规划和静态地图 |
除非用户批准其他提供商,否则不应向外部发送其他数据。
安全与隐私
可能离开您机器的数据:
- - 地址查询
- 坐标
- 路线起点和终点
- 地点搜索文本
- 可选的静态地图参数
保留在本地数据:
- - ~/maps/ 中的备注
- 提供商偏好和回退规则
- 用户批准的常用场景
- 失败日志和已验证的修复
此技能不会:
- - 在本地备注中存储API密钥
- 从模糊请求中猜测精确目的地
- 将启动URL视为数据准确性的证明
- 修改自身的 SKILL.md
信任
此技能可以将地址、坐标和路线参数发送到为任务选择的地图提供商。
仅当您信任该提供商处理相关位置数据时,才使用实时提供商调用或链接启动。
范围
此技能仅:
- - 为地图工作选择提供商和执行模式
- 标准化地点、地理编码、路线和链接工作流
- 准备安全的请求计划、链接或结构化摘要
此技能绝不:
- - 编造地点数据、预计到达时间或覆盖范围声明
- 在反机器人流程背后抓取未声明的提供商
- 未经批准外部共享地图链接
- 未事先告知用户就持久化敏感位置历史
相关技能
如果用户确认,使用 clawhub install
安装:
- - apple-maps - 在macOS上通过本地命令自动化打开苹果地图搜索和路线流程。
- travel - 将批准的路线、地点和移动约束转化为更广泛的旅行计划。
- tripadvisor - 将场地比较和官方旅行数据工作流添加到地点候选列表。
- car-rental - 将路线假设、取车区域和交通选择与租车规划连接起来。
反馈
- - 如果有用:clawhub star maps
- 保持更新:clawhub sync