← Back to Skills Marketplace
hsooooo

Korea metropolitan bus alerts

by Hsooooo · GitHub ↗ · v1.0.2
cross-platform ✓ Security Clean
1731
Downloads
3
Stars
2
Active Installs
3
Versions
Install in OpenClaw
/install korea-metropolitan-bus-alerts
Description
Create and manage scheduled bus arrival alerts using Korea TAGO (국토교통부) OpenAPI and Clawdbot cron. Use when a user wants to register weekday/weekend schedules like "평일 오전 7시, <정류소명>, <노선들>" and receive automatic arrival summaries via their configured Gateway messaging (DM only).
README (SKILL.md)

수도권 버스 도착 알림 (Clawdbot cron)

Scheduled bus arrival alerts powered by 국토교통부 TAGO OpenAPI.

This skill is designed for users running Clawdbot Gateway + Clawdbot cron. Users register rules like:

  • "평일 오전 7시, 인천 한빛초등학교, 535"
  • "평일 오후 5시30분, 고양 향동초등학교, 730, 503"

Then the system sends arrival summaries to the registering user (DM) on schedule.

Note (MVP): stop resolution is done via stop name search (cityCode + keyword). GPS-based nearby lookup exists but may return 0 results depending on key/region.

Prerequisites

  • A running Clawdbot Gateway (Telegram/Slack/etc. already configured)
  • Clawdbot cron enabled/usable
  • A data.go.kr API key for TAGO
  • (setup 자동화 사용 시) systemctl --user 가 동작하는 환경 (systemd user service)
  • (rule_wizard에서 cron 등록까지 하려면) clawdbot CLI

One-time setup: TAGO API key

You must set a TAGO service key in your environment (never commit or paste it into markdown).

Recommended env var:

  • TAGO_SERVICE_KEY

Option A (fastest): one-off test in your current shell

Good for quick manual tests; cron jobs will NOT inherit this unless the Gateway service has it.

export TAGO_SERVICE_KEY='...'

Option B (recommended): one-command setup (auto-detect systemd unit)

This is the most “set it once and forget it” flow.

Run:

python3 korea-metropolitan-bus-alerts/scripts/setup.py

If your network blocks the endpoint or TAGO returns 403 during the smoke test, you can still complete setup:

python3 korea-metropolitan-bus-alerts/scripts/setup.py --skip-smoke

It will:

  • Auto-detect your Gateway systemd user service (supports custom unit names)
  • Prompt for TAGO_SERVICE_KEY (hidden input)
  • Save it to ~/.clawdbot/secrets/tago.env (chmod 600)
  • Write a systemd override to load that env file
  • Restart the Gateway
  • Run a small TAGO smoke test

(Advanced/manual) If you prefer shell scripts, korea-metropolitan-bus-alerts/scripts/set_tago_key.sh is still available, but setup.py is the recommended UX.

Safety notes

  • Never commit .env / tago.env.
  • Avoid sharing outputs of docker compose config or similar commands that may print env values.

Quick start

A) Test TAGO connectivity (manual)

export TAGO_SERVICE_KEY='...'
python3 korea-metropolitan-bus-alerts/scripts/tago_bus_alert.py nearby-stops --lat 37.5665 --long 126.9780

B) Register an alert rule (interactive)

Tell the agent something like:

  • "평일 07:00, 인천 한빛초등학교, 535 알림 등록해줘"

If the stop name is ambiguous (e.g., opposite side of road), the agent MUST ask a follow-up question to pick the correct direction/stop candidate before creating the rule.

C) List rules

  • "버스 알림 목록 보여줘"

D) Delete a rule

  • "버스 알림 3번 삭제해줘" (confirm before delete)

E) Test a rule (run now)

  • "방금 등록한 규칙 테스트해줘" (one-time message)

Supported schedule expressions (MVP)

  • 매일 HH:MM
  • 평일 HH:MM
  • 주말 HH:MM

(Phase 2: arbitrary cron expressions)

Cron implementation notes

  • Use isolated cron jobs (sessionTarget: isolated) + deliver: true.
  • Delivery is DM-only to the registering user.
  • See references/cron_recipe.md and scripts/cron_builder.py.

Interactive registration helper (server-side)

For integration testing (and for power users), use:

  • scripts/rule_wizard.py register

It will:

  1. Ask for schedule/time/routes
  2. Resolve stop candidates via GPS nearby lookup (direction disambiguation)
  3. Generate the job JSON
  4. Optionally call clawdbot cron add to register it

Data source

Single provider only (MVP):

  • 정류장 조회: BusSttnInfoInqireService (15098534)
  • 도착 조회: ArvlInfoInqireService (15098530)

Safety / Security

  • Never write API keys/tokens/passwords into markdown files.
  • For browser automation on logged-in pages: require explicit user confirmation.
  • For destructive operations (cron delete): confirm before acting.
  • DM-only delivery (MVP): do not broadcast to groups/channels.

Implementation notes

  • Prefer scripts under scripts/ for deterministic behavior.
  • Put detailed API field mappings in references/api_reference.md.

Deterministic helper script

Use scripts/tago_bus_alert.py for deterministic TAGO lookups:

  • nearby-stops (GPS → stop candidates)
  • arrivals (cityCode+nodeId → arrivals; optional route filtering)
Usage Guidance
This package appears to do what it says: it queries the official data.go.kr (TAGO) endpoints and helps you register Clawdbot cron jobs to send DM-only arrival summaries. Before installing or running setup.py: 1) Be prepared that setup.py will write an env file to ~/.clawdbot/secrets/tago.env and will patch and restart your user-level Gateway systemd service (it uses systemctl --user). If you run this on a system without systemd or where you don't want the Gateway restarted, do not run the automatic setup and instead set the TAGO_SERVICE_KEY manually. 2) Only provide a TAGO service key with the minimum necessary scope; the code does not transmit that key to any third-party servers (it only uses data.go.kr endpoints), but the key will be stored on-disk (chmod 600). 3) The cron jobs schedule agentTurn payloads which will cause the agent to run local helper scripts at scheduled times — ensure you trust the Clawdbot agent and its execution policies. 4) If you are cautious, inspect the included scripts locally (they are small and readable), run tools in a test environment, and backup any existing systemd override files before running setup.py. Overall: coherent and proportionate to the stated purpose, but be aware of the described persistent systemd/env changes before proceeding.
Capability Analysis
Type: OpenClaw Skill Name: korea-metropolitan-bus-alerts Version: 1.0.2 The skill bundle is designed for scheduled bus alerts using the Korea TAGO OpenAPI. It securely handles the `TAGO_SERVICE_KEY` by prompting for it, storing it in a `chmod 600` file (`~/.clawdbot/secrets/tago.env`), and configuring the Clawdbot Gateway systemd user service to load it via `EnvironmentFile`. All external command executions (e.g., `clawdbot cron add`, `systemctl`) are performed using `subprocess.run` with lists of arguments, preventing shell injection. The `SKILL.md` and `cron_builder.py` construct prompts for the AI agent that instruct it to run specific local scripts (`tago_bus_alert.py`) with controlled, validated parameters, and include explicit negative constraints ('Do not reveal any secrets', 'Output ONLY the final message text'). There is no evidence of data exfiltration, unauthorized remote control, persistence mechanisms beyond the stated cron jobs, or obfuscation. The systemd modifications are transparent and necessary for the skill's operation.
Capability Assessment
Purpose & Capability
Name/description match what the repository does: it queries Korea TAGO OpenAPI and builds Clawdbot cron jobs. Declared requirements (python3, systemctl) and the single env var (TAGO_SERVICE_KEY) are appropriate for the described setup and runtime. One minor note: the manifest lists no required config paths, but the scripts intentionally write ~/.clawdbot/secrets/tago.env and a systemd user override to make the key available to the Gateway; this is documented in SKILL.md and is consistent with the feature even though 'required config paths' was left empty in registry metadata.
Instruction Scope
SKILL.md and the scripts focus on resolving stops, building cron job JSON, and querying TAGO. The interactive setup writes an env file and patches/restarts the user's systemd user service (Gateway) so cron runs have the TAGO key. The cron payloads contain an agentTurn message instructing the agent to run the local deterministic helper (python3 .../tago_bus_alert.py) to fetch arrivals. These actions are within the stated purpose, but they do grant this skill the ability to modify the user's Gateway service environment and to schedule agent-invoked tasks — the user should be aware of those effects before consenting.
Install Mechanism
No install spec; the skill is distributed as code/scripts and is instruction-driven. There are no downloads from external, untrusted URLs and no archive extraction. This is the lower-risk model for a script-based skill.
Credentials
Only TAGO_SERVICE_KEY (primary credential) is required and is directly needed for TAGO/data.go.kr API calls; tago_api also accepts DATA_GO_KR_SERVICE_KEY as an alternate env var which is documented. No unrelated secrets or multiple credentials are requested.
Persistence & Privilege
The skill does modify user state: it writes ~/.clawdbot/secrets/tago.env and a systemd user override (under ~/.config/systemd/user/...), and then runs systemctl --user restart on the detected Gateway unit. 'always' is false. These actions require the user account's systemd permissions (no elevated root is requested), but they are persistent changes to service configuration and will restart the Gateway — the user should expect that.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install korea-metropolitan-bus-alerts
  3. After installation, invoke the skill by name or use /korea-metropolitan-bus-alerts
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
Declare required env/bins (TAGO_SERVICE_KEY, systemctl; clawdbot optional) + clarify prerequisites
v1.0.1
- Renamed skill from "tago-bus-alerts" to "korea-metropolitan-bus-alerts" - Updated all code and documentation paths from "tago-bus-alerts/" to "korea-metropolitan-bus-alerts/" - Changed user-facing title from "TAGO Bus Alerts (Clawdbot cron)" to "수도권 버스 도착 알림 (Clawdbot cron)" - No functional or behavioral changes; content and features remain the same
v1.0.0
tago-bus-alerts v1.0.0 - Initial release: Schedule and manage bus arrival alerts using Korea TAGO OpenAPI and Clawdbot cron. - Register personalized weekday/weekend bus alerts by stop name and routes; receive automatic DM notifications. - Requires Clawdbot Gateway, Clawdbot cron, and a configured TAGO API key. - Includes step-by-step setup, alert management commands (add, list, delete, test), and interactive registration helper. - DM-only delivery ensures privacy; safety checks for ambiguous stops and destructive actions are built-in.
Metadata
Slug korea-metropolitan-bus-alerts
Version 1.0.2
License
All-time Installs 2
Active Installs 2
Total Versions 3
Frequently Asked Questions

What is Korea metropolitan bus alerts?

Create and manage scheduled bus arrival alerts using Korea TAGO (국토교통부) OpenAPI and Clawdbot cron. Use when a user wants to register weekday/weekend schedules like "평일 오전 7시, <정류소명>, <노선들>" and receive automatic arrival summaries via their configured Gateway messaging (DM only). It is an AI Agent Skill for Claude Code / OpenClaw, with 1731 downloads so far.

How do I install Korea metropolitan bus alerts?

Run "/install korea-metropolitan-bus-alerts" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Korea metropolitan bus alerts free?

Yes, Korea metropolitan bus alerts is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Korea metropolitan bus alerts support?

Korea metropolitan bus alerts is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Korea metropolitan bus alerts?

It is built and maintained by Hsooooo (@hsooooo); the current version is v1.0.2.

💬 Comments