mcpField
W
weather-hint-tw

weather-hint-tw

github.com/lancetwOther546 installsUpdated 8w ago
Repository

About weather-hint-tw

weather-hint-tw is a skill for querying weather in one or more cities and presenting it as an RPG-style card with conversational text. It also includes guides for tone, Taiwan usage, and outfit suggestions.

Key features

  1. 01Query weather for one or more cities
  2. 02Accept environment variable or city arguments
  3. 03Output weather data as JSON
  4. 04Format RPG-style weather cards
  5. 05Include dialogue and outfit guides

Use cases

  1. 01Check weather in cities such as Taipei and Kaohsiung
  2. 02Create conversational weather reminders from the data
  3. 03Offer outfit suggestions based on weather

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/lancetw/skills --skill weather-hint-tw

After installing, type/weather-hint-twin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
examples.md
references/
data-fields.md
outfit-guide.md
prompt-guide.md
scripts/
fetch_weather.py

Details

From the project README

天氣提醒

查詢天氣

uv run "$(dirname -- "${BASH_SOURCE[0]:-$0}")/scripts/fetch_weather.py"

如果上面的相對路徑不行,用 skill 安裝路徑:

uv run <skill-directory>/scripts/fetch_weather.py

腳本先輸出 RPG 風格的讀取進度條(折疊預覽只會看到「⏳ 正在讀取天氣資料...」),最後一行才是 JSON。

支援 WEATHER_CITY 環境變數或傳參數覆蓋位置(如 uv run ... Tokyo)。 支援多城市查詢(如 uv run ... 台北 高雄 或 WEATHER_CITY="台北,高雄")。 純 Python(只用標準庫),零暫存檔,並行 API 呼叫,輸出一行 JSON。

怎麼回應

  1. 跑腳本取得 JSON
  2. 讀 references/prompt-guide.md(語氣、時段、台灣用語)
  3. 用 display 欄位組卡片(格式見下方「狀態面板」)
  4. 根據 data + prompt-guide 寫對話框
  5. 穿搭:參考 references/outfit-guide.md,自然融入聊天
  6. 多天預報:只在連假/天氣劇變時帶出(不要每次都報)
  7. 卡片 + 對話框一起輸出

輸出格式(RPG 風格)

狀態面板

從 display 欄位逐行組合,每行用 ▎ 開頭。放進 code block(triple backticks) 確保換行。

格式(用 code block 包起來):

```
▎ {display.地點}
▎ ──────────────────
▎ {display.溫度}
▎ {display.天氣}
▎ {display.今日}
▎ {display.明日}
▎ {display.提醒}
▎ {display.降雨預報}
```
  • 提醒 和 降雨預報 不一定存在,有才輸出
  • 多城市時,每張卡片放在同一個 code block 裡,中間空一行
對話框

聊天文字用 ▶ 開頭,自然分段:

▶ 週日晚上了,吃飽沒?

  外面涼涼的,散步不錯。
  空氣霧霧的,口罩帶著吧。
  明天週一天氣差不多,安心收假。

規則:

  • 第一句用 ▶ 開頭(像 RPG 對話指標)
  • 如果從 CLAUDE.md、AGENTS.md 或對話上下文知道使用者的名字,在第一句自然地帶入
  • 後續段落縮排兩格,不加 ▶
  • 3-5 句,每 1-2 句換一行

如果腳本失敗(網路斷、API 掛、timeout):不要假裝有資料。直接跟使用者說「抱歉,天氣資料暫時抓不到,等一下再試試。」

參考文件

文件內容何時讀
references/prompt-guide.md語氣、時段關心、台灣用語、數字規則每次都讀
references/data-fields.mdJSON 欄位說明、活用時機不確定欄位意思時讀
references/outfit-guide.md穿搭建議對照表需要穿搭建議時讀
assets/examples.md12 種情境範例想看範例時讀

Comments

Markdown supported