From 72d3ce6b23272dd85be02fe9c9ce675e6adbfe3d Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Wed, 12 Aug 2026 00:12:46 +0900 Subject: [PATCH] fix(skills): make PNG weather example Windows-safe --- nanobot/skills/weather/SKILL.md | 3 ++- tests/agent/test_builtin_weather_skill.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nanobot/skills/weather/SKILL.md b/nanobot/skills/weather/SKILL.md index 23cabce9a..6dfffa9ac 100644 --- a/nanobot/skills/weather/SKILL.md +++ b/nanobot/skills/weather/SKILL.md @@ -51,7 +51,8 @@ Tips: - Airport codes: `wttr.in/JFK` - Units: `?m` (metric) `?u` (USCS) - Today only: `?1` ยท Current only: `?0` -- PNG: `curl -s "wttr.in/Berlin.png" -o /tmp/weather.png` +- PNG (macOS/Linux): `curl -s "https://wttr.in/Berlin.png" -o weather.png` +- PNG (Windows PowerShell): `curl.exe -s "https://wttr.in/Berlin.png" -o weather.png` ## Open-Meteo (fallback, JSON) diff --git a/tests/agent/test_builtin_weather_skill.py b/tests/agent/test_builtin_weather_skill.py index ab17f814d..d94104ca5 100644 --- a/tests/agent/test_builtin_weather_skill.py +++ b/tests/agent/test_builtin_weather_skill.py @@ -8,6 +8,8 @@ def test_weather_skill_uses_windows_safe_single_today_request() -> None: assert "On Windows PowerShell, use `curl.exe`" in normalized assert "bare `curl` may resolve to `Invoke-WebRequest`" in normalized assert "https://wttr.in/London?1&m" in content + assert 'curl.exe -s "https://wttr.in/Berlin.png" -o weather.png' in content + assert "/tmp/weather.png" not in content assert ( "Do not fetch current conditions separately when a today or forecast " "request already includes them."