首页龙虾技能列表 › NS Trains

🚆 NS Trains

v1.1.0

Check Dutch train schedules, departures, disruptions, and plan journeys using the NS API. Perfect for daily commute checks.

1· 1,832·0 当前·0 累计·💬 1
by @eggressive·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's code, instructions, and requested environment variables are consistent with its stated purpose of querying the official NS API; nothing in the package appears disproportionate or unrelated.
评估建议
This skill appears to be what it says: it queries the official NS API and only needs your NS subscription key. Before installing, consider: (1) Keep NS_SUBSCRIPTION_KEY secret — inject it via your runtime secret manager rather than committing it. (2) The included ns-api.mjs enforces HTTPS and an allowlist (gateway.apiportal.ns.nl) and sets the Ocp-Apim-Subscription-Key header — you can review that file yourself (it's included) to confirm no other hosts are contacted. (3) Ensure your environment ...
详细分析 ▾
用途与能力
Name/description match the actual behavior: all scripts query NS endpoints (journeys, departures, arrivals, disruptions, stations). The only required binary is node and the only required secret is NS_SUBSCRIPTION_KEY — both are appropriate for calling the NS API.
指令范围
SKILL.md instructs setting NS_SUBSCRIPTION_KEY and running the included node scripts. The scripts only read env vars (subscription key, optional commute stations), call NS API endpoints, and print results. They do not read unrelated files, leak data to external hosts, or execute arbitrary shell commands.
安装机制
There is no install spec (instruction-only), but the skill includes runnable JS files. No external downloads or package installs are performed by the skill. Note: scripts rely on Node's built-in fetch (works on modern Node versions); the SKILL.md only requires 'node' but does not specify a minimum Node version.
凭证需求
Only NS_SUBSCRIPTION_KEY (and backward-compatible NS_API_KEY) are required, plus optional NS_HOME_STATION / NS_WORK_STATION for convenience. These variables are appropriate and minimal for the stated API interactions.
持久化与权限
Skill does not request persistent/system-wide privileges, does not set always:true, and does not modify other skills or system configuration. Autonomous invocation (model can call it) is the platform default and is not excessive here.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.1.02026/2/1

Security hardening (HTTPS + allowlist via nsFetch), add SECURITY.md, add ns-api.mjs, improve departures to resolve station names -> codes, env var back-compat NS_API_KEY->NS_SUBSCRIPTION_KEY

● 无害

安装命令 点击复制

官方npx clawhub@latest install ns-trains
镜像加速npx clawhub@latest install ns-trains --registry https://cn.clawhub-mirror.com

技能文档

Check Dutch train schedules, departures, disruptions, and plan journeys using the official NS (Nederlandse Spoorwegen) API.

Setup

1. Get an NS subscription key

  • Go to NS API Portal
  • Create an account and subscribe to the Ns-App product (free tier available)
  • Copy your Primary Key

2. Set Environment Variables

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.

Quick Usage

🚆 Commute shortcuts

node {baseDir}/scripts/commute.mjs --to-work   # Morning: Home → Work
node {baseDir}/scripts/commute.mjs --to-home   # Evening: Work → Home

Plan any journey

node {baseDir}/scripts/journey.mjs --from "Utrecht Centraal" --to "Amsterdam Zuid"

Check departures from a station

node {baseDir}/scripts/departures.mjs --station "Amsterdam Centraal"

Check arrivals at a station

node {baseDir}/scripts/arrivals.mjs --station "Rotterdam Centraal"

Search for stations

node {baseDir}/scripts/stations.mjs amsterdam
node {baseDir}/scripts/stations.mjs --search "den haag"

Check current disruptions

node {baseDir}/scripts/disruptions.mjs
node {baseDir}/scripts/disruptions.mjs --from "Utrecht" --to "Amsterdam"

Natural Language

Just ask:

  • "When is the next train to Amsterdam?"
  • "Check trains from Utrecht to Rotterdam"
  • "Any train disruptions today?"
  • "Plan my commute to work"
  • "What time does the train arrive?"

Output

Returns journey options with:

  • Departure/arrival times
  • Real-time delays
  • Duration
  • Transfers
  • Platform numbers
  • Disruption warnings
  • Crowdedness forecast (🟢 low / 🟡 medium / 🔴 high)

Commands Reference

CommandDescription
commute.mjs [work\home]Quick commute check (requires NS_HOME_STATION & NS_WORK_STATION)
journey.mjs --from X --to YPlan a journey between any stations
departures.mjs --station XList departures from a station
arrivals.mjs --station XList arrivals at a station
stations.mjs [query]Search for station names
disruptions.mjsCheck current disruptions

API Endpoints Used

  • /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

Reference

  • NS API Portal: https://apiportal.ns.nl/
  • Documentation: https://apiportal.ns.nl/startersguide
  • Free tier: 5000 requests/day
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务