Earthquake Monitor
/install earthquake-monitor
๐ Earthquake Monitor v1.1.1
Real-time earthquake monitoring for China (CENC), Taiwan (CWA), and Japan (JMA) with proactive alerting.
v1.1.1 Changelog
v1.1.1 (Security Fix)
- ๐ Security Update - Removed encryption for ClawHub compatibility
- ๐ Added SECURITY.md documentation
v1.1.0 Features
- ๐ Multi-language Support - Alert messages in Chinese, English, and Japanese
- ๐ Location Fuzzy Matching - Supports pinyin (dali), abbreviations (DL), partial match (da)
- โก Performance Optimization - Shared cache module with auto-cleanup
- โ Fixed Taiwan (CWA) data source integration
- โ Improved notification deduplication logic
Quick Start
// Initialize monitoring
await init({ location: "ๅคง็" })
// Get latest earthquakes
await getAll()
// Start proactive monitoring
await start()
Data Sources
| Source | Region | Language (Alert) | Description |
|---|---|---|---|
| CENC | ๐จ๐ณ China | ไธญๆ | China Earthquake Networks Center |
| CWA | ๐น๐ผ Taiwan | ไธญๆ | Central Weather Administration |
| JMA | ๐ฏ๐ต Japan | ๆฅๆฌ่ช | Japan Meteorological Agency |
API Reference
init(options)
Initialize configuration.
await init({
location: "dali", // City name (supports pinyin, abbreviations)
distanceThreshold: 300, // Alert distance in km
minMagnitude: 3.0, // Minimum magnitude
language: 'zh', // Language: zh/en/ja
sources: { // Toggle data sources
CENC: true,
JMA: true,
CWA: true
}
})
getAll(options)
Get earthquakes from all sources.
const result = await getAll({ limit: 5 })
// Returns: { earthquakes, totalCount, nearbyEarthquakes, hasAlert, alertMessage }
getCENC(limit)
Get China earthquake data.
const { earthquakes } = await getCENC(10)
getJMA(limit)
Get Japan earthquake data.
const { earthquakes } = await getJMA(10)
getCWA()
Get Taiwan earthquake early warning data.
const { earthquakes, isWarning } = await getCWA()
start(options)
Start proactive monitoring with auto-alerts.
await start({ interval: 60000 }) // Check every 60 seconds
stop()
Stop monitoring.
await stop()
config(newConfig)
View or update configuration.
// View
const cfg = await config()
// Update
await config({ language: 'en', minMagnitude: 4.0 })
cities()
List all supported cities with coordinates.
const { cities } = await cities()
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
| location | string/object | ๅคง็ | City name or {name, latitude, longitude} |
| distanceThreshold | number | 300 | Alert distance in km |
| minMagnitude | number | 3.0 | Minimum earthquake magnitude |
| language | string | zh | Alert language: zh/en/ja |
| sources.CENC | boolean | true | Enable China data |
| sources.JMA | boolean | true | Enable Japan data |
| sources.CWA | boolean | true | Enable Taiwan data |
| webhook | string | null | Encrypted webhook URL |
Supported Cities (20+)
| City | Pinyin | Abbr | Coordinates |
|---|---|---|---|
| ๅคง็ | dali, dal, dl | DL | 25.61ยฐN, 100.27ยฐE |
| ๅไบฌ | beijing, bj, b | BJ | 39.90ยฐN, 116.40ยฐE |
| ไธๆตท | shanghai, sh, s | SH | 31.23ยฐN, 121.47ยฐE |
| ๆๆ | kunming, km, k | KM | 25.04ยฐN, 102.71ยฐE |
| ๆ้ฝ | chengdu, cd, c | CD | 30.57ยฐN, 104.07ยฐE |
| ไธไบฌ | tokyo, dj, d | DJ | 35.68ยฐN, 139.69ยฐE |
| ... | ... | ... | ... |
Location Matching Examples
All these return Beijing:
await init({ location: 'ๅไบฌ' }) // Chinese
await init({ location: 'beijing' }) // Full pinyin
await init({ location: 'bj' }) // Abbreviation
await init({ location: 'bei' }) // Partial match
Multi-Language Alerts
Alert language is automatically selected based on earthquake source:
| Source | Language | Example |
|---|---|---|
| CENC (China) | ไธญๆ | โ ๏ธ ๅฐ้้ข่ญฆๆ้๏ผ |
| CWA (Taiwan) | ไธญๆ | โ ๏ธ ๅฐ้้ข่ญฆๆ้๏ผ |
| JMA (Japan) | ๆฅๆฌ่ช | โ ๏ธ ๅฐ้ใขใฉใผใ๏ผ |
Manual Language Override
// Set preferred language (applies to alert format)
await init({ language: 'en' })
// All alerts will be in English regardless of source
Alert Message Format
โ ๏ธ Earthquake Alert!
๐ Epicenter near Dali:
1. ๐ด M7.6็บง [ไธญๅฝๅฐ้ๅฐ็ฝ]
๐ ๆฑคๅ ็พคๅฒ
๐ Distance: 5000km
โฐ 2026-03-24 12:37:50
๐ Depth: 250km
Please stay safe!
Security
Webhook URLs are encrypted using AES-256-CBC before storing in config file:
// Set webhook (automatically encrypted)
await config({ webhook: 'https://oapi.dingtalk.com/robot/send?access_token=xxx' })
// Stored encrypted, decrypted only in memory
Performance
Shared Cache
- Reduces redundant API calls
- TTL-based expiration (1 minute default)
- Auto-cleanup every 5 minutes
Parallel Fetching
- All three data sources fetched simultaneously
- Fast response time
Return Format
{
timestamp: "2026-03-24T14:30:00.000Z",
sources: [
{ source: "CENC", sourceName: "ไธญๅฝๅฐ้ๅฐ็ฝ", count: 10, earthquakes: [...] },
{ source: "JMA", sourceName: "ๆฅๆฌๆฐ่ฑกๅ
", count: 5, earthquakes: [...] }
],
earthquakes: [...], // Merged, sorted by time
totalCount: 15,
nearbyEarthquakes: [...], // Within distanceThreshold
hasAlert: true/false,
alertMessage: "..." // Formatted alert string
}
Notes
- ๐ Data from official government agencies (CENC/CWA/JMA)
- ๐ No API key required
- ๐ก WebSocket + HTTP fallback
- ๐ Auto-retry on failure
Support
- Author: fungjcode
- GitHub: https://github.com/fungjcode/earthquake-monitor
- Report issues at: https://github.com/fungjcode/earthquake-monitor/issues
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install earthquake-monitor - After installation, invoke the skill by name or use
/earthquake-monitor - Provide required inputs per the skill's parameter spec and get structured output
What is Earthquake Monitor?
๐ Real-time earthquake monitoring for China, Taiwan, and Japan. CENC/CWA/JMA data with proactive alerting. v1.1.1 - Multi-language (zh/en/ja), pinyin locati... It is an AI Agent Skill for Claude Code / OpenClaw, with 410 downloads so far.
How do I install Earthquake Monitor?
Run "/install earthquake-monitor" in the OpenClaw or Claude Code chat to install it in one step โ no extra setup required.
Is Earthquake Monitor free?
Yes, Earthquake Monitor is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Earthquake Monitor support?
Earthquake Monitor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Earthquake Monitor?
It is built and maintained by fungj (@fungjcode); the current version is v1.1.1.