← 返回
开发者工具 Key 中文

skills-weather

Get the weather for a specific location or coordinates
获取指定地点或坐标的天气信息
mangonob
开发者工具 clawhub v1.0.3 1 版本 100000 Key: 需要
★ 0
Stars
📥 754
下载
💾 16
安装
1
版本
#latest

概述

Weather Skill

Installation

npm

npm install -g skills-weather

pnpm

pnpm add -g skills-weather

Parameters

  • -V, --version: output the version number
  • -l, --location : Location to get the weather for
  • -d, --days : Specify the number of days to get the weather forecast for.
  • -h, --hours : Specify the number of hours to get the weather forecast for.
  • -f, --config : Path to the config file
  • -c, --coordinates : Latitude and longitude to get the weather for (format: lon,lat)
  • --help: display help for command

Parameter constraints:

  • --location and --coordinates cannot be used together. You must provide at least one of them.
  • --days and --hours cannot be used together. If neither is provided, real-time weather will be returned.

Environment variables:

  • SKILLS_WEATHER_CONFIG_FILE_PATH: Optional environment variable to specify the path to the configuration file. If not provided, the skill will look for a default config file in the current directory.

Examples

Get real-time weather:

  • Get real-time weather for New York: skills-weather -l "New York"
  • Get real-time weather for specific coordinates: skills-weather -c "-74.0060,40.7128"
  • Get real-time weather for London (with a specified config file): skills-weather -l "London" -f "/path/to/config.json"

Get daily weather forecasts:

  • Get today's weather forecast for Futian District, Shenzhen: skills-weather -l "futian" -d 1
  • Get Beijing's weather forecast for the next 3 days: skills-weather -l "北京" -d 3
  • Get a one-month weather forecast for specific coordinates: skills-weather -c "116.4074,39.9042" -d 30
  • Get Shanghai's weather forecast for the next 2 days (with a specified config file): skills-weather -l "上海" -d 2 -f "/path/to/config.json"

Get hourly weather forecasts:

  • Get Guangzhou's weather forecast for the next 12 hours: skills-weather -l "广州" -h 12
  • Get a 6-hour weather forecast for specific coordinates: skills-weather -c "121.4737,31.2304" -h 6
  • Get Shenzhen's weather forecast for the next 24 hours (with a specified config file): skills-weather -l "深圳" -h 24 -f "/path/to/config.json"

Supported Weather Data Providers

Configuration File

和风天气

Default config file path: ~/.skills-weather-config.json
Example:
{
	"privateKey": "G7refSYx9TWAPADGuOdyGycWVNr0POaebYddeNtDjxSSN01b0165TITV9fA=",
	"appId": "BB9A36BAB1",
	"credentialId": "3207A9092A",
	"apiHost": "0dfe03a7c3.re.qweatherapi.com"
}
Field Descriptions
  • privateKey: A private key provided by QWeather for authentication.
  • appId: The application ID provided by QWeather to identify the app.
  • credentialId: A credential ID provided by QWeather for authentication.
  • apiHost: The host address of the QWeather API.

版本历史

共 1 个版本

  • v1.0.3 当前
    2026-03-30 06:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,787
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 65 📥 179,837
developer-tools

Agent Browser

matrixy
专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。
★ 425 📥 118,019