微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🌊

精准海洋预报 · 智能浪点解析

Stormglass Surf & Ocean Data · v1.0.2
专业技能 安全 B 级 作者 dgorissen 公开目录收录
1k 下载 0 安装 4k 收藏 9 浏览

简介

专业级冲浪条件数据获取工具,整合Stormglass海洋API与Google地理编码,提供实时浪高、潮汐、风速等关键指标的72小时精准预报,适合自动化冲浪报告管道。

原始描述

Fetch surf-relevant ocean conditions from Stormglass by spot name or coordinates, including current snapshot and 1-3 day forecast windows with tides, gusts,...

通过你的 Agent 添加

安装目录:stormglass-surf-skill/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/stormglass-surf-ocean-data/
Codex CLI~/.codex/skills/stormglass-surf-ocean-data/
DeepSeek Harness~/.agents/skills/stormglass-surf-ocean-data/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心功能

Stormglass Surf Skill 是一款面向冲浪爱好者和海洋数据自动化系统的专业工具,通过整合 Stormglass 海洋气象 API 与 Google Geocoding 地理编码服务,实现冲浪点的智能解析与多维度海洋条件数据获取。

主要能力

  • 智能地点解析:支持冲浪点名称模糊查询(自动调用 Google Geocoding 或 OpenStreetMap Nominatim 回退),或直接输入经纬度坐标
  • 多时间窗口预报:提供 now(即时)、24h、48h、72h 三种预报跨度,默认72小时覆盖短期冲浪计划需求
  • 完整海洋指标:涵盖浪高(waveHeightM)、涌高(swellHeightM)、涌周期(swellPeriodS)、涌向(swellDirectionDeg)、风速/风向/阵风(windSpeedMps/windDirectionDeg/windGustMps)、水温(waterTemperatureC)及潮汐数据
  • 机器优先输出:结构化 JSON 格式专为下游 Agent/CRON 管道设计,支持 --mock 离线模式用于测试与 CI/CD

显著优点

  • API 冗余设计:地理编码具备 Google → OSM 自动回退机制,降低单点故障风险
  • 生产级稳健性:明确的退出码体系(0/2/3/4/5)、字段级空值语义规范(null = "未提供"而非零值)、配套测试脚本 test_surf_report.py
  • 数据源可配置:支持 --source 参数指定多个 Stormglass 数据提供商,灵活应对数据质量差异
  • 自动化友好:JSON 输出契约稳定,包含 meta/location/now/forecast/tides 标准化顶层键

潜在局限与风险

  • 外部 API 依赖:核心功能依赖 Stormglass API(需 STORMGLASS_API_KEY),地理编码依赖 Google/OSM,任何服务端故障均会导致 exit code 4
  • 非商业免费额度限制:Stormglass 免费层存在调用频次与历史数据限制,高频自动化场景需评估付费计划
  • 地理编码精度风险:冲浪点名称解析依赖地理编码服务质量,偏远或新兴冲浪点可能存在坐标偏差
  • 数据时效性:预报数据为模型输出,实际海况可能因局地微气候偏离预测
  • 仅限海洋数据:不提供紫外线、降雨、能见度等辅助气象信息

适合人群

  • 自动化系统开发者:需要为冲浪社区、订户推送系统、移动应用后端构建 CRON 驱动的数据管道
  • 硬核冲浪爱好者/追浪者:希望集成个人通知系统(如 Slack/Discord Bot、邮件推送)的技术用户
  • 冲浪学校/俱乐部:需批量监控多个浪点条件的运营方
  • 数据分析师:研究特定区域浪况模式的研究者(可利用历史数据接口)

常规风险提示

  • API 密钥管理:STORMGLASS_API_KEY 为核心凭证,建议通过环境变量或密钥管理服务注入,避免硬编码泄露
  • 速率限制与成本:生产部署前务必在 test_surf_report.py 中验证调用模式,监控 Stormglass 用量避免超额费用
  • 坐标验证:关键冲浪点建议先用 --lat/--lon 固定精确坐标,减少对地理编码的依赖
  • 离线测试习惯:善用 --mock 模式验证下游解析逻辑,避免开发阶段消耗真实 API 额度

技术备注

  • 运行环境:Python 3
  • 主要依赖:STORMGLASS_API_KEY(必需),GOOGLE_GEOCODING_API_KEY(可选增强)
  • 项目地址:https://github.com/dgorissen/stormglass-skill

技能正文


name: stormglass-surf-skill description: Fetch surf-relevant ocean conditions from Stormglass by spot name or coordinates, including current snapshot and 1-3 day forecast windows with tides, gusts, and water temperature. Use when users ask for surf reports, wave or swell conditions, tide timing, wind, gusts, or water temperature for a beach or surf spot. version: 1.0.2 metadata: openclaw: requires: env: - STORMGLASS_API_KEY bins: - python3 primaryEnv: STORMGLASS_API_KEY homepage: https://github.com/dgorissen/stormglass-skill

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 <float> --lon <float>

Optional controls:

  • --horizon now|24h|48h|72h (default 72h)
  • --output json|pretty (default json, recommended for automation)
  • --source <comma-separated provider list>
  • --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

Mode STORMGLASS_API_KEY GOOGLE_GEOCODING_API_KEY
--mock not required not required
live --lat/--lon required not required
live --location with Google required optional (preferred when set)
live --location with OSM fallback required not 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.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

surfingocean-dataweather-apimarine-forecasttidesautomationjson-apistormglassgeocoding

同类 Skill