← 返回 Skills 市场
f2quantum

Sea Route Navigation

作者 f2quantum · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
70
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install sea-route
功能描述
Sea route navigation: generate the shortest maritime route between two ports or coordinates, output navigation waypoints and an interactive HTML map. Use whe...
使用说明 (SKILL.md)

Sea Route Navigation Skill

Generate the shortest sea route between two points on the globe. Returns navigation waypoints (coordinates) and an interactive HTML map visualization.

When to Use

  • User asks for a sea/shipping/maritime route between two locations
  • User wants port-to-port distance or travel time estimate
  • User needs navigation waypoints for maritime routing
  • User wants a visual map of a shipping lane

How It Works

This skill uses a Python script (scripts/sea_route.py) powered by the searoute library. It computes the shortest path over ocean, avoids land masses, and outputs:

  1. Waypoint coordinates (longitude, latitude) printed to stdout as JSON
  2. An interactive HTML map saved to a user-specified path (default: ./sea_route_map.html)

The script uses uv for dependency management — no manual pip install needed.

Usage

Step 1 — Resolve user input to coordinates

The user may provide:

  • City / port names (e.g., "天津" and "大阪", "Rotterdam" and "Singapore")
  • Coordinates directly (e.g., [117.75, 38.99])

If the user provides city or port names, you MUST convert them to [longitude, latitude] coordinates yourself before calling the script. Use well-known port coordinates:

Port Longitude Latitude
天津港 (Tianjin) 117.75 38.99
上海港 (Shanghai) 121.47 31.23
大阪港 (Osaka) 135.25 34.65
深圳港 (Shenzhen) 114.27 22.55
香港 (Hong Kong) 114.17 22.28
新加坡 (Singapore) 103.85 1.29
鹿特丹 (Rotterdam) 4.50 51.90
汉堡 (Hamburg) 9.97 53.53
洛杉矶 (Los Angeles) -118.27 33.73
纽约 (New York) -74.04 40.67
迪拜 (Dubai) 55.27 25.27
悉尼 (Sydney) 151.21 -33.87
釜山 (Busan) 129.04 35.10
东京 (Tokyo) 139.77 35.45
高雄 (Kaohsiung) 120.29 22.61

For ports not listed above, look up reasonable coordinates for the port area.

Step 2 — Run the script

Run with uv:

uv run --script /path/to/skills/sea-route/scripts/sea_route.py \
  --origin-lon \x3CLON> --origin-lat \x3CLAT> \
  --dest-lon \x3CLON> --dest-lat \x3CLAT> \
  --origin-name "Port A" --dest-name "Port B" \
  --output ./sea_route_map.html

Parameters:

Flag Required Description
--origin-lon Yes Origin longitude
--origin-lat Yes Origin latitude
--dest-lon Yes Destination longitude
--dest-lat Yes Destination latitude
--origin-name No Display name for origin (default: "Origin")
--dest-name No Display name for destination (default: "Destination")
--output No Output HTML file path (default: ./sea_route_map.html)

Step 3 — Present results to user

The script prints a JSON object to stdout with this structure:

{
  "origin": {"name": "Tianjin", "lon": 117.75, "lat": 38.99},
  "destination": {"name": "Osaka", "lon": 135.25, "lat": 34.65},
  "distance_km": 1891,
  "duration_hours": 42.5,
  "waypoints": [
    {"seq": 1, "lon": 118.1725, "lat": 38.7726},
    ...
  ],
  "html_map": "./sea_route_map.html"
}

Present to the user:

  1. A summary: origin → destination, distance, estimated time
  2. The waypoint coordinate table
  3. Tell them the HTML map file path and offer to open it

Step 4 — Open the map (optional)

If the user wants to see the map:

open ./sea_route_map.html    # macOS
xdg-open ./sea_route_map.html  # Linux

Example Interaction

User: 帮我生成从天津到大阪的海运航线

Agent:

  1. Resolve: 天津港 → [117.75, 38.99], 大阪港 → [135.25, 34.65]
  2. Run:
uv run --script ~/.agents/skills/sea-route/scripts/sea_route.py \
  --origin-lon 117.75 --origin-lat 38.99 \
  --dest-lon 135.25 --dest-lat 34.65 \
  --origin-name "天津港" --dest-name "大阪港" \
  --output ./tianjin_osaka_route.html
  1. Parse JSON output, present waypoints and summary
  2. Open the HTML map

Notes

  • The searoute library generates approximate maritime routes suitable for visualization and distance estimation. It is NOT intended for real navigation.
  • Coordinates use [longitude, latitude] order (GeoJSON convention).
  • The script requires uv to be installed. It uses inline script dependencies — no virtual environment setup needed.
  • Estimated speed is ~25 knots (typical cargo vessel cruising speed).
安全使用建议
This skill is reasonable to install if you need route visualization. Run it only for routes you request, save the HTML map somewhere safe, be aware that opening the map may load external map resources, and avoid using untrusted text as route labels.
功能分析
Type: OpenClaw Skill Name: sea-route Version: 1.0.0 The sea-route skill is a legitimate tool for calculating maritime distances and generating interactive maps. The Python script (scripts/sea_route.py) uses standard libraries (searoute, folium) to process coordinates and save an HTML visualization, while the instructions (SKILL.md) correctly guide the agent through coordinate resolution and script execution without any signs of malicious intent or prompt injection.
能力评估
Purpose & Capability
The SKILL.md purpose matches the included Python code: it computes a sea route using searoute, renders it with folium, prints JSON waypoints, and saves an HTML map. No unrelated credential, account, or broad local-data access is evident.
Instruction Scope
The instructions ask the agent to run a documented local Python script and optionally open the generated HTML map. This is purpose-aligned and user-directed, not hidden autonomous behavior.
Install Mechanism
There is no install spec and metadata declares no required binary, while SKILL.md expects uv and the script declares inline Python dependencies. This is a packaging/reproducibility note rather than evidence of malicious behavior.
Credentials
The script writes an HTML map to a default or user-specified path and the generated map uses external map tiles. Both are proportionate for map visualization, but users should choose safe output paths and consider route privacy.
Persistence & Privilege
The skill does not request elevated privileges, credentials, background persistence, or account access. Its only persistent artifact is the generated HTML map file.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install sea-route
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /sea-route 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Sea Route Navigation skill. - Generates shortest maritime route between two ports or coordinates. - Outputs navigation waypoints (longitude, latitude) and an interactive HTML map. - Supports user input as port names (with built-in coordinates for major ports) or coordinates. - Provides estimated port-to-port distance and travel time. - Uses the searoute library and uv for simple, dependency-free operation. - Recommended for maritime route requests, port distance queries, or shipping lane visualization.
元数据
Slug sea-route
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Sea Route Navigation 是什么?

Sea route navigation: generate the shortest maritime route between two ports or coordinates, output navigation waypoints and an interactive HTML map. Use whe... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 70 次。

如何安装 Sea Route Navigation?

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

Sea Route Navigation 是免费的吗?

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

Sea Route Navigation 支持哪些平台?

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

谁开发了 Sea Route Navigation?

由 f2quantum(@f2quantum)开发并维护,当前版本 v1.0.0。

💬 留言讨论