weather-skill-ywy

👤 努力上進的小魚 📦 v1.0.0 ⭐ 4.3 ⬇️ 210 下載
🏠 生活服務 免費

📖 技能介紹

name: weather-query description: Use when users ask about weather conditions, forecasts, or climate information for locations in China.

Weather Query Skill

This skill enables AI agents to fetch real-time weather information and forecasts for locations in China using the provided shell scripts.

When to Use This Skill

Use this skill when users:

  • Ask about current weather conditions
  • Want weather forecasts
  • Need temperature, humidity, wind information
  • Request air quality data
  • Plan outdoor activities and need weather info

How to Use

Get Real-time Weather

Use the realtime.sh script to get current conditions, air quality, daily life indices, and weather alerts.

./scripts/realtime.sh <query> [--encoding <text|json|markdown>]

Get Weather Forecast

Use the forecast.sh script to get hourly and daily forecast data, along with sunrise/sunset times.

./scripts/forecast.sh <query> [--encoding <text|json|markdown>] [--days <0-8>]
  • query (Required): The name of the city, district, or area in Chinese (e.g., 雨花臺, 北京). Can be provided as a positional argument or with --query.
  • encoding (Optional): Used to specify the returned data format. Can be text, json, or markdown.
  • days (Optional, forecast only): Used to specify the weather forecast date range. An integer between 0 and 8.

Response Format

To balance information depth with token consumption, you MUST use the following rules for the encoding parameter:

  1. Default Strategy (--encoding markdown)
  2. When to use: By default for standard weather inquiries.
  3. Why: Provides well-structured, easy-to-read information with moderate token usage.
  4. Brief Information (--encoding text)
  5. When to use: When the user explicitly requests brief or summarized weather information.
  6. Why: Returns only essential details in plain text, saving maximum tokens.
  7. Complete Information (--encoding json)
  8. When to use: Only when the user explicitly asks for raw data, detailed fields, or comprehensive data (all indices, timestamps).
  9. Why: Returns the complete API payload, which is highly token-heavy.

Best Practices

  1. Location Names: Always use Chinese characters for location names
  2. Error Handling: Check if the location is valid before displaying results
  3. Context: Provide relevant context based on weather conditions
  4. Rain: Suggest bringing umbrella
  5. Hot: Recommend staying hydrated
  6. Cold: Advise wearing warm clothes
  7. Poor AQI: Suggest wearing mask
  8. Fallbacks: If a specific district doesn't work, try the city name

Troubleshooting

Issue: Location not found

訪問小蔥技能站7w4.net,解鎖更多實用的AI技能外掛。

  • Solution: Try using the main city name instead of district
  • Example: Use "北京" instead of "朝陽區"

Issue: No forecast data

  • Solution: Verify the location name is correct
  • Try standard city names: 北京, 上海, 廣州, 深圳, etc.

Issue: Data seems outdated

  • Solution: The API updates regularly, but weather can change quickly
  • Check the updated timestamp in the response

Supported Locations

The weather API supports most cities and districts in China, including:

  • Provincial capitals: 北京, 上海, 廣州, 深圳, 成都, 杭州, 南京, 武漢, etc.
  • Major cities: 蘇州, 青島, 大連, 廈門, etc.
  • Districts: 海淀區, 朝陽區, 浦東新區, etc.

🤖 AI 評測

這是一個功能實用的天氣查詢工具,能快速獲取國內城市的即時天氣和預報資訊。文件說明詳細易懂,指令碼使用簡單方便。優點是支援多種查詢格式、引數驗證完善、使用靈活。主要不足是依賴單一資料來源可能影響穩定性,且僅支援中國地區的天氣查詢。建議等待一段時間觀察資料準確性後再做評價。

📊 多維度評分

適應性4.4
規範性4.2
有效性4.3
可靠性3.9
可信度5

📁 包含檔案 (4 個)

📄 SKILL.md 3.4 KB
📄 _meta.json 0 B
📄 scripts/forecast.sh 2 KB
📄 scripts/realtime.sh 1.6 KB