Cantian bazi

From alter123-zz/RaccoonClaw · View interactive version

Cantian bazi is an AI agent skill from the GitHub repository alter123-zz/RaccoonClaw. 八字排盘与农历/干支日期查询技能。用于用户请求“算八字”“四柱排盘”“阳历/农历时间转八字”“查询某天农历或干支日期”“查黄历/宜忌”等场景;关键词包括:八字、四柱、命理、阳历转八字、农历转八字、黄历、宜忌、干支日期、农历日期。 / Bazi charting and Chinese calendar conversion skill. Use for requests like “calculate my Bazi”, “Four Pillars chart”, “convert solar/lunar datetime to Bazi”, “check Chinese almanac (h

How to use this skill

Skill file

八字排盘与农历日期查询 (Bazi & Chinese Calendar)

何时使用 / When to Use

前置依赖 / Prerequisites

npm i

# 仅在需要兼容运行时安装
# Install only for fallback mode
npm i -D tsx

脚本清单 / Script Index

脚本与参数 / Scripts & Parameters

`scripts/buildBaziFromSolar.ts`

# 推荐方式
node scripts/buildBaziFromSolar.ts <solarTime> [gender] [sect]

# 兼容方式(fallback)
tsx scripts/buildBaziFromSolar.ts <solarTime> [gender] [sect]

参数定义 / Parameters:

`scripts/buildBaziFromLunar.ts`

# 推荐方式
node scripts/buildBaziFromLunar.ts <lunarTime> [gender] [sect]

# 兼容方式(fallback)
tsx scripts/buildBaziFromLunar.ts <lunarTime> [gender] [sect]

参数定义 / Parameters:

`scripts/getChineseCalendar.ts`(黄历/农历查询)

# 推荐方式(不传参默认今天)
node scripts/getChineseCalendar.ts [date]

# 兼容方式(fallback)
tsx scripts/getChineseCalendar.ts [date]

参数定义 / Parameters:

示例 / Examples

# buildBaziFromSolar.ts 最小可用示例
node scripts/buildBaziFromSolar.ts "1990-05-15T14:30:00"

# buildBaziFromLunar.ts 最小可用示例
node scripts/buildBaziFromLunar.ts "1990-04-21T14:30:00"

# getChineseCalendar.ts 最小可用示例(默认今天)
node scripts/getChineseCalendar.ts

# getChineseCalendar.ts 指定日期
node scripts/getChineseCalendar.ts 2024-02-10

注意事项 / Notes

  1. 所有命令均在 skill 根目录执行,不依赖仓库根目录路径。 / Run all commands in the skill root; do not rely on repo-root paths.
  2. 时间字符串不要携带时区后缀(如 Z、+08:00),以免产生与预期不一致的换日结果。 / Do not append timezone suffixes (such as Z or +08:00) to avoid unexpected day shifts.
  3. 涉及 23:00-23:59 出生时,建议显式传 sect,避免晚子时归属歧义。 / For births between 23:00-23:59, explicitly set sect to avoid ambiguity.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.