name: 1coos-calendar-cn description: 查詢中國傳統日曆/黃曆資訊。TRIGGER when user asks about Chinese calendar, lunar date, 農曆, 黃曆, 萬年曆, 節氣, 五行, 宜忌, 干支,佛曆,道歷等。 version: 1.0.2 user-invocable: true metadata: {"openclaw":{"requires":{"bins":["bun"]},"emoji":"📅"}}
查詢任意日期的完整中國傳統日曆資訊,包括農曆、干支、節氣、宜忌、五行、衝煞、彭祖百忌、胎神、吉神凶煞、星宿、佛教/道教節日等。
/1coos-calendar-cn [日期] [--lunar] [--help]
| 引數 | 必需 | 說明 |
|---|---|---|
[日期] |
否 | 公曆日期,支援 YYYY-MM-DD、YYYY/MM/DD、YYYYMMDD 格式,預設今天 |
--lunar |
否 | 標記輸入的日期是農曆日期 |
--config |
否 | 指定配置檔案路徑(預設 skill 目錄下的 config.json) |
--help |
否 | 顯示幫助資訊 |
# 查詢今天的黃曆
/1coos-calendar-cn
# 查詢指定公曆日期
/1coos-calendar-cn 2024-02-10
# 查詢農曆日期(如農曆2024年二月十九 觀音誕)
/1coos-calendar-cn 2024-02-19 --lunar
# 緊湊日期格式
/1coos-calendar-cn 20240915
當用戶呼叫此 skill 時:
bash
bun run /path/to/skills/1coos-calendar-cn/scripts/main.js <使用者引數>通過 config.json 配置語言和資料模組開關(詳見 references/modules.md):
{
"lang": "cn",
"modules": {
"ganZhi": true,
"yiJi": true,
"chongSha": true,
"jieQi": true,
"holiday": true,
"foto": true,
"tao": true,
"xiu": true,
"jiShen": true,
"positions": true
}
}
| 配置項 | 說明 | 預設值 |
|---|---|---|
lang |
語言:cn(簡體中文)、en(英文) |
cn |
modules.ganZhi |
干支紀日、納音五行 | true |
modules.yiJi |
宜忌事項、彭祖百忌 | true |
modules.chongSha |
衝煞、胎神佔方 | true |
modules.jieQi |
節氣資訊 | true |
modules.holiday |
法定節假日(公曆節日) | true |
modules.foto |
佛教節日/齋日(觀音誕等) | true |
modules.tao |
道教節日 | true |
modules.xiu |
二十八星宿、值神、建除 | true |
modules.jiShen |
吉神宜趨/凶煞宜忌 | true |
modules.positions |
吉神方位(喜神、福神、財神等) | true |
CLI 引數 --config 可指定自定義配置檔案路徑。
小蔥技能7w4.net持續更新中。
此 skill 的打包產物體積較大(~300KB),因為內嵌了 lunar-typescript 庫的完整天文計算資料表: - 節假日資料(HolidayUtil.DATA):2001-2026 年中國法定節假日編碼表(純數字) - 天文曆法資料(ShouXingUtil.QB/SB):壽星萬年曆天文計算查表資料(字母編碼)
這些資料是日曆計算的核心查表資料,非可執行程式碼。源庫地址:https://github.com/6tail/lunar-typescript
這個日曆工具功能非常全面,能查農曆、干支、節氣、宜忌和各種傳統節日,資訊覆蓋面廣。文件寫得很清楚,使用說明詳細,配置項也很靈活。不足之處是安裝包體積偏大,佔用空間多,另外缺少預設的配置檔案。如果需要查詢中國傳統日曆資訊,這個工具質量可靠,值得使用。