Agent Skills: DB Bahn Skill πŸš‚

Query Deutsche Bahn train connections and prices.

UncategorizedID: timkrase/clawdis-skills/db-bahn

Install this agent skill to your local

pnpm dlx add-skill https://github.com/timkrase/clawdis-skills/tree/HEAD/db-bahn

Skill Files

Browse the full folder contents for db-bahn.

Download Skill

Loading file tree…

db-bahn/SKILL.md

Skill Metadata

Name
db-bahn
Description
Query Deutsche Bahn train connections and prices.

DB Bahn Skill πŸš‚

Query train connections and prices via the Deutsche Bahn API.

CLI: dbrest

Binary: dbrest (Homebrew: timkrase/tap/dbrest)

Find stations

dbrest locations "station name"

Output: Tab-separated list with ID, Name, Type.

Search connections

dbrest journeys --from <ID> --to <ID> [--departure ISO8601] [--results N]

Important: --from and --to require station IDs (IBNR), not names!

Workflow:

# 1. Find station IDs
dbrest locations "KΓΆln Hbf"        # β†’ 8000207
dbrest locations "MΓΌnchen Hbf"     # β†’ 8000261

# 2. Search journeys
dbrest journeys --from 8000207 --to 8000261 --results 5

With prices (JSON)

dbrest --json journeys --from 8000207 --to 8000261 --results 5

Prices are at journeys[].price.amount and journeys[].price.currency.

Live departures

dbrest departures --stop <ID> --results 10

Live arrivals

dbrest arrivals --stop <ID> --results 10

Notes

  • Prices only for long-distance trains β€” S-Bahn/regional trains often have no price
  • International stations (CH, AT, etc.) work βœ…
  • Global flags before command: dbrest --json journeys ...