Weather Automation について
Weather Automationは、現在の天気、予報、警報に基づくワークフローと通知を作成するスキルです。定時の天気概要や、カレンダーの屋外イベントに合わせた予報確認に対応する例を示します。
主な機能
- 01現在の天気の取得
- 02複数日予報の取得
- 03しきい値による気象警報
- 04定時予報通知
- 05イベントに応じた天気確認
活用シーン
- 01朝の天気概要の送信
- 02雨の可能性の通知
- 03屋外イベントの天候確認
- 04予報に基づく通知の自動化
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ claude-office-skills/ skills --skill weather-automationインストール後、Claude Code で/weather-automationを入力して読み込まれたか確認します。
詳細
天気の自動化
天気に基づくワークフローや通知を自動化します。
主な機能
現在の天気
current_weather:
location: "San Francisco, CA"
# or coordinates
lat: 37.7749
lon: -122.4194
response:
temperature: 65°F
feels_like: 63°F
humidity: 72%
wind_speed: 12 mph
conditions: "Partly Cloudy"
uv_index: 5
予報
forecast:
location: "New York, NY"
days: 7
daily:
- date: "2024-01-20"
high: 45°F
low: 32°F
conditions: "Snow"
precipitation_chance: 80%
hourly:
interval: 3 # hours
periods: 24
気象警報
alert_rules:
- name: "Rain Alert"
condition:
precipitation_chance: "> 70%"
within_hours: 6
action:
notify: slack
message: "☔ Rain expected in next 6 hours"
- name: "Freeze Warning"
condition:
temperature: "< 32°F"
action:
- notify: sms
- trigger: home_assistant
action: protect_pipes
ワークフローの例
朝のブリーフィング
morning_weather:
trigger: daily at 6:30 AM
actions:
- get_forecast:
location: home
days: 1
- send_notification:
channel: slack_dm
message: |
🌤️ Good morning! Today's weather:
High: {{high}}°F | Low: {{low}}°F
{{conditions}}
{{#if rain}}☔ Bring an umbrella!{{/if}}
イベントの計画
event_weather:
trigger: calendar_event_tomorrow
condition:
event_type: outdoor
actions:
- get_forecast:
location: "{{event.location}}"
date: "{{event.date}}"
- if:
precipitation_chance: "> 50%"
then:
- notify: organizer
message: "Consider backup venue - rain likely"
ベストプラクティス
- キャッシュ:頻繁なリクエストをキャッシュします
- 単位:メートル法とヤード・ポンド法の両方に対応します
- 精度:信頼できるデータソースを使用します
- 警報:適切な閾値を設定します
- 位置情報:複数の形式に対応します
コメント
Markdown 対応