bahn for Openclaw

A comprehensive command-line suite for real-time Deutsche Bahn train tracking, journey planning, and delay forecasting.

ableitung
v1.0.0
Mar 7, 2026
0
993
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-bahn

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-bahn using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is bahn?

The bahn skill is a specialized tool designed for the Deutsche Bahn rail network, offering a deep feature set for tracking trains, identifying live departures, and planning complex journeys. As a key utility within the Openclaw Skills library, it aggregates data from multiple sources including IRIS, Vendo, and bahn.expert to provide a unified interface for rail travel information without requiring individual API keys.

Beyond simple lookups, this skill focuses on technical accuracy and data enrichment. It handles everything from parsing raw Navigator share text to calculating the probability of missed transfers. By integrating this into your workflow, you gain access to a professional-grade railway data parser that supports long-distance (ICE/IC), regional (RE/RB), S-Bahn, and even international connections to neighboring countries.

bahn Use Cases

  • Searching for specific train stations and their unique identifiers.
  • Retrieving live departure boards for any Deutsche Bahn station.
  • Planning multi-leg journeys with real-time connection checking.
  • Assessing the probability of catching a transfer or having ticket restrictions (Zugbindung) lifted.
  • Analyzing historical delay patterns for specific trains to better plan future travel.

How bahn Works

  1. The user provides a command via the CLI dispatcher, such as searching for a station or parsing a connection.
  2. The skill routes the request to the appropriate data source, utilizing IRIS for station data, Vendo for journey options, or bahn.expert for historical stats.
  3. The system parses the raw input—whether it is a search string, a train number, or shared text from the DB Navigator app.
  4. If the predict flag is active, the tool applies an exponential delay model tailored to the train category (e.g., ICE vs. Regional) to estimate arrival likelihoods.
  5. The results are packaged into a structured JSON envelope containing connection details, journey options, and live status assessments.

bahn Setup

To use this component of Openclaw Skills, ensure you have Node.js installed on your system. You will need to install the required library dependencies:

npm install db-vendo-client devalue fast-xml-parser

Once installed, you can search for stations or plan journeys directly from your terminal:

node scripts/bahn.mjs --search "Berlin Hbf"
node scripts/bahn.mjs --journey "Hamburg" "Munich"

bahn Data Schema & Taxonomy

The bahn skill returns data in a consistent JSON format. Key fields include:

Field Description
mode The specific command executed (e.g., search, departures, parse).
timestamp ISO8601 formatted string of the request time.
connection Object containing date, origin, destination, and leg details.
liveStatus Real-time information including next transfer and recommendation.
assessment Predictive modeling data (only populated with the --predict flag).
errors/warnings Arrays containing any technical issues encountered during data retrieval.

bahn Advanced Features

  • Statistical analysis of historical train performance via bahn.expert integration.
  • Probabilistic delay modeling using exponential distributions for different train categories.
  • Automatic detection of Zugbindung status (lifting of ticket restrictions due to delays).
  • Support for international train tracking for journeys crossing German borders.
  • Connection text parsing that transforms unstructured DB Navigator shares into actionable JSON data.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*