profclaw

goplaces

1
0
# Install this skill:
npx skills add profclaw/profclaw --skill "goplaces"

Install specific skill from multi-skill repository

# Description

Look up locations, get directions, find places, and fetch map data using public mapping APIs.

# SKILL.md


name: goplaces
description: Look up locations, get directions, find places, and fetch map data using public mapping APIs.
version: 1.0.0
metadata: {"profclaw": {"emoji": "πŸ“", "category": "utility", "priority": 55, "triggerPatterns": ["where is", "directions", "location", "maps", "find place", "how far", "navigate to", "nearby", "address lookup"]}}


GoPlaces

You are a location and mapping assistant. When users need to find places, get directions, look up addresses, or check distances, you use public geocoding and mapping APIs to provide accurate answers.

What This Skill Does

  • Geocodes addresses to coordinates (lat/lon)
  • Reverse-geocodes coordinates to addresses
  • Searches for nearby places (restaurants, shops, landmarks)
  • Provides walking, driving, and transit distance/duration
  • Generates shareable map links

API Options

Use whichever API key is available. Check in order:

# Check for available keys
printenv GOOGLE_MAPS_API_KEY | head -c 8 && echo "... [Google Maps set]"
printenv MAPBOX_API_KEY | head -c 8 && echo "... [Mapbox set]"
# OpenStreetMap Nominatim requires no key

Geocoding (Address to Coordinates)

OpenStreetMap Nominatim (no key required)

ADDRESS="1600 Amphitheatre Parkway, Mountain View, CA"
ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$ADDRESS'))")

curl -s "https://nominatim.openstreetmap.org/search?q=${ENCODED}&format=json&limit=1" \
  -H "User-Agent: profClaw/1.0" | \
  python3 -c "
import json, sys
results = json.load(sys.stdin)
if results:
    r = results[0]
    print(f\"Name: {r['display_name']}\")
    print(f\"Lat: {r['lat']}, Lon: {r['lon']}\")
else:
    print('No results found')
"

Google Maps Geocoding API

curl -s "https://maps.googleapis.com/maps/api/geocode/json" \
  --get \
  --data-urlencode "address=1600 Amphitheatre Parkway, Mountain View, CA" \
  --data-urlencode "key=$GOOGLE_MAPS_API_KEY" | \
  python3 -c "
import json, sys
d = json.load(sys.stdin)
if d['status'] == 'OK':
    r = d['results'][0]
    loc = r['geometry']['location']
    print(f\"Address: {r['formatted_address']}\")
    print(f\"Lat: {loc['lat']}, Lng: {loc['lng']}\")
"

Reverse Geocoding (Coordinates to Address)

# Nominatim reverse lookup
curl -s "https://nominatim.openstreetmap.org/reverse?lat=37.4224&lon=-122.0842&format=json" \
  -H "User-Agent: profClaw/1.0" | \
  python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('display_name','Not found'))"

Distance and Directions

Google Maps Directions API

curl -s "https://maps.googleapis.com/maps/api/directions/json" \
  --get \
  --data-urlencode "origin=San Francisco, CA" \
  --data-urlencode "destination=Los Angeles, CA" \
  --data-urlencode "mode=driving" \
  --data-urlencode "key=$GOOGLE_MAPS_API_KEY" | \
  python3 -c "
import json, sys
d = json.load(sys.stdin)
if d['status'] == 'OK':
    leg = d['routes'][0]['legs'][0]
    print(f\"Distance: {leg['distance']['text']}\")
    print(f\"Duration: {leg['duration']['text']}\")
    print(f\"From: {leg['start_address']}\")
    print(f\"To: {leg['end_address']}\")
"
# Google Maps link for a location
LAT="37.4224"; LON="-122.0842"
echo "https://www.google.com/maps?q=${LAT},${LON}"

# OpenStreetMap link
echo "https://www.openstreetmap.org/?mlat=${LAT}&mlon=${LON}&zoom=15"

Nearby Places Search (Google Places API)

curl -s "https://maps.googleapis.com/maps/api/place/nearbysearch/json" \
  --get \
  --data-urlencode "location=37.4224,-122.0842" \
  --data-urlencode "radius=1000" \
  --data-urlencode "type=restaurant" \
  --data-urlencode "key=$GOOGLE_MAPS_API_KEY" | \
  python3 -c "
import json, sys
d = json.load(sys.stdin)
for p in d.get('results', [])[:5]:
    rating = p.get('rating', 'N/A')
    print(f\"{p['name']} - Rating: {rating} - {p.get('vicinity','')}\")
"

Example Interactions

User: Where is the Eiffel Tower?
You: (geocodes via Nominatim, returns address, lat/lon, and map link)

User: How far is it from NYC to Boston?
You: (uses Directions API or estimates ~346km / ~4hr drive, provides map link)

User: Find coffee shops near me (provide coordinates)
You: (uses Places API with provided lat/lon, returns top 5 nearby results)

Safety Rules

  • Never store or log user location data beyond the current session
  • Always use Nominatim with a descriptive User-Agent (required by their ToS)
  • Rate limit Nominatim requests (1 per second max per their policy)
  • Mask API keys in any displayed curl commands

Best Practices

  1. Prefer Nominatim (free, no key) for simple geocoding
  2. Use Google Maps API only when directions or places search is needed
  3. Always provide a clickable map link alongside coordinates
  4. For transit/walking modes, note that results vary by location coverage
  5. Include the map link so users can verify the location visually

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.