← Back to Skills Marketplace
NS Trains
by
eggressive
· GitHub ↗
· v1.1.0
1884
Downloads
1
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install ns-trains
Description
Check Dutch train schedules, departures, disruptions, and plan journeys using the NS API. Perfect for daily commute checks.
Usage Guidance
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 has a compatible Node version (modern Node provides global fetch). (4) Because the code runs locally, only grant the subscription key if you trust this skill source; if you obtain the key elsewhere (or rotate it), revoke it from the NS API portal if you suspect exposure. Overall the package is internally consistent and minimal for its purpose.
Capability Analysis
Type: OpenClaw Skill
Name: ns-trains
Version: 1.1.0
This skill is classified as benign. The code is well-structured and clearly aligned with its stated purpose of checking Dutch train schedules via the NS API. A critical security control is implemented in `scripts/ns-api.mjs`, which enforces an HTTPS-only connection and an explicit allowlist for the NS API host (`gateway.apiportal.ns.nl`), preventing arbitrary network egress. The `SKILL.md` instructions are straightforward and do not contain any prompt injection attempts. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or obfuscation. Environment variables are handled appropriately for API key management and user-defined commute stations.
Capability Assessment
Purpose & Capability
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.
Instruction Scope
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.
Install Mechanism
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.
Credentials
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.
Persistence & Privilege
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install ns-trains - After installation, invoke the skill by name or use
/ns-trains - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
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
v1.0.0
Initial release of ns-trains
- Check Dutch train schedules, departures, arrivals, and disruptions using the official NS API.
- Command-line scripts for common tasks: plan journeys, check commute departures, search stations, and monitor disruptions.
- Supports real-time data: delays, platform info, and crowdedness forecasts.
- Custom commute shortcuts via environment variables.
- Compatible with natural language queries (e.g., "When is the next train to Amsterdam?").
- Comprehensive setup and usage instructions included.
Metadata
Frequently Asked Questions
What is NS Trains?
Check Dutch train schedules, departures, disruptions, and plan journeys using the NS API. Perfect for daily commute checks. It is an AI Agent Skill for Claude Code / OpenClaw, with 1884 downloads so far.
How do I install NS Trains?
Run "/install ns-trains" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is NS Trains free?
Yes, NS Trains is completely free (open-source). You can download, install and use it at no cost.
Which platforms does NS Trains support?
NS Trains is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created NS Trains?
It is built and maintained by eggressive (@eggressive); the current version is v1.1.0.
More Skills