← 返回 Skills 市场
likwang

ip-locator

作者 LeeKunwang · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
273
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install ip-locator-skill
功能描述
自动获取 IP 地址的归属地信息。支持查询任意 IP 或当前公网 IP。使用 ip-api.com 免费服务,无需 API 密钥。当用户需要查询 IP 位置、网络信息、归属地时触发此技能。
使用说明 (SKILL.md)

IP 归属地查询技能

何时使用

使用场景:

  • "查询这个 IP 的归属地"
  • "我的公网 IP 是多少?在哪里?"
  • "192.168.1.1 是哪个国家的?"
  • "帮我看看这个 IP 的详细信息"
  • 网络安全分析、日志排查

不使用场景:

  • 内网 IP 定位(内网 IP 无地理位置)
  • 需要精确到街道级别的位置
  • 商业用途(免费版有速率限制)
  • 批量查询大量 IP(需购买付费 API)

快速命令

查询当前公网 IP

curl -s "ip-api.com/json/?fields=61439"

查询指定 IP

curl -s "ip-api.com/json/8.8.8.8?fields=61439"

简洁输出(仅国家 + 城市)

curl -s "ip-api.com/json/8.8.8.8?fields=country,city"

脚本使用

# 查询指定 IP
./scripts/ip-lookup.sh 8.8.8.8

# 查询当前公网 IP
./scripts/ip-lookup.sh

# 批量查询
./scripts/ip-lookup.sh 8.8.8.8 1.1.1.1 208.67.222.222

API 字段说明

fields=61439 包含以下信息:

  • status — 查询状态
  • country — 国家
  • countryCode — 国家代码
  • region — 省/州
  • regionName — 省/州全名
  • city — 城市
  • zip — 邮编
  • lat — 纬度
  • lon — 经度
  • timezone — 时区
  • isp — 网络服务提供商
  • org — 组织
  • as — AS 号
  • query — 查询的 IP

输出示例

{
  "status": "success",
  "country": "美国",
  "countryCode": "US",
  "region": "CA",
  "regionName": "California",
  "city": "Mountain View",
  "zip": "94035",
  "lat": 37.386,
  "lon": -122.0838,
  "timezone": "America/Los_Angeles",
  "isp": "Google LLC",
  "org": "Public DNS",
  "as": "AS15169 Google LLC",
  "query": "8.8.8.8"
}

注意事项

  • ⚠️ 免费版限制:每分钟 60 次查询,每天 4500 次
  • ⚠️ 内网 IP(如 192.168.x.x)无法定位
  • ⚠️ 位置信息是估算值,非精确位置
  • ✅ 无需 API 密钥
  • ✅ 支持 IPv4 和 IPv6
  • ✅ 商业使用需购买付费版

相关资源

  • 详细字段说明:见 references/fields.md
  • API 文档:https://ip-api.com/docs/
安全使用建议
This skill is a simple IP geolocation helper that contacts ip-api.com. Before installing or running it: (1) be aware that queries (including your machine's public IP if you run it without arguments) are sent to a third party; (2) the script uses HTTP (not HTTPS) by default—this can be intercepted on the network—so avoid sending sensitive data and consider switching to a secure endpoint if available; (3) ensure curl and python3 are available on the host (they are used but not declared); (4) respect the API rate limits (60/min, 4500/day) and don't use it for bulk automated queries without upgrading to a paid plan; and (5) review the script yourself or run it in an isolated environment if you are concerned about network calls.
功能分析
Type: OpenClaw Skill Name: ip-locator-skill Version: 1.0.1 The skill bundle provides a legitimate IP geolocation lookup tool using the public ip-api.com service. The bash script (scripts/ip-lookup.sh) and instructions (SKILL.md) are well-documented, align with the stated purpose, and contain no evidence of malicious intent, data exfiltration, or harmful prompt injection.
能力评估
Purpose & Capability
The skill's purpose (IP geolocation via ip-api.com) matches the included scripts and documentation. However, the package declares no required binaries while the script uses curl and python3 for formatting; those runtime dependencies are expected but not declared.
Instruction Scope
SKILL.md and the script limit actions to calling ip-api.com and formatting the response. They do not read other files or environment variables. Important privacy note: when run with no arguments the script will query the current public IP, sending that IP to ip-api.com. The script uses plain HTTP (http://ip-api.com) by default, which may expose queries to network interception—this is a documented limitation of the free service.
Install Mechanism
There is no install specification (instruction-only plus a utility script). No downloads from third-party URLs or archive extraction are performed. The only file that will be executed is the included script.
Credentials
The skill requests no credentials or config paths, which is appropriate. It nevertheless performs outbound network requests to ip-api.com and will transmit queried IP addresses (including the host's public IP). Also, it relies on curl and python3 at runtime even though no env/binary requirements are declared.
Persistence & Privilege
The skill does not request persistent or elevated privileges, is not always-enabled, and does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ip-locator-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ip-locator-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 新增 SKILL.md 文档,详细说明 ip-locator 技能用途、用法及注意事项 - 提供 curl 命令和脚本示例,方便查询单个或多个 IP 的归属地信息 - 列出 API 字段释义和示例输出,便于理解查询结果 - 明确列出使用和不适用的场景,强调速率限制及服务适用范围 - 补充官方 API 文档及字段说明资源链接
元数据
Slug ip-locator-skill
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

ip-locator 是什么?

自动获取 IP 地址的归属地信息。支持查询任意 IP 或当前公网 IP。使用 ip-api.com 免费服务,无需 API 密钥。当用户需要查询 IP 位置、网络信息、归属地时触发此技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 273 次。

如何安装 ip-locator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ip-locator-skill」即可一键安装,无需额外配置。

ip-locator 是免费的吗?

是的,ip-locator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ip-locator 支持哪些平台?

ip-locator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ip-locator?

由 LeeKunwang(@likwang)开发并维护,当前版本 v1.0.1。

💬 留言讨论