From nanotars-trains
Configures UK train departure/arrival data for NanoTars agent containers via National Rail Darwin API. Guides free token registration, installs Python plugin, tests token, and restarts services.
npx claudepluginhub terrifiedbug/nanotars-skills --plugin nanotars-trainsThis skill uses the workspace's default tool permissions.
Configures live UK train departure and arrival data for agent containers using the National Rail Darwin API.
Adds live Waze traffic-based travel time and commute lookups to NanoTars AI agents. No API key needed; triggers on 'add commute', 'travel time', or 'waze' queries.
Adds n8n workflow automation integration to NanoTars agents, enabling webhook-triggered monitoring workflows to avoid token-intensive polling. Guides n8n MCP server setup, API key config, and env variables.
Adds parcel delivery tracking to NanoTars agents via parcelapp.net API, enabling on-demand status queries and morning digest inclusion. Requires Parcel app Premium subscription.
Share bugs, ideas, or general feedback.
Configures live UK train departure and arrival data for agent containers using the National Rail Darwin API.
Before installing, verify NanoTars is set up:
[ -d node_modules ] && echo "DEPS: ok" || echo "DEPS: missing"
docker image inspect nanoclaw-agent:latest &>/dev/null && echo "IMAGE: ok" || echo "IMAGE: not built"
if grep -q "ANTHROPIC_API_KEY\|CLAUDE_CODE_OAUTH_TOKEN" .env 2>/dev/null || [ -f "$HOME/.claude/.credentials.json" ]; then echo "AUTH: ok"; else echo "AUTH: missing"; fi
If any check fails, tell the user to run /nanotars-setup first and stop.
grep "^NATIONAL_RAIL_TOKEN=" .env 2>/dev/null && echo "ALREADY_CONFIGURED" || echo "NEEDS_SETUP"
If ALREADY_CONFIGURED, ask the user if they want to reconfigure or test the existing token.
Tell the user:
You need a free Darwin API token from National Rail. Here's how:
- Go to https://realtime.nationalrail.co.uk/OpenLDBWSRegistration/
- Fill in the registration form (name, email, reason: "personal use")
- You'll receive an email with your API token
- Paste the token here when ready
Wait for the user to provide the token.
# Remove existing line if present
sed -i '/^NATIONAL_RAIL_TOKEN=/d' .env
# Add the new token
echo 'NATIONAL_RAIL_TOKEN=THE_TOKEN_HERE' >> .env
cp -r ${CLAUDE_PLUGIN_ROOT}/files/ plugins/trains/
chmod +x plugins/trains/container-skills/scripts/trains.py
By default this plugin is available to all groups and channel types. To restrict access, edit plugins/trains/plugin.json and set:
"groups" to specific group folder names (e.g., ["main"]) instead of ["*"]"channels" to specific channel types (e.g., ["whatsapp"]) instead of ["*"]Ask the user if they want to restrict access. Most users will keep the defaults.
source .env
[ -n "$NATIONAL_RAIL_TOKEN" ] && echo "OK - token is set (${#NATIONAL_RAIL_TOKEN} chars)" || echo "FAILED - NATIONAL_RAIL_TOKEN is empty"
For a deeper test (optional -- the Darwin API can be slow):
source .env
python3 plugins/trains/container-skills/scripts/trains.py departures PAD --rows 3
If it fails:
npm run build
nanotars restart # or launchctl on macOS
Send a WhatsApp message like "when's the next train from Didcot to Paddington?"
Per-group overrides: If a specific group needs a different National Rail token, add NATIONAL_RAIL_TOKEN=... to groups/{folder}/.env. See /create-skill-plugin for details.
rm -rf plugins/trains/sed -i '/^NATIONAL_RAIL_TOKEN=/d' .env