360 Secure SkillHub
360 安全技能中心

Weather Tool

该 Skill 提供命令行天气查询:传入地点后可获取当前天气及 1-7 天预报,支持摄氏/华氏切换和 JSON 输出。脚本通过外部天气服务获取数据,需在能运行 Python 脚本且可联网的环境中使用。

dinghaibin
dinghaibin
热度 26.63
最近更新 2026-05-12 00:31:41
分类:生活依赖:代码执行 / 第三方 API应用场景:旅行

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add weather-tool
Metadata
name
weather-tool
description
Get current weather and forecasts. Use when user needs to check current weather, get forecast for travel planning, or monitor weather conditions.

Weather Tool

Get current weather and forecasts.

Quick Start

# Current weather
python scripts/weather.py Beijing

# Forecast
python scripts/weather.py Beijing --forecast 3

Usage

python scripts/weather.py [LOCATION] [OPTIONS]

Options:
  --forecast DAYS   Forecast days (1-7)
  --json            Output as JSON
  --celsius         Use Celsius (default)
  --fahrenheit      Use Fahrenheit

Examples

# Current weather
python scripts/weather.py Beijing

# 3-day forecast
python scripts/weather.py Shanghai --forecast 3

# JSON output
python scripts/weather.py "New York" --json

Features

  • Current weather conditions
  • Multi-day forecasts
  • Temperature in C/F
  • JSON output
  • Multiple location support