Skip to content

docs: add LLM agent integration & link to taiwan-holiday-skills - #3

Merged
lis186 merged 3 commits into
mainfrom
docs/skill-and-readme
Apr 26, 2026
Merged

lis186 merged 3 commits into
mainfrom
docs/skill-and-readme

Conversation

@lis186

@lis186 lis186 commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • 新增「Use with Claude Code / LLM agents」段落,提供 npx JSON 呼叫範例與 cwd 陷阱提醒
  • 指向新建的 sibling repo lis186/taiwan-holiday-skills 提供現成 SKILL.md,可透過 OpenSkills 一鍵部署
  • 擴充 Data Source 段:說明資料正確性歸屬 TaiwanCalendar、解釋 npx 動態載入而非內嵌資料的設計理由(例如 2025 年教師節修法可自動透過 npm 更新生效)
  • 新增 Limitations 段,明確列出支援年份範圍與 out-of-scope 項目

純文件變更,不影響 CLI 行為,無 version bump。

Test plan

  • README 在 GitHub render 正常(中文段落、code block、外連結)
  • npx --yes taiwan-holiday-cli today -f json 從 /tmp 呼叫仍正常
  • taiwan-holiday-skills 可透過 `npx openskills install lis186/taiwan-holiday-skills` 安裝

🤖 Generated with Claude Code

lis186 and others added 3 commits April 26, 2026 14:21
…ions

- 新增「Use with Claude Code / LLM agents」段落:說明對 LLM 友善的 -f json
  輸出、npx 直接呼叫範例,並提醒在本 repo 根目錄執行會失敗的 cwd 陷阱
- 指向新 sibling repo lis186/taiwan-holiday-skills 提供現成 SKILL.md,
  可透過 OpenSkills 一鍵部署
- 擴充 Data Source 段:說明資料正確性歸屬上游、npx 動態載入的設計理由
  (例如 2025 年教師節修法可自動透過 npm 更新生效)
- 新增 Limitations 段落,明確列出支援年份範圍與 out-of-scope 項目
  (農民曆/節氣、日曆同步、提醒、請假規劃、法規推論)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
回應 PR 自評:上一版加了 40 行(OpenSkills 安裝步驟、cwd 陷阱說明、Limitations 段、
Data Source 擴充)對 CLI 使用者而言內容過多,這些細節更適合放在 sibling skill repo。

只保留 3 行指路 stub:說明 -f json 對 LLM 友善 + 指向 taiwan-holiday-skills。
還原 Data Source 段為原始一行格式、移除 Limitations 段。

標題改為繁體中文「搭配 Claude / LLM 使用」以貼近專案目標讀者。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
createNextCommand 內部走 getCurrentDate(),會用真實 new Date() 算今天。
原本的 test mock 假期是 2026-01-10/11/17,當實際執行日期超過 2026-01-17
之後(例如 CI 在 2026-04 跑),這些假期都變成「過去」,next 命令會回
「查無假期」,導致 'should accept count argument' 斷言 '接下來 3 個假期'
失敗。

解法:在 next.test.ts 的 beforeEach 加 vi.useFakeTimers() +
vi.setSystemTime('2026-01-01'),afterEach 還原 real timers。
這樣所有依賴 new Date() 的路徑都拿到一致的「今天」,
mock 假期固定在未來,test 不再隨日期漂移。

322 tests pass locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lis186
lis186 merged commit 3337f6c into main Apr 26, 2026
7 checks passed
@lis186
lis186 deleted the docs/skill-and-readme branch April 26, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant