← Back to Skills Marketplace
etmnb

Get My Location

by Etmnb · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
139
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install get-my-location
Description
Get current IP location info (country, province, city, coordinates) with multi-source fallback. No API key required.
README (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
Usage Guidance
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.
Capability Analysis
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`.
Capability Assessment
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).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install get-my-location
  3. After installation, invoke the skill by name or use /get-my-location
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug get-my-location
Version 1.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Get My Location?

Get current IP location info (country, province, city, coordinates) with multi-source fallback. No API key required. It is an AI Agent Skill for Claude Code / OpenClaw, with 139 downloads so far.

How do I install Get My Location?

Run "/install get-my-location" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Get My Location free?

Yes, Get My Location is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Get My Location support?

Get My Location is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Get My Location?

It is built and maintained by Etmnb (@etmnb); the current version is v1.1.0.

💬 Comments