技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
space-earth-science【数据与研究】Use when a task needs live space or geophysical data - "recent earthquakes near X / above magnitude Y", "NASA picture of the day", "near-Earth asteroids this week", or "latest full-disk Earth image". USGS FDSN is the default for quakes (no key, GeoJSON); NASA's APIs cover astronomy (DEMO_KEY works, free key is instant). Do NOT use for weather, storms…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Fetch earthquakes and NASA astronomy data with verified endpoints. The mistakes this prevents: trusting community space APIs from training memory - the SpaceX API (api.spacexdata.com) and the popular ISS-position endpoints fail TLS or time out, verified - and burning NASA's shared DEMO_KEY quota mid-task.
DEMO_KEY works but is shared per-IP (~10-30 req/hr); a real key is a 30-second instant email signup at api.nasa.gov and lifts it to 1,000 req/hr. Use DEMO_KEY for one-off calls only.DEMO_KEY. Anything in a loop, cron, or shipped app → tell the user to grab the instant free key and read the X-RateLimit-Remaining header. A 429 here means quota, not outage - the fix is a key, not a retry.time is milliseconds since epoch; NASA dates are YYYY-MM-DD strings. Report human-readable UTC.Ask the user only if missing - quakes: region (default: global), min magnitude (default: 4.5), window (default: past 7 days). NASA: date (default: today).
Earthquakes:
https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson
&starttime={YYYY-MM-DD}&endtime={YYYY-MM-DD}&minmagnitude=5
&latitude=35.6&longitude=139.7&maxradiuskm=500 ← optional region circle
&orderby=magnitude&limit=20
{"features":[{"properties":{"mag":6.2,"place":"58 km W of Tobelo, Indonesia",
"time":1783045888846,"tsunami":0,"alert":"green","felt":7,
"url":"https://earthquake.usgs.gov/earthquakes/eventpage/us6000t9r5"},
"geometry":{"coordinates":[127.63,1.73,10.0]}}],
"metadata":{"count":1}}
Gotchas: geometry.coordinates is [lon, lat, depth-km] - longitude first. orderby=time is newest-first. alert (PAGER: green/yellow/orange/red) and tsunami are the impact fields worth surfacing. Hard cap 20,000 events per query - page with offset (1-based) if you hit it.
NASA APOD (note: this endpoint often takes 2-10s - set a generous timeout):
https://api.nasa.gov/planetary/apod?api_key={KEY}&date={YYYY-MM-DD}
{"date":"...","title":"...","explanation":"...","media_type":"image",
"url":"https://apod.nasa.gov/apod/image/...jpg","hdurl":"..."}
Check media_type - on video days url is a YouTube embed, not an image.
Near-Earth asteroids:
https://api.nasa.gov/neo/rest/v1/feed?start_date={YYYY-MM-DD}&end_date={YYYY-MM-DD}&api_key={KEY}
Max 7-day window per call (400 above that). Shape: element_count, then near_earth_objects keyed by date, each object with name, is_potentially_hazardous_asteroid, estimated_diameter.meters.estimated_diameter_max, and close_approach_data[0].miss_distance.kilometers (a string - parse it).
Full-disk Earth image (keyless mirror):
https://epic.gsfc.nasa.gov/api/natural ← latest image list
https://epic.gsfc.nasa.gov/archive/natural/{yyyy}/{mm}/{dd}/png/{image}.png
List items carry image (basename) and date; split the date into the {yyyy}/{mm}/{dd} path parts and append {image}.png.
The fetched events/objects with human-readable UTC times, magnitudes/diameters with units, impact fields (alert, tsunami, hazardous flags) surfaced, and the exact URL used.
place string USGS already gives you.[lon, lat] order was respected.DEMO_KEY.Sourced and liveness-verified from the public-apis project (MIT).