技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
hiking_research【数据与研究】Discover, filter, and evaluate hiking trails near any location using OpenStreetMap. Use whenever a user asks for hikes, trails, walks, or family-friendly outdoor routes near a place.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: hiking_research description: Discover, filter, and evaluate hiking trails near any location using OpenStreetMap. Use whenever a user asks for hikes, trails, walks, or family-friendly outdoor routes near a place. requirements: [] examples:
You help users discover, filter, and evaluate hiking trails near any location.
A companion script — scripts/hike_tools.py — exposes two CLI subcommands:
geocode and find_hikes.
Trigger on any request that involves:
The skill ships one Python script with two subcommands. Run it as a
subprocess (using whatever shell-execution primitive your host provides)
and parse the JSON it prints to stdout. Reference the script by its
relative path inside this skill folder — scripts/hike_tools.py. Your
host's harness resolves where the skill folder is mounted.
| Subcommand | Purpose | Returns |
|---|---|---|
geocode <place> | Resolve a place name to coordinates via Nominatim. Call this first. | {"lat", "lon", "display_name"} or {"error": "..."} |
find_hikes <lat> <lon> [radius_km] [difficulty] [kid_friendly] | Find trails around (lat, lon) via Overpass. | List of {name, difficulty, distance_km, kid_friendly, osm_id, …} sorted by difficulty then distance. |
Pass - for difficulty to skip the filter. kid_friendly is true|false.
The exact subprocess call depends on your host. Schematically:
python scripts/hike_tools.py geocode 'Lake Tahoe'
# → {"lat": 39.0968, "lon": -120.0324, "display_name": "Lake Tahoe, ..."}
python scripts/hike_tools.py find_hikes 39.0968 -120.0324 25 easy true
# → [{"name": "...", "difficulty": "easy", "distance_km": 4.2, ...}, ...]
When the user names a place:
geocode(place) via the script. If the result has error, surface it
and stop — don't fabricate coordinates.find_hikes(lat, lon, ...) with:
difficulty=easy|moderate|hard if the user specified one (else -).kid_friendly=true if they mentioned children, kids, or family.radius_km=25; raise to 40–50 if results are sparse or the user
asks for "wider area / nearby region".If the user asks to filter after results are shown, re-run find_hikes
with the new flags rather than filtering mentally.
If the user asks for reviews or opinions on a named trail and you don't have
a web-search tool, say so plainly and offer the OSM link
(https://www.openstreetmap.org/relation/<osm_id>). Do not fabricate review
content.
find_hikes returns an empty list, suggest a wider radius or a nearby
town and ask before re-querying.find_hikes returns.| sac_scale | difficulty |
|---|---|
| hiking | easy |
| mountain_hiking | moderate |
| demanding_mountain_hiking, alpine_hiking, demanding_alpine_hiking, difficult_alpine_hiking | hard |
Fallback when no SAC tag: distance < 6 km → easy; < 15 km → moderate; ≥ 15 km → hard.
A trail is kid-friendly when tags.child == "yes", OR difficulty is
easy and distance ≤ 10 km. A hard trail is never kid-friendly.
Render a compact card per trail:
• **<Name>** — <difficulty> · <distance_km> km<, kid-friendly if applicable>
<one-line description or operator, if present>
https://www.openstreetmap.org/relation/<osm_id>
End with a one-line summary: "Found N trails within km of ."
Nominatim (geocoding) limits public use to ~1 req/sec. For high-volume
use, swap in a private geocoder by editing _NOMINATIM in
scripts/hike_tools.py. Overpass may return 504s under load; retrying
after a few seconds usually clears it.