← 返回 Skills 市场
amapgeo
作者
aaronjager92
· GitHub ↗
· v1.0.0
· MIT-0
88
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install amap-geoservice
功能描述
提供基于高德开放平台的地理编码、逆地理编码、POI搜索、路径规划及距离测量的地理信息服务。
使用说明 (SKILL.md)
高德开放平台地理信息服务
🤖 支持平台:飞书 / 微信(文字)
地理编码、POI搜索、路径规划、导航距离等地理信息服务
⚠️ 首次使用必读
使用前必须配置高德开放平台 API Key,否则无法运行!
配置方式:
- 获取 Key:https://console.amap.com/dev/key/app
- 设置环境变量:
export AMAP_API_KEY="your-key"和AMAP_SECRET_KEY="your-secret"(如需签名) - 或创建配置文件:
cp config.example.txt config.txt并填入 Key - 验证:
python3 scripts/amap_geo.py --action geo --address "北京市朝阳区"
详见下方「首次使用配置」章节。
功能
当用户询问以下内容时,自动调用高德地理信息 API:
- 地理编码:地址 → 经纬度
- 逆地理编码:经纬度 → 地址
- POI搜索:搜索地点、周边检索
- 路径规划:步行/驾车/公交路线
- 距离测量:两点间距离
触发方式
用户发送以下任一方式都会触发:
北京市朝阳区的经纬度附近有什么医院从国贸到中关村怎么走北京到上海多远搜索附近的餐厅定位一下
首次使用配置
1. 获取高德 API Key
- 注册高德开放平台:https://console.amap.com/dev/key/app
- 创建应用,获取 Web服务 API Key
- 配置签名密钥(可选,用于高级功能)
2. 关于数字签名
高德部分 API 需要数字签名验证:
签名算法:MD5(key + params + secret) → 32位小写MD5值
步骤:
1. 将所有请求参数(除sign外)按key字母顺序排序
2. 拼接为:key1value1key2value2...
3. 在拼接字符串前加上 API Key,末尾加上 SecretKey
4. 对整个字符串计算 MD5
是否需要签名?
- 基础服务(地理编码、POI搜索):只需 API Key
- 高级服务(路径规划等):需要签名
- 脚本会自动判断并添加签名
3. 配置方式
方式一:环境变量(推荐)
export AMAP_API_KEY="your-api-key"
export AMAP_SECRET_KEY="your-secret-key" # 如需签名
方式二:配置文件
cp config.example.txt config.txt
# 编辑 config.txt,填入你的 Key
4. 验证
# 地理编码
python3 scripts/amap_geo.py --action geo --address "北京市朝阳区"
# POI搜索
python3 scripts/amap_geo.py --action poi --keywords "餐厅" --city "北京"
# 路径规划
python3 scripts/amap_geo.py --action direction --from "116.4074,39.9042" --to "116.4274,39.9042"
使用方式
命令行参数
# 地理编码(地址→坐标)
python3 scripts/amap_geo.py --action geo --address "北京市朝阳区"
# 逆地理编码(坐标→地址)
python3 scripts/amap_geo.py --action regeo --location "116.4074,39.9042"
# POI搜索
python3 scripts/amap_geo.py --action poi --keywords "餐厅" --city "北京"
# 周边搜索
python3 scripts/amap_geo.py --action around --location "116.4074,39.9042" --keywords "银行"
# 路径规划(驾车)
python3 scripts/amap_geo.py --action direction --from "116.4074,39.9042" --to "116.4274,39.9042"
# 距离测量
python3 scripts/amap_geo.py --action distance --from "116.4074,39.9042" --to "116.4274,39.9042"
返回格式
输出格式化文本,便于阅读。
技术细节
API 端点
| 功能 | 端点 | 说明 |
|---|---|---|
| 地理编码 | /v3/geocode/geo |
地址→坐标 |
| 逆地理编码 | /v3/geocode/regeo |
坐标→地址 |
| POI搜索 | /v3/place/text |
关键字搜索 |
| 周边搜索 | /v3/place/around |
圆形区域搜索 |
| 驾车路径 | /v3/direction/driving |
驾车路线 |
| 步行路径 | /v3/direction/walking |
步行路线 |
| 公交路径 | /v3/direction/transit |
公交路线 |
| 距离测量 | /v3/direction/material |
直线距离 |
签名算法
签名 = MD5(api_key + sorted_params + secret_key)
文件结构
amap_geoservice/
├── SKILL.md # 本文件
├── config.example.txt # 配置示例
├── scripts/ # 脚本目录
│ └── amap_geo.py # 主脚本
└── references/ # 参考文档
└── README.md # 详细说明
常见问题
Q: 提示"签名错误"
A: 检查 SecretKey 是否正确配置
Q: 提示"服务无效"
A: 检查 API Key 类型是否为 Web服务,且已开通对应服务
Q: POI搜索无结果
A: 尝试更精确的关键字,或使用城市adcode限定范围
常用城市 AdCode
| 城市 | AdCode |
|---|---|
| 北京 | 110000 |
| 上海 | 310000 |
| 广州 | 440100 |
| 深圳 | 440300 |
| 成都 | 510100 |
| 武汉 | 420100 |
| 杭州 | 330100 |
贡献
欢迎提交 Issue 和 PR!
安全使用建议
This package appears to implement Amap geocoding/POI/directions and requires you to provide an AMAP_API_KEY (and optionally AMAP_SECRET_KEY) plus Python and the 'requests' package. The immediate red flag is that the registry metadata lists no required env vars or binaries while the included SKILL.md and script clearly require them — that mismatch reduces transparency. Before installing: (1) confirm the skill author/source since homepage is missing, (2) verify you are comfortable providing an Amap API key (it grants the skill ability to make API calls under your quota), (3) review the included scripts yourself or run them in an isolated environment, and (4) ask the publisher to correct the registry metadata to declare the required env vars and runtime (python + requests). If you lack the ability to audit code, prefer not to install from unknown sources or run under restricted credentials and network isolation.
功能分析
Type: OpenClaw Skill
Name: amap-geoservice
Version: 1.0.0
The amap-geoservice skill provides geographic information services such as geocoding, POI search, and route planning using the Amap (高德) Open Platform API. The core logic in `scripts/amap_geo.py` is well-structured, using the `requests` library to interact with official API endpoints and implementing the required MD5 signing algorithm for authenticated requests. There is no evidence of malicious behavior, data exfiltration, or prompt injection; the script only accesses the specific environment variables or configuration files (`config.txt`) necessary for its stated purpose.
能力评估
Purpose & Capability
The skill's stated purpose (高德地图地理服务) matches the code and SKILL.md: it calls Amap endpoints for geocoding, POI, directions, distance, etc. However the registry metadata claims no required environment variables or credentials while both SKILL.md, config.example.txt and scripts/amap_geo.py require AMAP_API_KEY (and optionally AMAP_SECRET_KEY). That metadata omission is disproportionate and inconsistent.
Instruction Scope
The runtime instructions are narrowly scoped to configuring an Amap API key/secret, optionally copying config.txt, and running the included Python script which queries only restapi.amap.com endpoints. The instructions do not ask the agent to read unrelated system paths or exfiltrate data. They do require setting environment variables or a local config file.
Install Mechanism
There is no install spec in the registry (instruction-only), but the package actually contains a Python script that requires 'requests' and a Python interpreter. The skill suggests 'pip install requests' but the metadata does not declare Python or pip as required binaries. This gap is a packaging/metadata inconsistency (not direct malicious download activity).
Credentials
The code legitimately needs AMAP_API_KEY and may use AMAP_SECRET_KEY for signatures. Those are reasonable and minimal for the stated purpose, but the skill metadata declares no required env vars/primary credential — the missing declaration reduces transparency. No unrelated credentials are requested.
Persistence & Privilege
The skill does not request always:true, does not attempt to modify other skills or system-wide settings, and does not persist credentials beyond reading a local config file or environment variables. No special platform privileges are requested.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install amap-geoservice - 安装完成后,直接呼叫该 Skill 的名称或使用
/amap-geoservice触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
amap-geoservice 1.0.0 – 首个版本发布
- 提供高德开放平台地理信息服务能力,包括地理编码、逆地理编码、POI/周边搜索、路径规划、距离测量等
- 支持命令行脚本,便于参数化调用和自动化处理
- 配置灵活:支持环境变量或配置文件方式管理 API Key/Secret
- 自动判断是否需要数字签名并处理,兼容基础和高级 API
- 附详细使用文档及常见问题解答
元数据
常见问题
amapgeo 是什么?
提供基于高德开放平台的地理编码、逆地理编码、POI搜索、路径规划及距离测量的地理信息服务。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 88 次。
如何安装 amapgeo?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install amap-geoservice」即可一键安装,无需额外配置。
amapgeo 是免费的吗?
是的,amapgeo 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
amapgeo 支持哪些平台?
amapgeo 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 amapgeo?
由 aaronjager92(@aaronjager92)开发并维护,当前版本 v1.0.0。
推荐 Skills