home / skills / openclaw / skills / get-ip

This skill reveals your public IP address and geolocation, helping you troubleshoot networks and verify location from simple prompts.

npx playbooks add skill openclaw/skills --skill get-ip

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.6 KB
---
name: ip-lookup
description: Get current public IP address and geolocation information. Use when users ask about IP addresses, network location, or want to check their public IP. Supports both fetching IP info and displaying it clearly.
---

# IP Lookup Skill

## Overview

This skill provides a simple way to check your public IP address and its geolocation information.

## Usage

When users ask:
- "What is my IP?"
- "What is my current IP address?"
- "What's my public IP?"
- "Where am I?"
- "Where am I located?"
- "Check location"
- "Check my IP location"
- "Get location"
- "Locate me"
- "What's the IP?"
- "What's your IP?"

Execute the workflow below.

## Workflow

### Basic IP Check

Run this command to get your public IP and location:

```bash
curl -s myip.ipip.net
```

Example output:
```
Current IP:8.8.8.8  From: SF CA USA Google
Current IP:1.1.1.1  From: SF CA USA Cloudflare
```

### Alternative Methods

If the above fails, try these alternatives:

**Method 1: icanhazip.com (fallback)**
```bash
curl -s icanhazip.com
```

**Method 2: ipify API**
```bash
curl -s https://api.ipify.org
```

**Method 3: ifconfig.me**
```bash
curl -s ifconfig.me
```

### Full Geolocation Lookup

For more detailed geolocation info:

```bash
curl -s https://ipinfo.io/$(curl -s https://api.ipify.org)/json
```

## Display Format

Present the information clearly:

**IP Address:** [address]
**Location:** [city], [region], [country]
**ISP:** [ISP name]
**Org:** [organization]

## Error Handling

If the primary service (`myip.ipip.net`) fails:
1. Try alternative services one by one
2. Report which service succeeded
3. If all fail, inform the user about the network issue

Overview

This skill fetches the current public IP address and provides geolocation details in a clear, human-friendly format. It supports multiple public IP services and a full geolocation lookup option to return city, region, country, ISP, and organization information. Designed for quick checks and troubleshooting when users ask where they are or what their public IP is.

How this skill works

The skill queries a primary public IP service and falls back to alternatives if the primary fails. For a basic check it calls simple endpoints that return the public IP. For detailed geolocation it combines the detected IP with a geolocation API to return city, region, country, ISP, and org fields. It reports which service succeeded and gracefully handles network failures.

When to use it

  • User asks “What is my IP?” or “What’s my public IP?”
  • User wants to verify the public-facing IP seen by external services
  • Troubleshooting routing, NAT, or VPN connectivity issues
  • Checking approximate network location (city/region/country)
  • Confirming which ISP or organization owns the IP address

Best practices

  • Try the primary endpoint first and fall back to alternates (icanhazip, ipify, ifconfig.me) on error
  • For privacy-sensitive contexts, avoid logging full IPs long-term
  • Use the full geolocation lookup only when user consents to share location-level info
  • Report which service returned the result so users know the source
  • Handle network timeouts and return a clear error with next steps

Example use cases

  • User asks “Where am I?” to get city, region, and country based on public IP
  • Quick verification of IP change after reconnecting to a VPN or ISP
  • Scripted health check that records the public IP and ISP daily
  • Support agent confirming the IP seen by external systems during a troubleshooting session
  • Privacy audit to verify that expected NAT or proxy is in place

FAQ

What happens if the primary IP service is down?

The skill automatically tries alternative services in order and reports which one succeeded; if all fail it returns a network error and suggests retrying.

Can this reveal my exact physical address?

No. Geolocation from public IP returns an approximate location (city/region/country) and ISP/org but not a precise street address.

Which services does the skill use?

It uses a primary simple IP endpoint and falls back to endpoints like icanhazip, ipify, and ifconfig.me; detailed lookups use a geolocation API combining the detected IP with a JSON lookup.