jpskill.com
🛠️ 開発・MCP コミュニティ

sydney-commute

シドニーの電車、バス、フェリー、ライトレール、メトロなど公共交通機関の経路検索、リアルタイム発着情報確認、停留所検索ができ、通勤や運賃に関する質問にも対応するSkill。

📜 元の英語説明(参考)

Plan trips, check real-time departures, and find stops on Sydney's public transport network (trains, buses, ferries, light rail, metro). Use this skill when the user asks about trains, buses, ferries, light rail, metro, Opal fares, commuting, "how do I get to", next departure, timetable, platform, or any Sydney public transport question. Works without API keys (provides Google Maps/TfNSW links) but best with a free TfNSW API key for real-time data.

🇯🇵 日本人クリエイター向け解説

一言でいうと

シドニーの電車、バス、フェリー、ライトレール、メトロなど公共交通機関の経路検索、リアルタイム発着情報確認、停留所検索ができ、通勤や運賃に関する質問にも対応するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o sydney-commute.zip https://jpskill.com/download/10052.zip && unzip -o sydney-commute.zip && rm sydney-commute.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10052.zip -OutFile "$d\sydney-commute.zip"; Expand-Archive "$d\sydney-commute.zip" -DestinationPath $d -Force; ri "$d\sydney-commute.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して sydney-commute.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → sydney-commute フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Sydney Commute Skill

シドニーの公共交通機関ネットワーク全体で、旅行の計画、リアルタイムの出発状況の確認、停留所の検索ができます。APIキーなしで動作しますが、リアルタイムデータを得るには、無料の TfNSW キーを使用するのが最適です。

インストール

npx skills add agairola/life-skills --skill sydney-commute

使用場面

このスキルは、ユーザーが以下のような場合にトリガーします。

  • シドニーの電車、バス、フェリー、ライトレール、またはメトロについて尋ねる場合
  • 旅行や通勤の計画を立てたい場合(「...へはどうやって行くの?」など)
  • 次の出発時刻、時刻表、またはプラットフォームについて尋ねる場合
  • シドニーの駅または停留所の名前を言及する場合
  • Opal の運賃または所要時間について尋ねる場合
  • 近くの停留所または駅を見つけたい場合

前提条件

  • uvbrew install uv (macOS) または pip install uv (すべてのプラットフォーム)
  • API keys — 基本的なリンクには不要です。オプション: リアルタイムデータを得るには、~/.config/sydney-commute/credentials.json に TfNSW API キーを設定します。
  • Dependencies — インラインで宣言 (PEP 723) され、uv run によって自動的にインストールされます。

セットアップ状況

!command -v uv > /dev/null 2>&1 && echo "uv: installed" || echo "uv: NOT INSTALLED" !test -f ~/.config/sydney-commute/credentials.json && python3 -c "import json; d=json.load(open('$HOME/.config/sydney-commute/credentials.json')); print('TfNSW API: configured' if d.get('tfnsw_api_key') else 'TfNSW API: not configured')" 2>/dev/null || echo "TfNSW API: not configured (zero-config mode — Google Maps/TfNSW links only)"

位置情報の流れ (重要 — この手順に正確に従ってください)

交通機関の情報を取得する前に、ユーザーの出発地と目的地を必ず解決してください。以下の手順を順番に実行してください。

ステップ 1: ユーザーのメッセージから from/to を抽出します。

  • ユーザーが「Central から Bondi Junction まで」と言った場合 → --from "Central Station" --to "Bondi Junction" を使用します。完了。
  • ユーザーが位置ピンを共有した場合 (Telegram, WhatsApp, Signal, Discord)? 緯度/経度を抽出 → --lat / --lng--from とともに使用します。完了。
  • ユーザーが駅、郊外、または住所について言及した場合 → --from および/または --to を使用します。完了。
  • 停留所 ID をユーザーに尋ねないでください — 必ず場所の名前を尋ねてください。スクリプトは、名前を停留所にファジーマッチングします。一致があいまいな場合 (例: 類似した名前の停留所が複数ある場合)、続行する前にユーザーに確認してください。

ステップ 2: 「ここから」または出発地が不明な場合。 駅または郊外を尋ねます。プラットフォームに合わせて尋ね方を変えてください。

  • Telegram: 「ペーパークリップアイコン → 位置情報 → 現在地を送信」をタップ
  • WhatsApp: 「+ ボタン → 位置情報 → 現在地を送信」をタップ
  • Signal: 「+ ボタン → 位置情報」をタップ
  • Discord/ターミナル: 「近くの駅または郊外はどこですか?」

ユーザーの応答を待ちます。応答なしに続行しないでください。

ステップ 3: 出発時刻モードの場合、出発地のみが必要です。 ユーザーが「Central からの次の電車」と尋ねる場合、--from "Central Station" --mode departures のみが必要です。

ステップ 4: ユーザーが位置情報を共有できないまたは共有しない場合。 「ご心配なく — 近くの駅または郊外はどこですか?」と尋ねます。応答を待ちます。

ユーザーに尋ねることができる場合は、IP ジオロケーションを無断で使用しないでください。

コマンドテンプレート

uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" [OPTIONS]

オプション

フラグ デフォルト 目的
--from 駅、停留所、または場所の名前 (なし) 出発地
--to 駅、停留所、または場所の名前 (なし) 目的地
--mode trip departures stops trip クエリモード
--depart HH:MM または now now 出発時刻
--arrive-by HH:MM (なし) 到着希望時刻
--transport train bus ferry lightrail metro (すべて) 交通手段の種類でフィルタリング
--lat / --lng 座標 (自動) 明示的な座標
--no-cache (フラグ) off 最新データを強制的に取得

stdout (JSON) のみを解析します。Stderr には診断情報のみが含まれます。

一般的なコマンド

# 旅行の計画
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Central Station" --to "Bondi Junction"

# 特定の時刻の旅行
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Town Hall" --to "Manly" --depart 14:30

# 特定の時刻までに到着
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Newtown" --to "Circular Quay" --arrive-by 09:00

# 交通手段の種類でフィルタリング
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Central" --to "Parramatta" --transport train

# 停留所からの出発状況の確認
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --mode departures --from "Central Station"

# 電車のみの出発状況
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --mode departures --from "Central Station" --transport train

# 停留所の検索
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --mode stops --from "Central"

# ゼロコンフィグ (API キーなし) — Google Maps / TfNSW リンクを返します
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Central Station" --to "Bondi Junction"

結果の表示

Markdown テーブルは使用しないでください。モバイルチャットプラットフォーム (Telegram, WhatsApp, Signal) でレンダリングされません。代わりに、改行を含むプレーンテキストを使用してください。

旅行モード

シンプルに保ちましょう — ユーザーは、何をどこからいつ乗る必要があるかを知るだけで済みます。

簡略化のルール:

  • 類似したルートを統合する — 複数の結果が異なる時刻の同じルートである場合は、出発時刻のリストとともに一度だけ表示します。同一の区間を繰り返さないでください。
  • 実用的な要約を最初に提示する — 地元の人ならこう説明するだろうという、ルートを説明する平易な英語の文を1つ
  • プラットフォーム番号は、大規模な駅 (Central, Town Hall, Wynyard) の場合にのみ表示します — ユーザーは正しいプラットフォームを見つけるためにこれらが必要です
  • 常に短い路線コード (T4, T1, Bus 333) を含めて、ユーザーが正しいプラットフォーム/停留所を見つけられるようにします
  • 埠頭番号、側面 (Side A/B)、スタンドレター、および終点の説明 ("City to Parramatta or Leppington") は削除します
  • 明確なルートオプションのみを個別にリストします (例: 電車のみ vs 電車 + フェリー)

すべての結果が同じルートである場合 (一般的なケース):

ハイパーリンク付きのプラットフォームの場合 (Telegram, Discord, ターミナル):


Train → Ferry (~35 min)

Take any city train from Central (T1/T4, Platform 17 or 21) to Circular Quay (2 stop
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Sydney Commute Skill

Plan trips, check real-time departures, and find stops across Sydney's public transport network. Works without API keys — best with a free TfNSW key for real-time data.

Install

npx skills add agairola/life-skills --skill sydney-commute

When to Use

Trigger this skill when the user:

  • Asks about trains, buses, ferries, light rail, or metro in Sydney
  • Wants to plan a trip or commute ("how do I get to...?")
  • Asks about next departures, timetables, or platforms
  • Mentions a Sydney station or stop name
  • Asks about Opal fares or travel times
  • Wants to find nearby stops or stations

Prerequisites

  • uvbrew install uv (macOS) or pip install uv (all platforms)
  • API keys — not needed for basic links. Optional: TfNSW API key in ~/.config/sydney-commute/credentials.json for real-time data.
  • Dependencies — declared inline (PEP 723), installed automatically by uv run.

Setup Status

!command -v uv > /dev/null 2>&1 && echo "uv: installed" || echo "uv: NOT INSTALLED" !test -f ~/.config/sydney-commute/credentials.json && python3 -c "import json; d=json.load(open('$HOME/.config/sydney-commute/credentials.json')); print('TfNSW API: configured' if d.get('tfnsw_api_key') else 'TfNSW API: not configured')" 2>/dev/null || echo "TfNSW API: not configured (zero-config mode — Google Maps/TfNSW links only)"

Location Flow (IMPORTANT — follow this exactly)

Before fetching transport info, you MUST resolve the user's origin and destination. Follow these steps in order.

Step 1: Extract from/to from the user message.

  • User said "from Central to Bondi Junction"? → use --from "Central Station" --to "Bondi Junction". Done.
  • User shared a location pin (Telegram, WhatsApp, Signal, Discord)? Extract lat/lng → use --lat / --lng with --from. Done.
  • User mentioned a station, suburb, or address? → use --from and/or --to. Done.
  • Never ask users for stop IDs — always ask for place names. The script fuzzy-matches names to stops automatically. If the match is ambiguous (e.g. multiple stops with similar names), confirm with the user before proceeding.

Step 2: If "from here" or origin is unclear. Ask them for their station or suburb. Tailor the ask to their platform:

  • Telegram: "Tap the paperclip icon → Location → Send My Current Location"
  • WhatsApp: "Tap the + button → Location → Send Your Current Location"
  • Signal: "Tap the + button → Location"
  • Discord/terminal: "What station or suburb are you near?"

Wait for their response. Do not proceed without it.

Step 3: For departures mode, only origin is needed. If the user asks "next train from Central", you only need --from "Central Station" --mode departures.

Step 4: User can't or won't share location. Ask: "No worries — what station or suburb are you near?" Wait for response.

Never silently use IP geolocation when you can ask the user instead.

Command Template

uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" [OPTIONS]

Options

Flag Values Default Purpose
--from station, stop, or place name (none) Origin location
--to station, stop, or place name (none) Destination location
--mode trip departures stops trip Query mode
--depart HH:MM or now now Departure time
--arrive-by HH:MM (none) Arrive by time
--transport train bus ferry lightrail metro (all) Filter transport type
--lat / --lng coordinates (auto) Explicit coordinates
--no-cache (flag) off Force fresh data

Only parse stdout (JSON). Stderr contains diagnostics only.

Common Commands

# Plan a trip
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Central Station" --to "Bondi Junction"

# Trip at a specific time
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Town Hall" --to "Manly" --depart 14:30

# Arrive by a certain time
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Newtown" --to "Circular Quay" --arrive-by 09:00

# Filter by transport type
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Central" --to "Parramatta" --transport train

# Check departures from a stop
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --mode departures --from "Central Station"

# Departures for trains only
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --mode departures --from "Central Station" --transport train

# Search for stops
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --mode stops --from "Central"

# Zero-config (no API key) — returns Google Maps / TfNSW links
uv run "${CLAUDE_SKILL_DIR}/scripts/commute.py" --from "Central Station" --to "Bondi Junction"

Presenting Results

DO NOT use markdown tables. They don't render on mobile chat platforms (Telegram, WhatsApp, Signal). Use plain text with line breaks instead.

Trip Mode

Keep it simple — users just need to know what to catch, where from, and when.

Simplification rules:

  • Consolidate similar routes — if multiple results are the same route at different times, show it once with a list of departure times. Don't repeat identical legs.
  • Lead with a practical summary — one plain-English sentence describing the route, like a local would explain it
  • Show platform numbers only for large train stations (Central, Town Hall, Wynyard) — users need these to find the right platform
  • Always include short line codes (T4, T1, Bus 333) so users can find the right platform/stop
  • Drop wharf numbers, sides (Side A/B), stand letters, and terminus descriptions ("City to Parramatta or Leppington")
  • Only list distinct route options separately (e.g. train-only vs train+ferry)

When all results are the same route (common case):

For platforms with hyperlinks (Telegram, Discord, terminal):

Train → Ferry (~35 min)

Take any city train from Central (T1/T4, Platform 17 or 21) to Circular Quay (2 stops), then the Manly ferry (~20 min). Runs every ~20 min.

Next departures: 2:05 pm, 2:26 pm, 2:47 pm

[View on Google Maps](google_maps_url) · [TfNSW Trip Planner](transport_nsw_url)

For platforms without hyperlinks (WhatsApp, Signal, SMS):

Train → Ferry (~35 min)

Take any city train from Central (T1/T4, Platform 17 or 21) to Circular Quay (2 stops), then the Manly ferry (~20 min). Runs every ~20 min.

Next departures: 2:05 pm, 2:26 pm, 2:47 pm

Google Maps: [url]
TfNSW: [url]

When results have genuinely different routes:

Two ways to get from Central to Parramatta:

1. Direct train (~30 min)
   T1 from Central (Platform 16) to Parramatta · 12 stops
   Next: 2:10 pm, 2:25 pm, 2:40 pm

2. Metro (~25 min)
   Train from Central to Sydenham, then Metro from Sydenham to Parramatta
   Next: 2:15 pm, 2:35 pm

[View on Google Maps](google_maps_url) · [TfNSW Trip Planner](transport_nsw_url)

Departures Mode

Show a compact departure list with delays highlighted.

Departures from Central Station:

14:30  T1 North Shore Line → Hornsby · Platform 16 · on time
14:32  T4 Eastern Suburbs → Bondi Junction · Platform 18 · 2 min late
14:35  T2 Inner West Line → Leppington · Platform 20 · on time
14:38  Bus 301 → Eastgardens · Stand B · no realtime

Highlight delays: if delay_min > 0, show "X min late" in bold or with emphasis. If delay is null and realtime is false, show "no realtime".

Stops Mode

Show a list with transport types.

Stops matching "Central":

1. Central Station — train, bus, lightrail
2. Central Chalmers St — bus
3. Central Pitt St — bus

Zero-Config Mode

When no API key is configured, show the fallback URLs as clickable links.

I don't have a TfNSW API key configured, so I can't get real-time data. Here are links to plan your trip:

Google Maps: [Central Station to Bondi Junction](google_maps_url)
TfNSW Trip Planner: [Plan this trip](transport_nsw_url)

For real-time departures and delays, you can set up a free TfNSW API key in about 2 minutes. Want me to walk you through it?

Formatting Rules

  • Trip mode: consolidate same-route results into one block with departure times, lead with a plain-English summary, include line codes (T1/T4) and platform at large stations, only list distinct routes separately
  • Departures mode: compact time-based list, highlight delays
  • Stops mode: numbered list with transport types
  • Zero-config: show URLs as clickable links with upgrade nudge
  • Google Maps and TfNSW links for each journey
  • Real-time indicators: show "on time", "X min late", or "no realtime"

Handling Edge Cases

  • No API key: Return zero-config fallback with Google Maps / TfNSW URLs. Always works.
  • Invalid API key (401): Show error with registration URL. "Your TfNSW API key appears to be invalid. You can get a new one at opendata.transport.nsw.gov.au"
  • Ambiguous stop (multiple matches in departures mode): The script uses the first match and logs alternatives to stderr. If the JSON shows an unexpected stop name, tell the user and suggest alternatives.
  • No results: "No trips/departures found. Try a different time or check the stop name."
  • Low confidence location (confidence: "low"): Tell the user their location was detected via IP and may not be accurate. Ask for their suburb or station.
  • API errors: Show the error message from the JSON response. Suggest trying again or checking the stop name.

Upgrade Nudge

In zero-config mode (no API key), always append an upgrade suggestion. This is shown automatically since the API key is required for any real data.

When to show: Every time the JSON response has "api_key_configured": false.

What to say (adapt to tone, don't copy verbatim):

For platforms with hyperlinks:

Tip: For real-time departures, delays, and trip planning, you can register for a free TfNSW API key (~2 minutes):

1. Sign up at [opendata.transport.nsw.gov.au](https://opendata.transport.nsw.gov.au) — name + email
2. Create an application (any name, e.g. "Commute Helper")
3. Subscribe to "Trip Planner APIs" (free: 60,000 calls/day)
4. Copy your API key and share it with me — I'll save it securely.

For platforms without hyperlinks:

Tip: For real-time data, register for a free TfNSW API key (~2 minutes):

1. Sign up at opendata.transport.nsw.gov.au
2. Create an application (any name works)
3. Subscribe to "Trip Planner APIs" (free tier)
4. Copy your API key and share it with me.

When the user provides a key, save it securely:

mkdir -p ~/.config/sydney-commute
cat > ~/.config/sydney-commute/credentials.json << 'CREDS'
{
  "tfnsw_api_key": "<key>"
}
CREDS
chmod 600 ~/.config/sydney-commute/credentials.json

Then confirm: "Key saved securely. Future commute queries will use real-time TfNSW data."

Do NOT show the nudge if:

  • TfNSW API is already configured (check setup status above)
  • You've already shown the nudge in this conversation

Reference

Transport Types

Product Class Type
1 Train
4 Light Rail
5 Bus
7 Coach
9 Ferry
11 School Bus
99, 100 Walk

Stop ID Format (internal — script handles automatically)

TfNSW stop IDs are numeric strings used internally by the API. Users always provide place names — the script resolves names to IDs automatically via the stop_finder API. Never ask users for stop IDs.

Script Location Fallback (internal — for reference only)

When the script runs, it resolves location internally in this order:

  1. Explicit args--lat/--lng (Nominatim reverse geocoding)
  2. From arg--from value forward-geocoded if it looks like a place name
  3. Browser consent — localhost page requesting navigator.geolocation (WiFi, ~15-50ft accuracy, cached 24hrs)
  4. IP geolocation — ip-api.com (city-level only, often inaccurate for non-city users)

The agent should almost never reach step 4. The Location Flow above ensures the user provides location info before the script runs.