Install
openclaw skills install ns-trainsCheck Dutch train schedules, departures, disruptions, and plan journeys using the NS API. Perfect for daily commute checks.
openclaw skills install ns-trainsCheck Dutch train schedules, departures, disruptions, and plan journeys using the official NS (Nederlandse Spoorwegen) API.
export NS_SUBSCRIPTION_KEY="your-subscription-key-here" # preferred
# Back-compat:
export NS_API_KEY="$NS_SUBSCRIPTION_KEY" # legacy name still supported
# Optional: Configure commute stations for quick shortcuts
export NS_HOME_STATION="Utrecht Centraal"
export NS_WORK_STATION="Amsterdam Zuid"
For security, prefer injecting these env vars via your runtime secret mechanism rather than committing them anywhere. Avoid printing or sharing your subscription key.
node {baseDir}/scripts/commute.mjs --to-work # Morning: Home → Work
node {baseDir}/scripts/commute.mjs --to-home # Evening: Work → Home
node {baseDir}/scripts/journey.mjs --from "Utrecht Centraal" --to "Amsterdam Zuid"
node {baseDir}/scripts/departures.mjs --station "Amsterdam Centraal"
node {baseDir}/scripts/arrivals.mjs --station "Rotterdam Centraal"
node {baseDir}/scripts/stations.mjs amsterdam
node {baseDir}/scripts/stations.mjs --search "den haag"
node {baseDir}/scripts/disruptions.mjs
node {baseDir}/scripts/disruptions.mjs --from "Utrecht" --to "Amsterdam"
Just ask:
Returns journey options with:
| Command | Description |
|---|---|
commute.mjs [work|home] | Quick commute check (requires NS_HOME_STATION & NS_WORK_STATION) |
journey.mjs --from X --to Y | Plan a journey between any stations |
departures.mjs --station X | List departures from a station |
arrivals.mjs --station X | List arrivals at a station |
stations.mjs [query] | Search for station names |
disruptions.mjs | Check current disruptions |
/reisinformatie-api/api/v3/trips - Journey planning/reisinformatie-api/api/v2/arrivals - Arrivals/reisinformatie-api/api/v2/departures - Departures/reisinformatie-api/api/v3/disruptions - Disruptions/reisinformatie-api/api/v2/stations - Station search