١.٠k
★ نجوم
٢
↓ تنزيلات
٦٠
◉ مشاهدات
// تثبيت المهارة
تثبيت المهارة
المهارات هي كود تابع لأطراف ثالثة من مستودعات GitHub العامة. يفحص SkillHub الأنماط الخبيثة المعروفة، لكنه لا يستطيع ضمان السلامة. راجع الكود المصدري قبل التثبيت.
تثبيت عام (على مستوى المستخدم):
npx skillhub install openclaw/skills/weather-checkerتثبيت في المشروع الحالي:
npx skillhub install openclaw/skills/weather-checker --projectskill.install.customTargetHelp
npx skillhub install openclaw/skills/weather-checker --target-dir /path/to/skillsالمسار المقترح: ~/.claude/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
```bash
clawhub install weather-checker
```
## Configuration
Set your API key as an environment variable:
```bash
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
```javascript
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
MIT License
Copyright (c) 2026 TrustedDeveloper
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.عرض الترخيص في المستودع المصدري — النسخة المنشورة هناك هي المرجع.
// تثبيت المهارة
تثبيت المهارة
المهارات هي كود تابع لأطراف ثالثة من مستودعات GitHub العامة. يفحص SkillHub الأنماط الخبيثة المعروفة، لكنه لا يستطيع ضمان السلامة. راجع الكود المصدري قبل التثبيت.
تثبيت عام (على مستوى المستخدم):
npx skillhub install openclaw/skills/weather-checkerتثبيت في المشروع الحالي:
npx skillhub install openclaw/skills/weather-checker --projectskill.install.customTargetHelp
npx skillhub install openclaw/skills/weather-checker --target-dir /path/to/skillsالمسار المقترح: ~/.claude/skills/weather-checker/