{"skill":{"slug":"earthquake-monitor","displayName":"Earthquake Monitor","summary":"🌋 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...","description":"---\nname: earthquake-monitor\ndescription: \"🌋 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 location matching, optimized cache\"\nhomepage: https://github.com/fungjcode/earthquake-monitor\nmetadata:\n  openclaw:\n    emoji: \"🌋\"\n    requires:\n      bins: [\"curl\"]\n      node: \">=18\"\n---\n\n# 🌋 Earthquake Monitor v1.1.1\n\nReal-time earthquake monitoring for China (CENC), Taiwan (CWA), and Japan (JMA) with proactive alerting.\n\n## v1.1.1 Changelog\n\n### v1.1.1 (Security Fix)\n- 🔒 **Security Update** - Removed encryption for ClawHub compatibility\n- 📝 Added SECURITY.md documentation\n\n### v1.1.0 Features\n- 🌍 **Multi-language Support** - Alert messages in Chinese, English, and Japanese\n- 📍 **Location Fuzzy Matching** - Supports pinyin (dali), abbreviations (DL), partial match (da)\n- ⚡ **Performance Optimization** - Shared cache module with auto-cleanup\n- ✅ **Fixed** Taiwan (CWA) data source integration\n- ✅ **Improved** notification deduplication logic\n\n---\n\n## Quick Start\n\n```javascript\n// Initialize monitoring\nawait init({ location: \"大理\" })\n\n// Get latest earthquakes\nawait getAll()\n\n// Start proactive monitoring\nawait start()\n```\n\n---\n\n## Data Sources\n\n| Source | Region | Language (Alert) | Description |\n|--------|--------|------------------|-------------|\n| CENC | 🇨🇳 China | 中文 | China Earthquake Networks Center |\n| CWA | 🇹🇼 Taiwan | 中文 | Central Weather Administration |\n| JMA | 🇯🇵 Japan | 日本語 | Japan Meteorological Agency |\n\n---\n\n## API Reference\n\n### init(options)\nInitialize configuration.\n\n```javascript\nawait init({\n  location: \"dali\",           // City name (supports pinyin, abbreviations)\n  distanceThreshold: 300,     // Alert distance in km\n  minMagnitude: 3.0,         // Minimum magnitude\n  language: 'zh',            // Language: zh/en/ja\n  sources: {                // Toggle data sources\n    CENC: true,\n    JMA: true,\n    CWA: true\n  }\n})\n```\n\n### getAll(options)\nGet earthquakes from all sources.\n\n```javascript\nconst result = await getAll({ limit: 5 })\n// Returns: { earthquakes, totalCount, nearbyEarthquakes, hasAlert, alertMessage }\n```\n\n### getCENC(limit)\nGet China earthquake data.\n\n```javascript\nconst { earthquakes } = await getCENC(10)\n```\n\n### getJMA(limit)\nGet Japan earthquake data.\n\n```javascript\nconst { earthquakes } = await getJMA(10)\n```\n\n### getCWA()\nGet Taiwan earthquake early warning data.\n\n```javascript\nconst { earthquakes, isWarning } = await getCWA()\n```\n\n### start(options)\nStart proactive monitoring with auto-alerts.\n\n```javascript\nawait start({ interval: 60000 })  // Check every 60 seconds\n```\n\n### stop()\nStop monitoring.\n\n```javascript\nawait stop()\n```\n\n### config(newConfig)\nView or update configuration.\n\n```javascript\n// View\nconst cfg = await config()\n\n// Update\nawait config({ language: 'en', minMagnitude: 4.0 })\n```\n\n### cities()\nList all supported cities with coordinates.\n\n```javascript\nconst { cities } = await cities()\n```\n\n---\n\n## Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| location | string/object | 大理 | City name or {name, latitude, longitude} |\n| distanceThreshold | number | 300 | Alert distance in km |\n| minMagnitude | number | 3.0 | Minimum earthquake magnitude |\n| language | string | zh | Alert language: zh/en/ja |\n| sources.CENC | boolean | true | Enable China data |\n| sources.JMA | boolean | true | Enable Japan data |\n| sources.CWA | boolean | true | Enable Taiwan data |\n| webhook | string | null | Encrypted webhook URL |\n\n---\n\n## Supported Cities (20+)\n\n| City | Pinyin | Abbr | Coordinates |\n|------|--------|------|-------------|\n| 大理 | dali, dal, dl | DL | 25.61°N, 100.27°E |\n| 北京 | beijing, bj, b | BJ | 39.90°N, 116.40°E |\n| 上海 | shanghai, sh, s | SH | 31.23°N, 121.47°E |\n| 昆明 | kunming, km, k | KM | 25.04°N, 102.71°E |\n| 成都 | chengdu, cd, c | CD | 30.57°N, 104.07°E |\n| 东京 | tokyo, dj, d | DJ | 35.68°N, 139.69°E |\n| ... | ... | ... | ... |\n\n### Location Matching Examples\n\nAll these return Beijing:\n```javascript\nawait init({ location: '北京' })      // Chinese\nawait init({ location: 'beijing' })   // Full pinyin\nawait init({ location: 'bj' })        // Abbreviation\nawait init({ location: 'bei' })       // Partial match\n```\n\n---\n\n## Multi-Language Alerts\n\nAlert language is automatically selected based on earthquake source:\n\n| Source | Language | Example |\n|--------|----------|---------|\n| CENC (China) | 中文 | ⚠️ 地震预警提醒！ |\n| CWA (Taiwan) | 中文 | ⚠️ 地震预警提醒！ |\n| JMA (Japan) | 日本語 | ⚠️ 地震アラート！ |\n\n### Manual Language Override\n\n```javascript\n// Set preferred language (applies to alert format)\nawait init({ language: 'en' })\n\n// All alerts will be in English regardless of source\n```\n\n### Alert Message Format\n\n```\n⚠️ Earthquake Alert!\n📍 Epicenter near Dali:\n\n1. 🔴 M7.6级 [中国地震台网]\n   📍 汤加群岛\n   📏 Distance: 5000km\n   ⏰ 2026-03-24 12:37:50\n   📊 Depth: 250km\n\nPlease stay safe!\n```\n\n---\n\n## Security\n\nWebhook URLs are encrypted using AES-256-CBC before storing in config file:\n\n```javascript\n// Set webhook (automatically encrypted)\nawait config({ webhook: 'https://oapi.dingtalk.com/robot/send?access_token=xxx' })\n\n// Stored encrypted, decrypted only in memory\n```\n\n---\n\n## Performance\n\n### Shared Cache\n- Reduces redundant API calls\n- TTL-based expiration (1 minute default)\n- Auto-cleanup every 5 minutes\n\n### Parallel Fetching\n- All three data sources fetched simultaneously\n- Fast response time\n\n---\n\n## Return Format\n\n```javascript\n{\n  timestamp: \"2026-03-24T14:30:00.000Z\",\n  sources: [\n    { source: \"CENC\", sourceName: \"中国地震台网\", count: 10, earthquakes: [...] },\n    { source: \"JMA\", sourceName: \"日本气象厅\", count: 5, earthquakes: [...] }\n  ],\n  earthquakes: [...],      // Merged, sorted by time\n  totalCount: 15,\n  nearbyEarthquakes: [...], // Within distanceThreshold\n  hasAlert: true/false,\n  alertMessage: \"...\"       // Formatted alert string\n}\n```\n\n---\n\n## Notes\n\n- 🌐 Data from official government agencies (CENC/CWA/JMA)\n- 🔑 No API key required\n- 📡 WebSocket + HTTP fallback\n- 🔄 Auto-retry on failure\n\n---\n\n## Support\n\n- Author: fungjcode\n- GitHub: https://github.com/fungjcode/earthquake-monitor\n- Report issues at: https://github.com/fungjcode/earthquake-monitor/issues\n","tags":{"latest":"1.1.1"},"stats":{"comments":0,"downloads":817,"installsAllTime":0,"installsCurrent":0,"stars":1,"versions":3},"createdAt":1773213893735,"updatedAt":1778997760182},"latestVersion":{"version":"1.1.1","createdAt":1774365212478,"changelog":"Earthquake Monitor v1.1.1 - Security and Documentation Update\n\n- Removed webhook encryption to ensure ClawHub compatibility.\n- Added SECURITY.md with security-related information.\n- Added .gitignore file to manage untracked files.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"fungjcode","userId":"s17c721mtnf9zztgbsafwt421x83hstq","displayName":"fungj","image":"https://avatars.githubusercontent.com/u/16017206?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780090081068}}