← 返回 Skills 市场
fungjcode

Earthquake Monitor

作者 fungj · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ⚠ suspicious
410
总下载
1
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

🌋 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

安全使用建议
What to consider before installing: - Webhook storage: despite older docs, the current code stores webhook URLs in config.json as plain text (SECURITY.md confirms encryption was removed in v1.1.1). If you plan to use a webhook with a secret token, assume it will be stored unencrypted on disk. Prefer using a non-sensitive test webhook or patch the code to read webhook URLs from a secure environment variable instead of config.json. - Data provenance: the code fetches feeds from api.wolfx.jp (a third‑party aggregator) rather than directly contacting CENC/CWA/JMA. If you require data to come directly from official agency endpoints, review and/or modify the fetch layer to use the official APIs. - Review network calls: the implementation calls curl via child_process.exec to retrieve JSON. This is functional but slightly unusual; verify the endpoints and TLS (they use HTTPS) and consider running the skill in an isolated environment if you have strict network security policies. - Sensitive files: config.json is ignored by .gitignore (good) but still stored on disk. Ensure file permissions are restrictive or run the skill where config.json cannot be accessed by other users/processes. - If you need stronger guarantees: ask the author to re-enable encryption for webhook storage (or accept webhook via environment variables), remove unused dependencies (e.g., ws if unused), and document the actual data endpoints used. If unsure, run and test the skill in a sandboxed environment before using with production webhooks or secrets.
功能分析
Type: OpenClaw Skill Name: earthquake-monitor Version: 1.1.1 The skill utilizes 'child_process.exec' to execute shell commands (curl) for data retrieval in 'src/cenc.js', 'src/cwa.js', and 'src/jma.js'. While the URLs are currently hardcoded to 'api.wolfx.jp', using shell execution for network requests is a high-risk practice that introduces potential command injection vulnerabilities. Furthermore, 'SECURITY.md' and 'src/config.js' explicitly state that encryption for webhook URLs was removed in v1.1.1, resulting in sensitive credentials being stored in plaintext within 'config.json'.
能力评估
Purpose & Capability
Name/description match the code: the package fetches earthquake feeds, normalizes data, does distance checks and formats alerts. Required binaries (curl) and Node >=18 are reasonable. Minor mismatch: package.json includes 'ws' dependency but code does not appear to use websockets (unused dependency). The code fetches from https://api.wolfx.jp/* rather than directly from the official agency endpoints the README/SECURITY.md emphasize.
Instruction Scope
SKILL.md claims webhook URLs are encrypted with AES-256-CBC before storing, but the code and SECURITY.md state encryption was removed in v1.1.1 and config.webhook is written as plain text to config.json. SKILL.md and SECURITY.md also claim data is from official agencies (CENC/CWA/JMA) but the implementation fetches JSON from a third-party host (api.wolfx.jp) — a material mismatch about data provenance. The code uses child_process.exec to call curl (declared requirement) but does not itself POST webhooks; webhook sending is left to an onAlert callback or external caller, which is subtle and could confuse users expecting automatic outbound webhook delivery.
Install Mechanism
No install spec (instruction-only) — lowest installation risk. There are local JS files and a package.json, but no arbitrary downloads or extract steps. It expects Node >=18 and curl to be present. No remote install URLs or archived payloads were found.
Credentials
The skill requests no environment variables or credentials, which is proportional. However, it stores webhook URLs in config.json (plain text) and offers APIs to set the webhook — this is a privacy risk because sensitive webhook tokens/URLs may be persisted unencrypted on disk. .gitignore excludes config.json which reduces accidental commits, but local storage remains plaintext post v1.1.1.
Persistence & Privilege
always is false and the skill does not request elevated platform privileges. It writes its own config.json in the skill directory (expected). It does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install earthquake-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /earthquake-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
Earthquake Monitor v1.1.1 - Security and Documentation Update - Removed webhook encryption to ensure ClawHub compatibility. - Added SECURITY.md with security-related information. - Added .gitignore file to manage untracked files.
v1.1.0
- Added multi-language support with alert messages in Chinese, English, and Japanese - Implemented fuzzy location matching (pinyin, abbreviations, partial match) - Introduced secure webhook URL encryption using AES-256-CBC - Optimized performance with a shared cache module and auto-cleanup - Fixed Taiwan (CWA) data source integration - Improved notification deduplication logic
v1.0.0
Initial release of earthquake-monitor. - Real-time earthquake monitoring for China, Taiwan, and Japan using CENC, CWA, and JMA WebSocket data - Proactive alert support with customizable location, distance, magnitude, and interval - Simple functions for initializing, starting, and stopping monitoring - No API key required; supports HTTP fallback - Monitors 40+ major East Asian cities
元数据
Slug earthquake-monitor
版本 1.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 410 次。

如何安装 Earthquake Monitor?

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

Earthquake Monitor 是免费的吗?

是的,Earthquake Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Earthquake Monitor 支持哪些平台?

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

谁开发了 Earthquake Monitor?

由 fungj(@fungjcode)开发并维护,当前版本 v1.1.1。

💬 留言讨论