docs: add LLM agent integration & link to taiwan-holiday-skills - #3
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lis186/taiwan-holiday-skills提供現成 SKILL.md,可透過 OpenSkills 一鍵部署純文件變更,不影響 CLI 行為,無 version bump。
Test plan
npx --yes taiwan-holiday-cli today -f json從 /tmp 呼叫仍正常🤖 Generated with Claude Code