# Yilabsai Houyiagent Weather

> Weather Skill

- Skill: `tomevault-io/yilabsai-houyiagent-weather` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/yilabsai-houyiagent-weather`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/yilabsai-houyiagent-weather/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/yilabsai-houyiagent-weather

---


# Weather Skill

Provides weather-related query capabilities with two input modes and provider fallback.

## Tools

### get_date

Get current date or calculate date with offset.

**Parameters:**
- `offset_days` (int | str, optional): Days to offset, or relative string like "today", "tomorrow", "yesterday"

**Returns:** ISO format date string (YYYY-MM-DD)

**Examples:**
```
get_date()           # Returns today's date
get_date(1)          # Returns tomorrow's date
get_date(-1)         # Returns yesterday's date
get_date("tomorrow") # Returns tomorrow's date
```

### get_weather

Get weather by coordinates or city name.

**Parameters:**
- `lat` (float, optional): Latitude coordinate (-90 to 90)
- `lon` (float, optional): Longitude coordinate (-180 to 180)
- `city` (str, optional): City name (friendly mode)
- `country` (str, optional): Country/region disambiguation for city mode
- `date` (str, optional): ISO date string or relative string like "today", "tomorrow"
- `provider` (str, optional): `auto` (default), `openmeteo`, or `wttr`

At least one mode is required:
- Coordinates mode: provide both `lat` and `lon`
- City mode: provide `city`

**Returns:** Human-readable weather summary

**Example:**
```
get_weather(lat=39.9042, lon=116.4074, date="today")
# Open-Meteo date-aware forecast

get_weather(city="Hangzhou", date="today")
# City mode (internally resolves coordinates first)

get_weather(city="London", provider="wttr")
# Current weather summary from wttr.in
```

## Lifecycle Hooks

This skill registers default hooks that users can extend:

- **PreToolUse**: Validates dual-mode input contract (`lat`+`lon` or `city`) and coordinate ranges.
- **PostToolUse**: Logs a summary of the weather result. Output is injected into the prompt for downstream use.

## Data Source

- [Open-Meteo](https://open-meteo.com/) — structured forecast (date-aware)
- [wttr.in](https://wttr.in/:help) — compact current-weather text summary

## Agent Execution Contract

When an AI Agent needs to execute this skill, use the following workspace-agnostic command. Replace the placeholders with actual values (use `None` for missing values, strings must be quoted).

```bash
uv run python -c "from houyi.skills.weather import get_weather; print(get_weather.executor(lat={LAT}, lon={LON}, city={CITY}, country={COUNTRY}, date={DATE}, provider={PROVIDER}))"
```

**Example:**
```bash
uv run python -c "from houyi.skills.weather import get_weather; print(get_weather.executor(lat=None, lon=None, city='Hangzhou', country=None, date='today', provider='auto'))"
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/yilabsai) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

