MVG
diegosouzapw2026-10-28查看 1846复制 147
慕尼黑公共交通(MVG)——出发信息、时刻表和提醒。当用户分享其在慕尼黑的位置、询问交通时刻表、附近站点或交通中断信息时使用。
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md3010 chars
---
name: mvg
description: Munich public transport (MVG) - departures, schedules, and alerts. Use when user shares location in Munich, asks about transport schedules, nearby stops, or transit disruptions.
---
# MVG Skill 🚇
Munich public transport departures, schedules, and alerts.
## 1. Departures by Location
When user shares location or asks about nearby transport:
```bash
python3 mvg-departures.py <lat> <lng>
# With options
python3 mvg-departures.py <lat> <lng> --limit 5 --offset 3 --compact
```
### Options
| Flag | Description |
|------|-------------|
| `--limit N` | Max departures (default: 8) |
| `--offset MIN` | Walking time to stop (filters out departures leaving too soon) |
| `--types U,S,BUS,TRAM` | Filter by transport type |
| `--compact` | One-line format |
| `--json` | JSON output |
### Examples
```bash
# Central Munich
python3 mvg-departures.py 48.137 11.575
# Only U-Bahn and S-Bahn, 5 min walk to station
python3 mvg-departures.py 48.137 11.575 --types U,S --offset 5
# Compact output
python3 mvg-departures.py 48.137 11.575 --compact
```
### Output Format
```
📍 **Marienplatz** (München)
🚇 U3 → Fürstenried West (2 min)
🚇 U6 → Klinikum Großhadern (3 min)
🚆 S1 → Freising (5 min +2)
```
Delay shown as `(+N)` minutes.
## 2. On Location Share
When user sends a location via Telegram/Signal, automatically show nearby departures:
```bash
python3 mvg-departures.py <lat> <lng> --limit 6 --compact
```
## 3. Alerts & Disruptions
Check for strikes, disruptions, construction:
```bash
web_search "München MVG Streik Störung" --freshness pd
```
### Keywords
- `Streik` — strike
- `Störung` — disruption
- `Sperrung` — closure
- `Ausfall` — cancellation
- `Verspätung` — delay
- `Bauarbeiten` — construction
### MVG vs S-Bahn
| Service | Operator | During MVG Strike |
|---------|----------|-------------------|
| U-Bahn | MVG | ❌ Affected |
| Tram | MVG | ❌ Affected |
| Bus (1-199) | MVG | ❌ Affected |
| **S-Bahn** | **DB** | ✅ Usually runs |
| Regional trains | DB | ✅ Usually runs |
⚠️ S-Bahn is operated by Deutsche Bahn, not MVG!
## 4. Heartbeat Integration
Add to HEARTBEAT.md for automated checks:
```markdown
### 🚨 MVG Alerts (every heartbeat)
- web_search: "München MVG Streik Störung" freshness=pd
- Report NEW alerts only (check reportedAlerts in state)
### 📍 On Location
- python3 mvg-departures.py <lat> <lng> --limit 6
```
Track reported alerts in state file:
```json
{
"reportedAlerts": ["mvg-streik-2026-02-02"],
"acknowledgedAlerts": []
}
```
## 5. API Reference
Uses unofficial MVG API:
```
Base: https://www.mvg.de/api/bgw-pt/v3
GET /stations/nearby?latitude=X&longitude=Y
GET /departures?globalId=STATION_ID&limit=N&offsetInMinutes=M
```
Python package: `pip install mvg`
## Requirements
```bash
pip install mvg
```
## Munich Tips
- **Rush hours**: 7:00-9:00, 16:30-19:00
- **Oktoberfest**: U4/U5 crowded (late Sept)
- **Allianz Arena**: U6 packed on match days
- **Night service**: Limited after 00:30 (weekdays)