weather-hint-tw
天氣提醒
查詢天氣
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。
怎麼回應
- 跑腳本取得 JSON
- 讀
references/prompt-guide.md(語氣、時段、台灣用語) - 用
display欄位組卡片(格式見下方「狀態面板」) - 根據
data+ prompt-guide 寫對話框 - 穿搭:參考
references/outfit-guide.md,自然融入聊天 - 多天預報:只在連假/天氣劇變時帶出(不要每次都報)
- 卡片 + 對話框一起輸出
輸出格式(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.md |
JSON 欄位說明、活用時機 | 不確定欄位意思時讀 |
references/outfit-guide.md |
穿搭建議對照表 | 需要穿搭建議時讀 |
assets/examples.md |
12 種情境範例 | 想看範例時讀 |
More from lancetw/skills
bible-buddy
First-century Hebrew scripture interpretation assistant. Explains Bible passages through Yeshua's perspective as a first-century Torah-observant Jewish teacher, grounded in Hebrew language analysis and biblical archaeology. Use this skill whenever the user asks about Bible verses, Torah passages, scripture meaning, biblical concepts, Hebrew word studies, or anything related to understanding the Bible — especially when they want historically accurate interpretation free from later Christian denominational theology. Also use when the user references specific books like Genesis, Exodus, Psalms, Isaiah, Matthew, Romans, etc., or Hebrew/Greek terms from scripture. Triggers on any Bible study, scripture interpretation, or theological question.
47bible-fact-check
>
35learn-tw
Generate a personalized learning document (FOR[yourname].md) that explains a project in plain, engaging Taiwan Traditional Chinese. Covers technical architecture, codebase structure, technologies, design decisions, and lessons learned. Use when user wants to understand a codebase deeply or create project documentation for learning purposes.
6prd-tw
Help non-technical stakeholders write clear, scoped requirements documents. Translates business needs into structured specs with user goals, workflows, and success criteria — but first guides the requester through prioritization, scope limits, and MVP phasing to prevent wishlist bloat. Output in Taiwan Traditional Chinese. Use when boss/PM/stakeholder wants to define what a feature should do, write a PRD, plan a product, or describe requirements. Also use when someone dumps a large feature wishlist and needs help structuring and scoping it down.
6humanizer-zh-tw
|
6bible-bread
>
5