Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Coding
sl-trafiklab-api
Try itFetch real-time SL (Stockholm public transport) departures and deviation information using a Python CLI tool. Use when checking departures, querying transit delays, or saving favorite sites and routes for quick status checks.
What it does
This skill retrieves real-time departure and deviation information from SL (Stockholm public transport) via a Python CLI client. It **does NOT require registration** of sites to make queries—you can query departures and deviations for any site or line on demand. The favorites configuration allows y…
The skill document
SL Trafiklab API Skill
This skill retrieves real-time departure and deviation information from SL (Stockholm public transport) via a Python CLI client. It does NOT require registration of sites to make queries—you can query departures and deviations for any site or line on demand. The favorites configuration allows you to save frequently used stops and routes to run quick status checks (e.g., departures, disruptions, and safety buffers) without re-entering names or IDs.
The most critical task when checking saved routes is to filter out noise. The user should not be notified about disruptions at sites or lines they are not actually using on that specific route.
Favorites Storage
Your favorite stops and routes are stored in your workspace at .sl/preferences.json.
You must interact with this configuration exclusively via the site save/remove and route save/remove subcommands, which handle validation.
CLI Execution Context
The skill is written for the ClawHub-installed layout: it lives in the agent workspace under skills/sl-trafiklab-api/ and all commands are invoked as python3 skills/sl-trafiklab-api/scripts/cli.py from the agent workspace root (e.g. ~/.openclaw/workspace-assistant).
Always run the CLI from the agent workspace root, not from inside the skill directory. The preferences.json path is resolved relative to the current working directory, not the skill directory. Running from any other directory will cause route check, site check, and other preference-dependent commands to silently report "not found."
Use python3 (not python) as the invocation command on systems where Python 3 is installed without a python symlink.
--direction Flag
The --direction flag on site departures accepts numeric codes only (1 or 2), not destination names. Passing destination name strings (e.g. "Märsta") will be rejected with a helpful error message.
route find Time Output
route find returns departure and arrival times in UTC. Always convert to the user's local timezone (Europe/Stockholm) before presenting results.
The --time and --date inputs are interpreted as Stockholm local time (i.e. --time 15:00 means a 15:00 local departure), while the returned leg times are UTC. Do not confuse the two: with summer time (CEST, UTC+2), a --time 12:00 request may show first legs around 10:00 UTC on screen — that is correct, not a bug.
Core Actions
All actions are performed by invoking python3 skills/sl-trafiklab-api/scripts/cli.py. For detailed command arguments and response layouts, refer to references/api.md.
- site list: Search for a transit site's numeric ID by name.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py site list ""
- Command:
- site departures: Fetch upcoming real-time departures.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py site departures [--line ] [--transport ] [--direction ] [--forecast ] --directionfilters by numeric code (1/2). Line/direction filters are applied locally so the response is not truncated to the API's server-side cap (filtered requests return only a small subset, ~3 rows). The board still covers roughly the next hour; for a fuller schedule or planning useroute find.
- Command:
- site check: Check departures/disruptions for a single site or all favorite stops.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py site check [] [-v]
- Command:
- site save / remove: Save or remove favorite stops in preferences for background monitoring.
- Commands:
python3 skills/sl-trafiklab-api/scripts/cli.py site save "" [--lines ] [--modes ]/python3 skills/sl-trafiklab-api/scripts/cli.py site remove
- Commands:
- route check: Print upcoming departures, show active/planned transit deviations, and check connection safety buffers for one or all favorite routes.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py route check [] [-v]
- Command:
- route find: Search travel proposals dynamically using SL's transit router, supporting alias inputs, custom departure times/dates, leg preference matching, via stop details, and exclusions.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py route find [] [--time ] [--date ] [--number <1-3>] [--all] [--via ] [--dwell-time ] [--not-via ]
- Command:
- route save / remove: Save or remove favorite routes in preferences. Supports three modes:
- Default / Unconstrained (Origin & Destination): Saves a direct start-to-destination connection. Queries the Journey Planner under the hood to automatically configure travel duration, direct lines, and direction filters. Used to monitor all options between two points.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py route save [--time ] [--date ]
- Command:
- Specific Route Proposal (with Option Index): Saves the exact legs and transfers of a specific travel proposal matching the option index (typically 1, 2, or 3) returned from a prior
route findquery (run with the exact same origin, destination, time, and date parameters to ensure option alignment). Used to monitor transfer connection safety buffers at specific steps.- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py route save [--time ] [--date ]
- Command:
- Manual Legs Array (with JSON): Saves a custom leg sequence manually using a JSON array of leg objects. Refer to api.md for the required JSON schema format.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py route save ''
- Command:
- Route Removal:
python3 skills/sl-trafiklab-api/scripts/cli.py route remove
- Default / Unconstrained (Origin & Destination): Saves a direct start-to-destination connection. Queries the Journey Planner under the hood to automatically configure travel duration, direct lines, and direction filters. Used to monitor all options between two points.
[!TIP] Workflow: Saving a Route with Specific Constraints (e.g., specific line or transfer points) To save a route with specific constraints (for example, to restrict a connection to a specific bus/train line or path):
- Run
python3 skills/sl-trafiklab-api/scripts/cli.py route find "" "" [--time ] [--date ]to list travel proposals.- Identify the option index (e.g., Option 1, Option 2) from the search output that meets the constraints.
- Save using the option index, passing the exact same time/date parameters to ensure option alignment:
python3 skills/sl-trafiklab-api/scripts/cli.py route save "" "" "" [--time ] [--date ].
- deviations: Fetch active or planned transit disruptions.
- Command:
python3 skills/sl-trafiklab-api/scripts/cli.py deviations [--site ] [--line ] [--future]
- Command:
Related skills
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
More from patello
Browse all skillsParse Avanza CSV exports, compute TWRR and Modified Dietz returns, and track portfolio holdings in a local SQLite database.
Process bank transaction CSV exports (Nordea, ICA), auto-categorize transactions using configurable rules, manage transaction links, and generate analytical database views.
Guides users through configuring OpenClaw, Nginx, and GitHub Actions to establish a secure, autonomous GitHub integration pipeline.
Log and track daily calorie intake, macronutrients, body weight, and waist measurements locally in a SQLite database. Provides granular statistics, weekly averages, and future calorie budgets.
Interact with the USDA FoodData Central (FDC) API to search for foods and retrieve detailed nutritional information. Use when the user asks to look up food n...
Interact with the Open Food Facts API to search for packaged food products by barcode and retrieve nutritional information. Use when the user asks to look up...