简介
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...
通过你的 Agent 添加
安装目录:earthquake-monitor/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: earthquake-monitor
description: "🌋 Real-time earthquake monitoring for China, Taiwan, and Japan. CENC/CWA/JMA data with proactive alerting. v1.1.0 - Multi-language (zh/en/ja), pinyin location matching, secure webhook, optimized cache"
homepage: https://github.com/fungjcode/earthquake-monitor
metadata:
openclaw:
emoji: "🌋"
requires:
bins: ["curl"]
node: ">=18"
🌋 Earthquake Monitor v1.1.0
Real-time earthquake monitoring for China (CENC), Taiwan (CWA), and Japan (JMA) with proactive alerting.
v1.1.0 Changelog
New Features
- 🌍 Multi-language Support - Alert messages in Chinese, English, and Japanese
- 📍 Location Fuzzy Matching - Supports pinyin (dali), abbreviations (DL), partial match (da)
- 🔒 Security Optimization - Webhook URLs encrypted with AES-256-CBC
- ⚡ Performance Optimization - Shared cache module with auto-cleanup
Bug Fixes
- ✅ 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 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)
| Source | Region | Language (Alert) | Description |
|---|---|---|---|
| CENC | 🇨🇳 China | 中文 | China Earthquake Networks Center |
| CWA | 🇹🇼 Taiwan | 中文 | Central Weather Administration |
| JMA | 🇯🇵 Japan | 日本語 | Japan Meteorological Agency |
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
| 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 |
| 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
// Set preferred language (applies to alert format)
await init({ language: 'en' })
// All alerts will be in English regardless of source
⚠️ 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
{
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
- Author: fungjcode
- GitHub: https://github.com/fungjcode/earthquake-monitor
- Report issues at: https://github.com/fungjcode/earthquake-monitor/issues
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。