sl-trafiklab-api
SL Trafiklab API Skill
This skill retrieves real-time departure and deviation information from SL (Stockholm public transport). It does NOT require registration of stops or routes to make queries—you can query any stop or route on demand. The favourite_stops and favourite_routes configuration is only for autonomous background monitoring (e.g., heartbeat checks, cron jobs that proactively notify about disruptions).
The most critical task when handling background routes is to filter out noise. The user should not be notified about disruptions at stops/lines they're not actually using on that specific route.
State Storage
Preferences for autonomous monitoring are maintained in your workspace at .sl/preferences.json.
Initialize this file with empty arrays if it does not exist.
See references/api.md for the exact JSON format, which includes favourite_stops and favourite_routes.
To save updates to the user's monitoring preferences, simply write valid JSON to .sl/preferences.json.
Core Actions
For all specific API endpoints (curl commands), strict payload formats, and data extraction instructions, you must refer to references/api.md.