← 返回
效率工具 Key 中文

Stormglass Surf & Ocean Data

Fetch surf-relevant ocean conditions from Stormglass by spot name or coordinates, including current snapshot and 1-3 day forecast windows with tides, gusts,...
通过冲浪点名称或坐标,从 Stormglass 获取海洋冲浪相关状况,包括当前快照和 1‑3 天预报窗口,包含潮汐、阵风等。
dgorissen
效率工具 clawhub v1.0.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 842
下载
💾 14
安装
1
版本
#latest

概述

Stormglass Surf Skill

Purpose

Produce machine-readable surf condition data for cron-driven agent pipelines.

This skill resolves a surf spot name with Google Geocoding (or uses direct coordinates), queries Stormglass, and returns a stable JSON payload for downstream interpretation/rendering.

Inputs

Provide exactly one location mode:

  • --location "Spot name" (optional country/region in string), or
  • --lat --lon

Optional controls:

  • --horizon now|24h|48h|72h (default 72h)
  • --output json|pretty (default json, recommended for automation)
  • --source
  • --mock (offline deterministic data; useful for tests)

Required Environment Variables

  • STORMGLASS_API_KEY for Stormglass requests
  • GOOGLE_GEOCODING_API_KEY optional for --location (if absent, script falls back to OpenStreetMap Nominatim)

In --mock mode, no API keys are required.

Credential Matrix

ModeSTORMGLASS_API_KEYGOOGLE_GEOCODING_API_KEY
---------
--mocknot requirednot required
live --lat/--lonrequirednot required
live --location with Googlerequiredoptional (preferred when set)
live --location with OSM fallbackrequirednot required

Primary credential is STORMGLASS_API_KEY.

Execution Commands

JSON output for cron:

python scripts/surf_report.py --location "Highcliffe Beach" --horizon 72h --output json

Direct coordinates:

python scripts/surf_report.py --lat 50.735 --lon -1.705 --horizon 24h --output json

Offline test run:

python scripts/surf_report.py --location "Highcliffe Beach" --horizon now --mock --output json

Output Contract (JSON-first)

Top-level keys are stable:

  • meta: request metadata, timestamps, input mode, optional warnings
  • location: resolved place details and coordinates
  • now: instantaneous surf-relevant metrics
  • forecast: horizon summaries and best windows
  • tides: tide extremes and inferred current tide trend

Expected metric coverage (null if unavailable):

  • waveHeightM
  • swellHeightM
  • swellPeriodS
  • swellDirectionDeg
  • windSpeedMps
  • windDirectionDeg
  • windGustMps
  • waterTemperatureC

Exit Codes

  • 0: success
  • 2: invalid CLI usage/arguments
  • 3: missing API keys/configuration
  • 4: external API failure (geocoding/Stormglass)
  • 5: response parsing/normalization failure

Agent Handoff Rules

  • Prefer --output json for downstream agents.
  • Treat null metrics as "not provided by source", not zero.
  • Read field-level details in reference.md.
  • Use examples.md for prompt and command patterns.
  • Use scripts/test_surf_report.py before cron rollout.
  • Optional: use scripts/normalize_surf_data.py to enforce strict schema defaults before rendering.

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-29 13:54 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 446 📥 226,454
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,962
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 148,116