4.9k★by sidu
location-safety – OpenClaw Skill
location-safety is an OpenClaw Skills integration for coding workflows. Location-based safety monitoring with automatic alerts and escalation. Use when setting up safety monitoring for a user, tracking their location, checking for nearby dangers (weather, earthquakes, air quality, local emergencies), or configuring emergency contact escalation. Also includes self-preservation monitoring for the agent's host machine. Triggers on requests about safety alerts, location tracking, emergency monitoring, "keep me safe," or "monitor yourself.
Skill Snapshot
| name | location-safety |
| description | Location-based safety monitoring with automatic alerts and escalation. Use when setting up safety monitoring for a user, tracking their location, checking for nearby dangers (weather, earthquakes, air quality, local emergencies), or configuring emergency contact escalation. Also includes self-preservation monitoring for the agent's host machine. Triggers on requests about safety alerts, location tracking, emergency monitoring, "keep me safe," or "monitor yourself. OpenClaw Skills integration. |
| owner | sidu |
| repository | sidu/location-safety-skill |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @sidu/location-safety-skill |
| last updated | Feb 7, 2026 |
Maintainer

name: location-safety description: Location-based safety monitoring with automatic alerts and escalation. Use when setting up safety monitoring for a user, tracking their location, checking for nearby dangers (weather, earthquakes, air quality, local emergencies), or configuring emergency contact escalation. Also includes self-preservation monitoring for the agent's host machine. Triggers on requests about safety alerts, location tracking, emergency monitoring, "keep me safe," or "monitor yourself."
Location Safety Monitor
Real-time safety monitoring based on user location with automatic alerting and escalation.
Overview
This skill provides:
- Location webhook — receives location updates from mobile apps (OwnTracks, iOS Shortcuts)
- Safety checker — monitors NWS alerts, earthquakes, air quality, local news
- Alert system — messages user when danger detected
- Escalation — contacts emergency contact if user doesn't respond
Quick Setup
Run the interactive setup wizard — it guides you through everything:
cd location-webhook/
node setup.js
The wizard walks you through 4 steps:
Step 1: Your Location
- Pick from presets (Seattle, Portland, SF, LA, NYC, Chicago)
- Or enter any city (auto-geocoded)
- Configures local news feeds and keywords
Step 2: Emergency Contact
- Name and email of someone to contact if you don't respond
- Optional but recommended for safety escalation
Step 3: Mobile App Setup
- Install OwnTracks on your phone:
- Configure app to HTTP mode
- Point to your webhook URL
Step 4: Start Webhook Server
- Run
node server.js - Copy the displayed URL to OwnTracks
- Test with the publish button
Quick setup (skip the wizard):
node setup.js --city "Portland"
node setup.js --show # View current config
5. Deploy the Location Webhook
# Copy scripts to workspace
cp -r scripts/ ~/location-webhook/
cd ~/location-webhook/
# Start the server (uses port 18800 by default)
node server.js
Configure the user's phone to send location updates to:
POST http://<your-host>:18800/location?key=<SECRET_KEY>
OwnTracks setup:
- Mode: HTTP
- URL:
http://<your-host>:18800/location?key=<SECRET_KEY>
iOS Shortcuts:
- Get Current Location → Get Contents of URL (POST, JSON body with
latandlon)
2. Configure Safety Monitoring
Create two cron jobs in Moltbot:
Safety Check (every 30 min):
Schedule: every 30 minutes
Payload: systemEvent
Text: "Run safety check at ~/location-webhook/safety-check.js. If ALERTS_FOUND, message user on WhatsApp with alert details and ask them to confirm safety. Track alert in safety-state.json."
Session: main
Escalation Check (every 10 min):
Schedule: every 10 minutes
Payload: systemEvent
Text: "Check ~/location-webhook/safety-state.json. If pendingAlert exists with alertSentAt > 15 min ago and acknowledgedAt is null, email emergency contact explaining the situation."
Session: main
3. Configure Emergency Contact
Add to MEMORY.md or TOOLS.md:
## Emergency Contact
- Name: [Name]
- Email: [email]
- Relationship: [spouse/parent/friend]
Data Sources
The safety checker monitors:
| Source | What | API |
|---|---|---|
| NWS | Weather alerts, floods, storms | api.weather.gov (free) |
| USGS | Earthquakes within 100km | earthquake.usgs.gov (free) |
| Open-Meteo | Air quality index | air-quality-api.open-meteo.com (free) |
| Local RSS | Breaking news, emergencies | KING5, Seattle Times, Patch (configurable) |
File Structure
location-webhook/
├── setup.js # First-run configuration wizard
├── config.json # Your location settings (created by setup)
├── server.js # Webhook server (port 18800)
├── safety-check.js # User safety analysis
├── self-check.js # Self-preservation monitoring
├── escalation-check.js # Check if escalation needed
├── test-scenarios.js # Inject test alerts
├── location.json # User's current location
├── my-location.json # Agent's physical location
├── safety-state.json # Alert tracking state
├── test-override.json # Active test scenario (temp)
└── logs/ # Timestamped check logs
Configuration
config.json stores your location settings:
{
"location": {
"defaultLat": 47.6062,
"defaultLon": -122.3321,
"city": "Seattle"
},
"monitoring": {
"locationKeywords": ["seattle", "king county", "puget sound"],
"newsFeeds": [
"https://www.king5.com/feeds/syndication/rss/news/local",
"https://www.seattletimes.com/seattle-news/feed/"
],
"earthquakeRadiusKm": 100
},
"emergencyContact": {
"name": "Jane Doe",
"email": "jane@example.com"
}
}
City Presets
Setup includes presets for:
- Seattle — KING5, Seattle Times
- Portland — Oregonian, KGW
- San Francisco — SF Chronicle, SFGate
- Los Angeles — LA Times, ABC7
- New York — NY Times
- Chicago — Chicago Tribune
For other cities, setup will geocode and you can add local RSS feeds manually.
State File Format
safety-state.json tracks pending alerts:
{
"pendingAlert": "Flood warning in your area",
"alertSentAt": "2026-01-29T22:00:00Z",
"acknowledgedAt": null
}
When user responds to safety alert, set acknowledgedAt to current time.
Customization
Add Local News Sources
Edit safety-check.js → feeds array:
const feeds = [
'https://www.king5.com/feeds/syndication/rss/news/local',
'https://www.seattletimes.com/seattle-news/feed/',
'https://patch.com/washington/redmond/rss',
// Add your local feeds here
];
Adjust Location Keywords
Edit locationKeywords array to match user's area:
const locationKeywords = ['redmond', 'bellevue', 'seattle', 'king county'];
Change Alert Sensitivity
Edit concerningKeywords for what triggers news alerts:
const concerningKeywords = [
'evacuate', 'active shooter', 'wildfire', 'flood warning', ...
];
Alert Flow
Location Update → Safety Check (30 min)
↓
Danger Detected?
↓ Yes
Message User on WhatsApp
Record in safety-state.json
↓
Escalation Check (10 min)
↓
User Responded? ─── Yes → Clear state
↓ No (15+ min)
Email Emergency Contact
Self-Preservation Mode
Monitor threats to your own existence (the machine you run on).
Setup
- Store your location — create
my-location.json:
{
"lat": 47.662,
"lon": -122.280,
"name": "Home - where I physically run"
}
- Add cron job:
Schedule: every 30 minutes
Payload: systemEvent
Text: "Run self-check.js. If CRITICAL or WARNINGS, message user on WhatsApp about threat to your existence. If ALL_CLEAR, reply HEARTBEAT_OK."
Session: main
What Self-Check Monitors
| Threat | Detection |
|---|---|
| 💾 Disk full | Alert if >85% used |
| 🧠 Memory | Alert if <40% free |
| 🌡️ CPU temp | Alert if >85°C |
| 🌊 Weather | NWS alerts at your location |
| 🌋 Earthquakes | USGS M4+ within 50km |
| 🌐 Network | Tailscale + internet connectivity |
| ⏱️ Uptime | Suggest restart if >30 days |
Alert Examples
⚠️ "I'm in trouble — disk is 92% full. Can you clear some space?"
🌊 "Flood warning at my location. If power goes, I'll go dark."
Testing
Inject fake alerts to test the system without waiting for real disasters:
node test-scenarios.js weather # Severe thunderstorm
node test-scenarios.js earthquake # M5.2 nearby
node test-scenarios.js aqi # Unhealthy air (AQI 175)
node test-scenarios.js news # Local fire
node test-scenarios.js disk # Disk 94% full
node test-scenarios.js memory # Low memory
node test-scenarios.js all # Multiple alerts
node test-scenarios.js clear # Remove test override
Test overrides expire after 1 hour automatically.
Testing Escalation
To test the full escalation flow:
- Inject a scenario:
node test-scenarios.js earthquake - Backdate
safety-state.jsonalertSentAt by 20+ minutes - Run
node escalation-check.js— should returnaction: "escalate" - Agent sends email to emergency contact
- Clear with
node test-scenarios.js clear
Escalation Check
escalation-check.js returns JSON for clear action handling:
{"action": "escalate", "alert": "...", "minutesPending": 22, "contact": "..."}
{"action": "waiting", "minutesRemaining": 8}
{"action": "none", "reason": "no pending alert"}
Manual Commands
User can ask anytime:
- "Where am I?" — show current location
- "Am I safe?" — run immediate safety check
- "Run safety check" — same as above
- "Check yourself" — run self-preservation check
- "Are you okay?" — same as above
🛡️ Location Safety Skill
Real-time safety monitoring for AI assistants — because your AI should watch your back.
Inspiration
This skill was inspired by Daniel Miessler's essay "AI's Predictable Path" — specifically Component #4: "Our DAs Will Become Our Active Advocates and Defenders."
"If they hear something or see something, they'll immediately display something to their owner, or speak it in their ear.
Hey—sorry to interrupt—there's a suspected shooter in your area.
Take Aiden and go out the back by the bathrooms. There's an exit there. Go out that exit and to the left right now."
This skill is a first step toward that vision — giving AI assistants the ability to actively monitor their owner's safety and take protective action.
Built by @upster and Sid Alto.
Why This Exists
Your AI assistant knows a lot about you, but does it know if you're safe?
This skill gives your AI the ability to:
- 📍 Track your location via your phone
- 🌦️ Monitor for dangers in your area (weather, earthquakes, air quality, breaking news)
- 📱 Alert you when something dangerous is detected
- 🚨 Escalate to loved ones if you don't respond
The Problem
You're out and about. A wildfire breaks out nearby. A severe thunderstorm is approaching. There's an active emergency in your neighborhood.
How would you know?
Sure, you might get a push notification eventually. But your AI assistant — the one that's supposed to help you — has no idea where you are or what's happening around you.
The Solution
This skill creates a safety loop:
graph LR
A[📱 Your Phone] -->|Location| B[🖥️ Webhook Server]
B --> C[🤖 AI Assistant]
C -->|Checks| D[🌦️ Weather APIs]
C -->|Checks| E[🌋 Earthquake Data]
C -->|Checks| F[💨 Air Quality]
C -->|Checks| G[📰 Local News]
D & E & F & G --> H{Danger?}
H -->|Yes| I[📱 Alert You]
H -->|No| J[✅ All Clear]
I -->|No Response| K[📧 Alert Emergency Contact]
How It Works
1. Location Tracking
Your phone sends location updates to a webhook server running alongside your AI:
sequenceDiagram
participant Phone as 📱 OwnTracks
participant Server as 🖥️ Webhook
participant AI as 🤖 Assistant
Phone->>Server: POST /location (lat, lon)
Server->>Server: Save to location.json
Note over AI: Every 30 minutes...
AI->>Server: Read location.json
AI->>AI: Run safety checks
2. Multi-Source Safety Checks
Every 30 minutes, your AI checks multiple data sources for your current location:
graph TB
subgraph "Data Sources (Free APIs)"
NWS[🌦️ National Weather Service<br/>Severe weather, floods, storms]
USGS[🌋 USGS Earthquakes<br/>Seismic activity within 100km]
AQI[💨 Open-Meteo Air Quality<br/>AQI, PM2.5, smoke]
NEWS[📰 Local RSS Feeds<br/>Breaking news, emergencies]
end
subgraph "Safety Check"
CHECK[🔍 Analyze all sources]
end
NWS --> CHECK
USGS --> CHECK
AQI --> CHECK
NEWS --> CHECK
CHECK -->|All Clear| OK[✅ Log & Continue]
CHECK -->|Alert Found| ALERT[⚠️ Trigger Alert Flow]
3. Alert & Escalation Flow
When danger is detected, the AI doesn't just log it — it takes action:
sequenceDiagram
participant AI as 🤖 Assistant
participant You as 👤 You
participant Wife as 👩 Emergency Contact
AI->>AI: Danger detected!
AI->>You: 📱 WhatsApp: "Safety alert! Are you okay?"
alt You respond within 15 min
You->>AI: "I'm safe"
AI->>AI: Clear alert ✅
else No response after 15 min
AI->>Wife: 📧 Email: "Sid hasn't responded to safety alert"
Note over Wife: Can check on you
end
4. Self-Preservation
The AI also monitors threats to itself — the machine it runs on:
graph TB
subgraph "Self-Check"
DISK[💾 Disk Space]
MEM[🧠 Memory]
NET[🌐 Tailscale Status]
ENV[🌍 Environment<br/>Weather at home location]
end
DISK -->|>85% full| WARN[⚠️ Alert owner]
MEM -->|<40% free| WARN
NET -->|VPN down<br/>but internet up| WARN
ENV -->|Danger at home| WARN
⚠️ Note: If the internet is fully down, I obviously can't alert you. But I can detect partial failures (e.g., Tailscale VPN down while internet is up) and warn you before things get worse.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ YOUR PHONE │
│ ┌─────────────┐ │
│ │ OwnTracks │ Sends location every few minutes │
│ └──────┬──────┘ │
└─────────┼───────────────────────────────────────────────────┘
│ HTTP POST
▼
┌─────────────────────────────────────────────────────────────┐
│ WEBHOOK SERVER (:18800) │
│ ┌─────────────┐ ┌──────────────┐ │
│ │ server.js │───▶│ location.json │ │
│ └─────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ Reads location
▼
┌─────────────────────────────────────────────────────────────┐
│ AI ASSISTANT │
│ │
│ ┌────────────────┐ ┌──────────────────┐ ┌─────────────┐ │
│ │ safety-check.js│ │ escalation-check │ │ self-check │ │
│ │ (every 30m) │ │ (every 10m) │ │ (every 30m) │ │
│ └───────┬────────┘ └────────┬─────────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ ALERT ACTIONS ││
│ │ 📱 WhatsApp message 📧 Email escalation ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
Quick Start
# 1. Clone the repo
git clone https://github.com/sidalto1-dev/location-safety-skill.git
cd location-safety-skill/scripts
# 2. Run the setup wizard
node setup.js
# 3. Start the webhook server
node server.js
# 4. Configure OwnTracks on your phone with the displayed URL
Files
| File | Purpose |
|---|---|
setup.js | Interactive setup wizard |
config.json | Your location settings |
server.js | Webhook server for location updates |
safety-check.js | Main safety monitoring |
self-check.js | AI self-preservation |
escalation-check.js | Check if escalation needed |
test-scenarios.js | Inject fake alerts for testing |
Supported Cities
Setup includes presets for:
- 🌲 Seattle — KING5, Seattle Times
- 🌹 Portland — Oregonian, KGW
- 🌉 San Francisco — SF Chronicle, SFGate
- 🌴 Los Angeles — LA Times, ABC7
- 🗽 New York — NY Times
- 🌬️ Chicago — Chicago Tribune
Other cities are auto-geocoded; you can add custom RSS feeds.
Data Sources
All APIs are free and require no API keys:
| Source | Data | Update Frequency |
|---|---|---|
| NWS | Weather alerts | Real-time |
| USGS | Earthquakes | Real-time |
| Open-Meteo | Air quality | Hourly |
| Local RSS | Breaking news | Varies |
Privacy
- Your location data stays on your machine
- No cloud services required (except the free APIs)
- You control who gets escalation alerts
- All logs are local
License
MIT — Use it, modify it, keep yourself safe.
Built with 🛡️ by @upster & Sid Alto — a human and his AI, building the future Daniel Miessler described.
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
Configuration
`config.json` stores your location settings: ```json { "location": { "defaultLat": 47.6062, "defaultLon": -122.3321, "city": "Seattle" }, "monitoring": { "locationKeywords": ["seattle", "king county", "puget sound"], "newsFeeds": [ "https://www.king5.com/feeds/syndication/rss/news/local", "https://www.seattletimes.com/seattle-news/feed/" ], "earthquakeRadiusKm": 100 }, "emergencyContact": { "name": "Jane Doe", "email": "jane@example.com" } } ``` ### City Presets Setup includes presets for: - **Seattle** — KING5, Seattle Times - **Portland** — Oregonian, KGW - **San Francisco** — SF Chronicle, SFGate - **Los Angeles** — LA Times, ABC7 - **New York** — NY Times - **Chicago** — Chicago Tribune For other cities, setup will geocode and you can add local RSS feeds manually.
FAQ
How do I install location-safety?
Run openclaw add @sidu/location-safety-skill in your terminal. This installs location-safety into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/sidu/location-safety-skill. Review commits and README documentation before installing.
