← 返回 Skills 市场
hegghammer

Location Awareness

作者 Hegghammer · GitHub ↗ · v1.2.0
cross-platform ✓ 安全检测通过
2259
总下载
5
收藏
3
当前安装
4
版本数
在 OpenClaw 中安装
/install location-awareness
功能描述
Location awareness via privacy-friendly GPS tracking (Home Assistant, OwnTracks, GPS Logger). Set location-based reminders and ask about movement history, travel time, and nearby POIs.
使用说明 (SKILL.md)

Location Awareness

This skill provides commands to execute. When the user asks about location, RUN the appropriate command below.

⚠️ IMPORTANT: All commands use scripts/location.sh

Every command must be run via scripts/location.sh. Example:

User asks: "How long to walk home?"
You run:

scripts/location.sh eta home --mode walk

Output: 4.6 km, about 45 min walk
You reply with the output directly.

Do NOT run eta or other subcommands directly — they don't exist as standalone commands.

Quick Reference — What to Run

User says Run this (copy exactly) Reply with
"Where am I?" scripts/location.sh status Zone name only
"Map" / "map link" scripts/location.sh herewego Just the URL
"What are my coordinates?" scripts/location.sh status Lat/lon from output
"How long to walk home?" scripts/location.sh eta home --mode walk Distance + duration
"How long to bike to X?" scripts/location.sh eta X --mode bike Distance + duration
"How far is X by car?" scripts/location.sh eta X --mode car Distance + duration
"Remind me to X when I get to Y" scripts/location.sh remind "X" Y Brief confirm
"What reminders do I have?" scripts/location.sh reminders Bullet list or "None"
"List my places" scripts/location.sh places Bullet list
"List places nearby" scripts/location.sh places --near Sorted by distance
"List my pubs downtown" scripts/location.sh places --region downtown --category pub Filtered list
"Save this spot as X" scripts/location.sh addplace "X" Confirm
"Delete place X" scripts/location.sh delplace X Confirm
"Disable the grocery rule" scripts/location.sh disable grocery Confirm
"List my geofence rules" scripts/location.sh geofences Bullet list
"When was I last at X?" scripts/location.sh history X Date/time
"Where have I been today?" scripts/location.sh history --days 1 List of places
"Find me a cafe nearby" scripts/location.sh nearby cafe POI list with distances
"Any pubs within 1km?" scripts/location.sh nearby pub 1000 Filtered POI list
"How long was I at work this week?" scripts/location.sh stats --days 7 Hours per place

Response style: Terse. No preamble. No "Here's your location:". Just the answer.

All Commands

All via scripts/location.sh \x3Ccommand>:

Command Description
status Current location, geofences inside, map link
herewego Just the HERE WeGo map link
check Check for triggered actions/reminders (used by cron)
places [--near] [--region R] [--category C] List saved places
geofences List all geofences with full details
remind \x3Ctext> \x3Cplace_id> Add one-shot location reminder
reminders List pending reminders
addplace \x3Cname> [radius] [--region R] [--category C] Save current location
editplace \x3Cid> [--name] [--radius] [--region] [--category] [--action] [--cooldown] Modify a place
delplace \x3Cid> Delete a place
enable \x3Cid> / disable \x3Cid> Toggle geofence on/off
history [place] [--days N] When was I last at a place?
nearby \x3Ccategory> [radius] Find nearby POIs (cafe, pub, restaurant, etc.)
stats [--days N] Time spent at each place, visit counts
proximity \x3Ctext> \x3Cplace/lat> [lon] [radius] Alert when approaching a location
eta \x3Cplace> [--mode walk|bike|car] Travel time and distance to a place

Note: eta accepts saved place names, coordinates (lat,lon), or any place name (geocoded via OpenStreetMap, biased to current location).

Note: status returns the zone name if in a known place, otherwise reverse geocodes to a street address (e.g., "123 Main Street, Downtown").

Concepts

Geofences — Saved places with lat/lon, radius, and optional action. Persistent.

Reminders — One-shot alerts tied to a place. Deleted after delivery.

Region/Category — Optional tags for filtering (e.g., "downtown", "pub").


Setup (for administrators)

Provider Configuration

Edit scripts/config.json:

Home Assistant (default):

{
  "provider": "homeassistant",
  "homeassistant": {
    "url": "https://your-ha.example.com",
    "token": "your-long-lived-token",
    "entity_id": "device_tracker.phone"
  }
}

OwnTracks:

{
  "provider": "owntracks",
  "owntracks": {
    "url": "https://owntracks.example.com",
    "user": "username",
    "device": "phone"
  }
}

Generic HTTP:

{
  "provider": "http",
  "http": {
    "url": "https://your-api.com/location",
    "headers": {"Authorization": "Bearer token"}
  }
}

GPSLogger (file-based):

{
  "provider": "gpslogger",
  "gpslogger": {
    "file": "/path/to/location.json"
  }
}

Secrets support: "env:VAR_NAME" (reads from environment variable) or plain string.

Alternative: Configure entirely via environment variables (no config.json needed):

Provider Env variables
LOCATION_PROVIDER homeassistant, owntracks, http, or gpslogger (default: homeassistant)
Home Assistant HA_URL, HA_TOKEN, HA_ENTITY_ID
OwnTracks OWNTRACKS_URL, OWNTRACKS_USER, OWNTRACKS_DEVICE, OWNTRACKS_TOKEN
HTTP LOCATION_HTTP_URL
GPSLogger GPSLOGGER_FILE

Env vars take precedence over config.json values. Set them in ~/.openclaw/.env or your shell environment.

Output format: Most query commands output human-readable text by default. Add --json for JSON output (useful for scripting).

Travel Speeds

Customize walking/biking speeds for ETA calculations in scripts/config.json:

{
  "speeds_kmh": {
    "walk": 6,
    "bike": 15
  }
}

Geofence Config

Edit scripts/geofences.json:

{
  "geofences": [
    {
      "id": "grocery",
      "name": "Grocery Store",
      "lat": 40.7128,
      "lon": -74.0060,
      "radius_m": 30,
      "action": "shopping_tasks",
      "cooldown_hours": 4,
      "enabled": true,
      "region": "downtown",
      "category": "shop"
    }
  ],
  "location_reminders": [],
  "proximity_alerts": []
}

Automatic Notifications (OpenClaw Cron)

Use OpenClaw's built-in cron to run periodic location checks. Add a job to ~/.openclaw/cron/jobs.json:

{
  "name": "Location Check",
  "schedule": "*/5 * * * *",
  "prompt": "Run scripts/location.sh check --json and notify me of any triggered actions, reminders, or proximity alerts.",
  "channel": "signal",
  "to": "+1234567890",
  "wakeMode": "now"
}

This keeps scheduling within OpenClaw rather than requiring external systemd services.

安全使用建议
This skill appears to be what it says: a local location-aware helper that talks to Home Assistant, OwnTracks, a generic HTTP endpoint, or a local GPSLogger file. Before installing or enabling it: - Review scripts/config.json and scripts/location.py to confirm provider URLs and tokens are correct and point to your own services. Don't use tokens from other services. - Understand it will handle highly sensitive location data and may send requests to whichever provider URL you configure (e.g., Home Assistant or an HTTP endpoint). If you configure a third-party HTTP URL, that service will receive your coordinates. - The wrapper automatically sources ~/.openclaw/.env; check that file for any secrets you don't want the skill to read. - The registry metadata omits declaring required env vars; expect to provide HA_TOKEN/HA_URL, OWNTRACKS_TOKEN/OWNTRACKS_URL, or LOCATION_HTTP_URL (depending on provider) for full functionality. - If you want additional assurance, inspect the remainder of scripts/location.py (the truncated portion) to confirm there are no unexpected network calls or remote endpoints beyond configured providers. If you do not trust the skill, run it in an isolated environment or omit provider credentials so it cannot contact external services.
功能分析
Type: OpenClaw Skill Name: location-awareness Version: 1.2.0 The OpenClaw AgentSkills skill bundle for 'location-awareness' is classified as benign. The `SKILL.md` provides clear, purpose-aligned instructions for the AI agent, without any prompt injection attempts to subvert its behavior. The `scripts/location.sh` wrapper sources `~/.openclaw/.env` for configuration, a standard and documented practice for securely loading API tokens (e.g., `HA_TOKEN`) for the script's use, not for exfiltration. The core `scripts/location.py` script makes legitimate network calls to configured location providers (Home Assistant, OwnTracks, generic HTTP) and public mapping/geocoding/routing services (OpenStreetMap Nominatim, OSRM, Overpass API), all aligned with its stated purpose. There is no evidence of unauthorized data exfiltration, malicious execution, persistence mechanisms, or obfuscation.
能力评估
Purpose & Capability
Name/description (privacy-friendly GPS tracking, Home Assistant/OwnTracks/GPSLogger support) match the included code: providers for Home Assistant, OwnTracks, generic HTTP and a file-based GPSLogger are implemented. The only required binary is python3 which is appropriate. Minor inconsistency: the registry metadata lists no required environment variables, yet the skill explicitly supports/reads many provider-related env vars (HA_TOKEN, HA_URL, OWNTRACKS_TOKEN, LOCATION_HTTP_URL, GPSLOGGER_FILE, LOCATION_PROVIDER), which are necessary for operation when used with remote services.
Instruction Scope
SKILL.md confines runtime actions to running scripts/location.sh which execs location.py and documents the exact commands the agent should run. The runtime instructions and code reference config.json, geofences.json and optionally env vars or ~/.openclaw/.env. The agent is instructed to run the local script and return its output; the instructions do not ask the agent to read arbitrary unrelated files or network endpoints beyond the configured providers. Important: the wrapper will source ~/.openclaw/.env if present, exposing any credentials stored there to the skill.
Install Mechanism
No install spec; the skill is delivered as files and requires an existing python3 on PATH. No downloads or archive extraction are performed by the skill itself, which is low-risk from an install perspective.
Credentials
The skill legitimately needs provider credentials/URLs to access Home Assistant, OwnTracks, or an HTTP endpoint. However, the registry metadata declares no required env vars or primary credential while SKILL.md and the code clearly support many sensitive env vars (HA_TOKEN, HA_URL, OWNTRACKS_TOKEN, LOCATION_HTTP_URL, GPSLOGGER_FILE, etc.). This mismatch is a transparency/metadata issue: users should expect to supply secrets if they want full functionality. The skill does not request unrelated credentials (e.g. AWS keys) and reads only provider-configured endpoints and files.
Persistence & Privilege
always:false (no forced inclusion) and the skill does not request elevated privileges. It stores its geofence/reminder/state files in its script directory (geofences.json, .location_state.json), which is normal for a local skill. It does source ~/.openclaw/.env (via the provided wrapper) which is documented — this gives the skill access to any credentials the user places there, so users should ensure that file only contains intended variables.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install location-awareness
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /location-awareness 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Security: removed arbitrary shell execution (cmd:), file reads (file:, pass:) and subprocess import from secret resolver. Secrets now support only env vars and plain strings. Removed standalone cron script. Added env var configuration for all providers (HA_*, OWNTRACKS_*, LOCATION_HTTP_URL, GPSLOGGER_FILE). Env vars take precedence over config.json. Replaced systemd timer docs with OpenClaw built-in cron.
v1.1.0
Security fix: removed cmd:command arbitrary shell execution from resolve_secret(); replaced with file:/path reader. Replaced systemd timer cron setup with OpenClaw built-in cron recommendation.
v1.0.1
Fix summary field for clawhub.ai.
v1.0.0
- Initial release of the location-awareness skill, providing location-based commands via GPS tracking. - Supports queries about current location, travel time/ETA, distances, location history, nearby places, geofences, and location-based reminders. - Integrates with Home Assistant, OwnTracks, HTTP, and file-based location providers. - All actions implemented via `scripts/location.sh` for unified command usage. - Includes concise quick-reference table for mapping user requests to commands and expected replies. - Provides setup instructions for administrators covering configuration, travel speed customization, geofence management, and automated location checks via systemd.
元数据
Slug location-awareness
版本 1.2.0
许可证
累计安装 3
当前安装数 3
历史版本数 4
常见问题

Location Awareness 是什么?

Location awareness via privacy-friendly GPS tracking (Home Assistant, OwnTracks, GPS Logger). Set location-based reminders and ask about movement history, travel time, and nearby POIs. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2259 次。

如何安装 Location Awareness?

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

Location Awareness 是免费的吗?

是的,Location Awareness 完全免费(开源免费),可自由下载、安装和使用。

Location Awareness 支持哪些平台?

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

谁开发了 Location Awareness?

由 Hegghammer(@hegghammer)开发并维护,当前版本 v1.2.0。

💬 留言讨论