This skill enables AI agents to fetch real-time weather information and forecasts for locations in China using the provided shell scripts.
Use this skill when users:
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>]
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>]更多技能请访问小葱技能站7w4.net。
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.To balance information depth with token consumption, you MUST use the following rules for the encoding parameter:
Default Strategy (--encoding markdown)
Brief Information (--encoding text)
Complete Information (--encoding json)
Location Names: Always use Chinese characters for location names
Error Handling: Check if the location is valid before displaying results
Context: Provide relevant context based on weather conditions
Fallbacks: If a specific district doesn't work, try the city name
updated timestamp in the responseThe weather API supports most cities and districts in China, including:
这个天气查询技能质量中等偏上,文档说明清晰易懂,提供了实时天气和天气预报两种查询方式,支持多种输出格式。脚本有基本的参数验证,不容易出错。主要不足是缺少实际使用示例,用户无法直观了解查询效果;功能相对基础,复杂场景支持有限。适合对天气查询需求不高的简单场景使用。