Install
openclaw skills install ip-lookup-tool查询当前公网 IP、城市位置(含中文名)和运营商。当用户问“我的 IP 是多少”“我现在的 IP 地址”“我在哪个城市上网”这类问题时使用。优先返回公网出口 IP,而不是局域网 IP。
openclaw skills install ip-lookup-tool当用户问这些问题时,触发本 skill:
23.x.x.x),不要返回 192.168/10.x 这类内网地址https://ipinfo.io/json 等https://ipinfo.io/jsonhttps://ifconfig.co/jsonhttps://api.ip.sb/geoip脚本路径:skills/ip-lookup/scripts/ip_lookup.js
用途:查询当前会话出口的公网 IP 和大致位置。
调用示例:
node skills/ip-lookup/scripts/ip_lookup.js
输出(人类可读):
公网 IP:23.249.16.36
城市:新宿区(Tokyo, JP)
运营商:AS400618 Prime Security Corp.
如需要 JSON(例如后续程序处理),可使用:
node skills/ip-lookup/scripts/ip_lookup.js --json
返回字段:
ip:公网 IP 地址city:英文城市(若有)cityZh:中文城市/区县(best-effort,若有)region:地区/省份(若有)country:国家代码org:运营商/自治系统信息(若有)loc:经纬度字符串(若有)source:实际使用的接口来源fetchedAt:ISO 格式查询时间