Communitygithub.com

Maps Skill

地址查詢、興趣點(POI)、路線規劃、時區轉換,皆透過 OpenStreetMap/OSRM 等開放資料來源實現。

Maps Skill 是什麼?

這是一套基於開放街圖(OpenStreetMap)與相關開放資料 (Nominatim、Overpass API、OSRM、TimeAPI.io) 開發的位置智能技能,具備 8 個命令與 44 種興趣點分類,且完全依賴 Python 標準函式庫,無需安裝任何第三方套件或 API 金鑰。本技能整合了舊版「find-nearby」的所有功能,讓使用者能透過地理編碼(geocoding)、逆地理編碼、附近地點查詢、行車距離與時間、逐段導航、時區資訊、區域邊界框計算,以及在指定範圍內搜尋興趣點等操作,輕鬆取得精準的地理資訊。它特別適合用於如 Telegram 位置夾等訊息平台,透過經緯度直接查詢附近設施,並可結合 `--near` 參數自動解析地名。由於所有資料皆來自開放社群維護的來源,建議在使用 `hours` 欄位判斷營業時間時,必要時輔以網路搜尋以確認準確性。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Lord1Egypt/awesome-skill-forge/tree/HEAD/skills/maps

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Maps Skill 是做什麼的?

使用免費的開放資料來源進行位置智能分析。包含 8 個命令、44 種 POI 分類,零依賴(僅使用 Python 標準函式庫),無需 API 金鑰。

資料來源:OpenStreetMap/Nominatim、Overpass API、OSRM、TimeAPI.io。

此技能取代了舊有的 find-nearby 技能 ― 所有 find-nearby 的功能都已包含在底下的 nearby 命令中,具有相同的 --near "<地點>" 捷徑以及多分類支援。

使用時機

  • 使用者傳送 Telegram 位置夾(訊息中含緯度/經度)→ nearby
  • 使用者想要查詢某個地名的座標 → search
  • 使用者有座標並想要取得地址 → reverse
  • 使用者詢問附近的餐廳、醫院、藥局、旅館等 → nearby
  • 使用者想要開車/步行/騎車的距離或旅行時間 → distance
  • 使用者想要兩個地點之間的逐段導航 → directions
  • 使用者想要某個位置的時區資訊 → timezone
  • 使用者想要在一個地理範圍內搜尋 POI → area + bbox

前置需求

Python 3.8+(僅標準函式庫 ― 無需 pip 安裝)。

腳本路徑:~/.hermes/skills/maps/scripts/maps_client.py

命令

MAPS=~/.hermes/skills/maps/scripts/maps_client.py

search — 地理編碼(地名轉座標)

python3 $MAPS search "Eiffel Tower"
python3 $MAPS search "1600 Pennsylvania Ave, Washington DC"

回傳:緯度、經度、顯示名稱、類型、邊界框、重要性評分。

reverse — 座標轉地址

python3 $MAPS reverse 48.8584 2.2945

回傳:完整地址分解(街道、城市、州、國家、郵遞區號)。

nearby — 依分類尋找地點

# 根據座標(例如來自 Telegram 位置夾)
python3 $MAPS nearby 48.8584 2.2945 restaurant --limit 10
python3 $MAPS nearby 40.7128 -74.0060 hospital --radius 2000

# 根據地址 / 城市 / 郵遞區號 / 地標 ― --near 會自動地理編碼
python3 $MAPS nearby --near "Times Square, New York" --category cafe
python3 $MAPS nearby --near "90210" --category pharmacy

# 多個分類合併成一個查詢
python3 $MAPS nearby --near "downtown austin" --category restaurant --category bar --limit 10

46 種分類:restaurant、cafe、bar、hospital、pharmacy、hotel、guest_house、 camp_site、supermarket、atm、gas_station、parking、museum、park、school、 university、bank、police、fire_station、library、airport、train_station、 bus_stop、church、mosque、synagogue、dentist、doctor、cinema、theatre、gym、 swimming_pool、post_office、convenience_store、bakery、bookshop、laundry、 car_wash、car_rental、bicycle_rental、taxi、veterinary、zoo、playground、 stadium、nightclub。

每個結果包含:name、address、lat/lon、distance_m、 maps_url(可點擊的 Google Maps 連結)、directions_url(從搜尋點到該處的 Google Maps 導航),以及有提供時的推廣標籤 ― cuisine(料理類型)、hours(營業時間)、phone(電話)、website(網站)。

distance — 行車距離與時間

python3 $MAPS distance "Paris" --to "Lyon"
python3 $MAPS distance "New York" --to "Boston" --mode driving
python3 $MAPS distance "Big Ben" --to "Tower Bridge" --mode walking

模式:driving(預設)、walking、cycling。回傳道路距離、行車時間,以及用於比較的直線距離。

directions — 逐段導航

python3 $MAPS directions "Eiffel Tower" --to "Louvre Museum" --mode walking
python3 $MAPS directions "JFK Airport" --to "Times Square" --mode driving

回傳編號步驟,包含指示、距離、行車時間、道路名稱,以及駕駛動作類型(轉彎、出發、抵達等)。

timezone — 座標的時區

python3 $MAPS timezone 48.8584 2.2945
python3 $MAPS timezone 35.6762 139.6503

回傳時區名稱、UTC 偏移量、當地目前時間。

area — 某個地點的邊界框與區域

python3 $MAPS area "Manhattan, New York"
python3 $MAPS area "London"

回傳邊界框座標、寬度/高度(公里)、以及近似面積。可作為 bbox 命令的輸入。

bbox — 在邊界框內搜尋

python3 $MAPS bbox 40.75 -74.00 40.77 -73.98 restaurant --limit 20

在一個地理矩形範圍內尋找 POI。如需某個命名地點的邊界框座標,請先使用 area 命令。

處理 Telegram 位置夾

當使用者傳送位置夾時,訊息中會包含 latitude: 和 longitude: 欄位。擷取這些數值並直接傳給 nearby:

# 使用者在 36.17, -115.14 傳送了位置夾,並詢問「附近有咖啡廳嗎?」
python3 $MAPS nearby 36.17 -115.14 cafe --radius 1500

以編號列表呈現結果,包含名稱、距離,以及 maps_url 欄位,讓使用者在聊天中獲得可點擊的連結。對於「還在營業嗎?」的問題,請檢查 hours 欄位;如果該欄位缺失或不夠清楚,請透過 web_search 確認,因為 OSM 的營業時間是由社群維護的,不一定總是最新。

工作流程範例

「在羅馬競技場附近找義大利餐廳」:

  1. nearby --near "Colosseum Rome" --category restaurant --radius 500 — 一個命令,自動地理編碼

「他們傳的這個位置夾附近有什麼?」:

  1. 從 Telegram 訊息中提取緯度/經度
  2. nearby LAT LON cafe --radius 1500

「從飯店步行到會議中心要怎麼走?」:

  1. directions "Hotel Name" --to "Conference Center" --mode walking

「西雅圖市中心有哪些餐廳?」:

  1. area "Downtown Seattle" → 取得邊界框
  2. bbox S W N E restaurant --limit 30

注意事項

  • Nominatim 使用條款:最多每秒 1 個請求(腳本會自動處理)
  • nearby 需要經緯度 或 --near "<地址>" — 兩者需提供其一
  • OSRM 的路線規劃在歐洲與北美洲覆蓋最完善
  • Overpass API 在尖峰時段可能較慢;腳本會自動在不同鏡像站之間切換(overpass-api.de → overpass.kumi.systems)
  • distance 和 directions 使用 --to 參數指定目的地(非位置參數)
  • 如果單獨使用郵遞區號在全球範圍內結果不明確,請加上國家/州

驗證

python3 ~/.hermes/skills/maps/scripts/maps_client.py search "Statue of Liberty"
# 應回傳緯度約 40.689,經度約 -74.044

python3 ~/.hermes/skills/maps/scripts/maps_client.py nearby --near "Times Square" --category restaurant --limit 3
# 應回傳時代廣場周圍約 500 公尺內的餐廳列表

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a insurance agency. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generates a complete landing page with copy, layout, hero image, and responsive design from a text description. Use when launching a product quickly.

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a family law practice. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a fractional CFO firm. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a home remodeling company. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a HVAC service company. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a immigration law firm. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a CPA tax advisory firm. Use when handling offer...

Lord1Egypt/awesome-skill-forge

Generate a conversion-focused landing page that compares offers, pricing cues, and trust signals for a estate planning law firm. Use when handling...

Lord1Egypt/awesome-skill-forge

Fastest way to create or update a pawr.link profile. One curl command, $19 USDC to create, $0.10 to update. Patch-style update-links endpoint lets you add, remove, or move individual links without replacing the whole profile.

Lord1Egypt/awesome-skill-forge

Use this skill when the user wants to review today, look back on yesterday, reflect on this week, or wrap things up with a gentle, low-pressure reflection.

Lord1Egypt/awesome-skill-forge

Read-only queue dashboard for workspace-aware ship. (gstack)

Lord1Egypt/awesome-skill-forge

Landing page quality assessment for paid advertising campaigns. Evaluates message match, page speed, mobile experience, trust signals, form optimization, and conversion rate potential. Use when user says landing page, post-click experience, landing page audit, LP audit, conversion rate, landing page CRO, post-click CRO, or landing page optimization.

Lord1Egypt/awesome-skill-forge

Create HTML-based video compositions, animated title cards, social overlays, captioned talking-head videos, audio-reactive visuals, and shader transitions using HyperFrames. HTML is the source of truth for video. Use when the user wants a rendered MP4/WebM from an HTML composition, wants to animate text/logos/charts over media, needs captions synced to audio, wants TTS narration, or wants to convert a website into a video.

Lord1Egypt/awesome-skill-forge

Search arXiv papers by keyword, author, category, or ID.

Lord1Egypt/awesome-skill-forge

Delegate coding to OpenAI Codex CLI (features, PRs).

Lord1Egypt/awesome-skill-forge

Track Apple devices/AirTags via FindMy.app on macOS.

Lord1Egypt/awesome-skill-forge

Jailbreak LLMs: Parseltongue, GODMODE, ULTRAPLINIAN.

Lord1Egypt/awesome-skill-forge

Notion API + ntn CLI: pages, databases, markdown, Workers.

Lord1Egypt/awesome-skill-forge

p5.js sketches: gen art, shaders, interactive, 3D.

相關技能