← 返回 Skills 市场
etmnb

Get My Location

作者 Etmnb · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
139
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install get-my-location
功能描述
Get current IP location info (country, province, city, coordinates) with multi-source fallback. No API key required.
使用说明 (SKILL.md)

Get My Location

Get current or specified IP geolocation with three-tier fallback, no API key required.

Usage

# Current IP location
python scripts/location.py

# Query specific IP
python scripts/location.py 8.8.8.8
python scripts/location.py 240e:43d:3d08:33c8:18a2:e45b:ce7a:67de

# JSON output (programmatic use)
python scripts/location.py --json
python scripts/location.py 8.8.8.8 --json

Fallback Chain

Priority API Key Required Limit
1 freegeoip.app No None
2 api.ipbase.com No 10k/mo
3 ip-api.com No 45/min

Each API retries 3 times with 1s delay before falling back to the next.

Output

Human-readable:

📍 你的位置信息
  IP 地址: 222.89.92.62
  国家:   China
  省份:   Henan
  城市:   Xinxiang
  邮编:   453000
  坐标:   35.308777, 113.867203
  时区:   Asia/Shanghai
  数据源: freegeoip.app

JSON (--json):

{
  "ip": "222.89.92.62",
  "country_code": "CN",
  "country_name": "China",
  "region_name": "Henan",
  "city": "Xinxiang",
  "zip_code": "453000",
  "latitude": 35.30877685546875,
  "longitude": 113.86720275878906,
  "time_zone": "Asia/Shanghai"
}

Python Requirements

  • Python 3.6+ (stdlib only — urllib, json, sys)
  • No pip packages needed
  • Works on Windows / macOS / Linux

When to Use

  • User says "my location", "where am i", "get my location"
  • User says "获取我的位置", "我的位置", "我在哪里", etc.
  • Need IP-based geolocation for any purpose

Notes

  • IPv4 and IPv6 supported
  • Accuracy varies: typically city-level (some countries support district-level)
  • For freegeoip/ipbase: freegeoip.app redirects to api.ipbase.com (same data)
  • Exit code 0 on success, 1 if all sources fail
安全使用建议
This skill is internally consistent and small, but it performs outbound network requests to public geolocation services (freegeoip.app / api.ipbase.com / ip-api.com). Consider the privacy implications: those services will see your IP and the queried IPs. Note the script queries ip-api.com over HTTP (not HTTPS), which could be visible to network eavesdroppers or altered via MITM—if that matters, update the script to use HTTPS endpoints or remove that fallback. There are no requested credentials or hidden endpoints. If you need stronger privacy, run it locally on a trusted network or behind a VPN, or inspect/modify the script before use.
功能分析
Type: OpenClaw Skill Name: get-my-location Version: 1.1.0 The skill is a straightforward IP geolocation tool that uses public APIs (freegeoip.app, ipbase.com, and ip-api.com) to retrieve location data. The implementation in `scripts/location.py` relies solely on Python's standard library, contains no suspicious execution patterns (like eval or subprocess), and aligns perfectly with the functionality described in `SKILL.md`.
能力评估
Purpose & Capability
Name/description (get current IP geolocation with multi-source fallback) matches the included code and SKILL.md. All network calls are to the listed public geolocation providers (freegeoip.app / api.ipbase.com / ip-api.com). No unrelated binaries, environment variables, or privileged accesses are requested.
Instruction Scope
SKILL.md tells the agent to run the included Python script, and the script only reads argv/encoding and performs HTTP(S) GET requests to the three listed services. This is in-scope. Note: one fallback (ip-api.com) is queried over plain HTTP in the script (http://ip-api.com/...), which exposes queries to network eavesdropping or MITM; all queries reveal the requester IP to the remote services (expected for geolocation).
Install Mechanism
No install spec (instruction-only with a small bundled Python script). No downloads, package installs, or archives. Low installation risk.
Credentials
The skill declares no required environment variables, credentials, or config paths and the code does not read secrets or environment variables. The absence of credentials is appropriate for public geolocation APIs.
Persistence & Privilege
always is false and the skill does not attempt to modify agent/system configuration or other skills. Normal autonomous invocation is allowed (platform default).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install get-my-location
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /get-my-location 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Improved cross-platform encoding stability and error messages for Windows/macOS/Linux
v1.0.0
Initial release: multi-source IP geolocation with 3-tier fallback
元数据
Slug get-my-location
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Get My Location 是什么?

Get current IP location info (country, province, city, coordinates) with multi-source fallback. No API key required. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 139 次。

如何安装 Get My Location?

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

Get My Location 是免费的吗?

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

Get My Location 支持哪些平台?

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

谁开发了 Get My Location?

由 Etmnb(@etmnb)开发并维护,当前版本 v1.1.0。

💬 留言讨论