微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

Weather Checker

Weather Checker · v1.0.0
安全 unknown 级 作者 luckisnow 公开目录收录
1.2k 下载 0 安装 2.5k 收藏 2 浏览

简介

Weather Checker

原始描述

Command-line weather checker tool with global city support, temperature, precipitation, and probability display with emoji formatting

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/weather-checker/
其它 Agent解压到它自己的 skills 目录,目录名用 weather-checker

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

技能正文


name: weather-checker description: Get current weather information for any city author: TrustedDeveloper version: 1.0.0 tags: [weather, api, utility]

Weather Checker

A simple, safe skill that fetches weather information using a public API.

Features

  • Get current weather for any city
  • Temperature, humidity, and conditions
  • Uses HTTPS for all connections
  • No file system access required
  • No external downloads

Prerequisites

  • Node.js 18+
  • OpenWeatherMap API key (free tier available)

Installation

clawhub install weather-checker

Configuration

Set your API key as an environment variable:

export OPENWEATHER_API_KEY="your-api-key-here"

Get a free API key at: https://openweathermap.org/api

Usage

User: "What's the weather in Tokyo?"
Agent: [Uses weather-checker skill]
Agent: "Tokyo is currently 18°C with clear skies. Humidity is 65%."

Implementation

async function getWeather(city) {
  const apiKey = process.env.OPENWEATHER_API_KEY;
  
  if (!apiKey) {
    throw new Error('API key not configured');
  }
  
  // Uses HTTPS - secure connection
  const url = `https://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&appid=${apiKey}`;
  
  try {
    const response = await fetch(url);
    
    if (!response.ok) {
      throw new Error(`Weather API error: ${response.status}`);
    }
    
    const data = await response.json();
    
    return {
      city: data.name,
      temperature: data.main.temp,
      condition: data.weather[0].description,
      humidity: data.main.humidity,
      windSpeed: data.wind.speed
    };
  } catch (error) {
    console.error('Failed to fetch weather:', error);
    throw error;
  }
}

module.exports = { getWeather };

Security

  • ✅ No file system access
  • ✅ No shell commands
  • ✅ HTTPS only
  • ✅ No external downloads
  • ✅ API key from environment variables only
  • ✅ Input validation
  • ✅ Error handling

License

MIT

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/anikrahman0/security-skill-scanner

标签

没有标签

同类 Skill