โ† Back to Skills Marketplace
fungjcode

Earthquake Monitor

by fungj ยท GitHub โ†— ยท v1.1.1 ยท MIT-0
cross-platform โš  suspicious
410
Downloads
1
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install earthquake-monitor
Description
๐ŸŒ‹ 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...
README (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

Usage Guidance
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.
Capability Analysis
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'.
Capability Assessment
โ„น 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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install earthquake-monitor
  3. After installation, invoke the skill by name or use /earthquake-monitor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug earthquake-monitor
Version 1.1.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

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.

๐Ÿ’ฌ Comments