weather-compare

👤 user_54f838a3 📦 v1.0.0 ⭐ 4.3 ⬇️ 227 下載
🏠 生活服務 免費

📖 技能介紹


name: weather-compare description: Compare weather across multiple cities and display results in a markdown table. Use when the user asks to compare weather between multiple cities (e.g., "對比北京、上海、廣州的天氣", "比較這些城市的溫度", "這幾個地方天氣怎麼樣"). Supports 2+ cities, outputs temperature (current/high/low), condition, humidity, and wind speed in table format.

7w4.net有更好的技能外掛。


Weather Compare

Multi-city weather comparison tool that fetches current weather data and formats it as a markdown table.

Usage

When the user asks to compare weather across multiple cities, run the scripts/compare_weather.py script with city names as arguments.

Supported triggers: - "對比[城市1]、[城市2]、[城市3]的天氣" - "比較[城市]的天氣" - "這幾個城市天氣怎麼樣" - "Show weather comparison for [city1], [city2]..."

Important: Use English or Pinyin city names for best results (e.g., "Beijing", "Shanghai", "Guangzhou"). Chinese city names may not work reliably with the wttr.in API.

Workflow

  1. Extract city names from user request
  2. Convert to English/Pinyin if needed (e.g., 北京 → Beijing)
  3. Run the script: bash python scripts/compare_weather.py Beijing Shanghai Guangzhou
  4. Return the markdown table to the user

Example

User: "對比北京、上海、廣州的今天天氣"

Action:

python scripts/compare_weather.py Beijing Shanghai Guangzhou

Output:

| City | Current Temp | Today High/Low | Condition | Humidity | Wind |
|------|--------------|----------------|-----------|----------|------|
| Beijing | 20°C | 28°C / 17°C | Clear | 83% | 12 km/h SE |
| Shanghai | 23°C | 27°C / 20°C | Overcast | 69% | 26 km/h SSE |
| Guangzhou | 28°C | 29°C / 24°C | Partly cloudy | 66% | 14 km/h SE |

Notes

  • The script uses wttr.in API (free, no API key required)
  • Data includes: current temp, today's high/low, condition, humidity, wind speed/direction
  • If a city is not found, an error is printed to stderr but other cities still display
  • The script requires internet access to fetch weather data

🤖 AI 評測

這個工具質量中等偏上,好用但還有改進空間。文件清晰明瞭,中文表格輸出很友好,但程式碼存在小問題導致功能不夠完整,且缺少測試保障穩定性,日常使用基本夠用,但追求完美的使用者可能會遇到一些小遺憾。

📊 多維度評分

適應性4.7
規範性4.3
有效性4.2
可靠性4
可信度4.5

📁 包含檔案 (2 個)

📄 SKILL.md 2.1 KB
📄 scripts/compare_weather.py 3.1 KB