bazi-ziwei-skills
A skill that computes Bazi and Zi Wei Dou Shu charts by algorithm, then the model reads the result and builds an HTML poster.
- 129 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The skill installs npm dependencies and runs a local TypeScript calculator. Birth date and time stay on the machine.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/bazi-ziwei-skillsDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill installs npm dependencies and runs a local TypeScript calculator. Birth date and time stay on the machine.
This is third-party code. Review the repository files before installing.
What it does
A skill for computing and reading Chinese destiny charts: Bazi (four pillars) and Zi Wei Dou Shu (twelve palaces). A local calculator built on the mingpan and iztro libraries handles the birth date, time and gender, so code computes the pillars and palaces and the model receives a finished result. The agent then works in one of three modes: a standalone Bazi reading, a standalone Zi Wei reading, or a cross-check of the two charts. Output is long Markdown text or, for the cross-check, a single HTML file with an ink-style poster. Calculation runs locally and needs no network.
Who it is for. Claude Code and Codex users who want a reading of a Chinese natal chart built on an exact calculation.
Good fit when
- Birth date, time and gender are known and a Bazi reading is wanted.
- A Zi Wei Dou Shu reading: twelve palaces, major periods and yearly influences.
- The two systems are cross-checked: whether the main axis matches and how life periods diverge.
- The result is packed into one HTML file with a poster for a screenshot.
Not a fit when
- The question is about Western astrology, tarot, feng shui or names: the skill does not trigger on those.
- The birth time is unknown: the skill asks for it and will not assume a default hour.
- The result would serve as grounds for a medical, legal or financial decision.
Example request
Read my Bazi and Zi Wei chart: 2000-01-01, 12:00, male. Ask first which mode I want.Limitations
The calculator needs Node.js and a dependency install with `npm install` in the `calculator` folder. Birthplace is ignored and no true solar time correction is applied. The authors call the analysis cultural and entertainment-only and rule out medical, investment, marriage and legal decisions. The skill description and prompts are written in Chinese. Before computing, the agent asks two questions: which analysis is wanted and in what form to deliver the result.
How to disable. Delete the skill folder from the agent's skills directory and the cloned repository. Run artifacts stay out of git by default.
FAQ
How do I compute a chart without an agent?
In the `calculator` folder run `npx tsx run-chart.ts --year=2000 --month=1 --day=1 --hour=12 --minute=0 --gender=male`.
Which analysis modes exist?
Three: a standalone Bazi reading, a standalone Zi Wei reading and a cross-check of the two systems. The cross-check comes as long text or an HTML poster.
Does the calculation need internet?
No. Charts are computed locally and the network is only needed to install dependencies.
Which agents does the skill work with?
It follows the open SKILL.md standard. The authors name Claude Code, Claude Desktop, Codex, Cursor and Workbuddy.
What will the agent ask before computing?
Which analysis is wanted: Bazi, Zi Wei or both, and for the cross-check the output form: text, poster or both. Without a birth time the calculation does not start.
Discussion
No questions or reviews yet.
Related
SkillsA skill for BaZi charts and related systems: true solar time, compatibility, date selection and a report citing the classics
A skill that casts a Bazi chart with a built-in engine and reads it stepwise, flagging uncertainty and asking you to test claims.
Skill for Zi Wei Dou Shu charts: a script computes the birth chart, rules classify the pattern and an HTML report with two themes is built
Three Chinese divination skills: a script computes the Qimen Dunjia and Ziwei Doushu charts, then the agent interprets. Bazi is included
A Chinese destiny-chart skill: scripts compute Bazi and Zi Wei Dou Shu charts and the agent reads them with a fixed method.
A skill that reads a Zi Wei Dou Shu chart by topic and date, cites sources and lowers confidence when chart fields are missing.
README in short
Code computes the charts, and the model receives structured text and analyses it with prompts. The poster is built from a fixed HTML template.
README badge
Original SKILL.md
--- name: bazi-ziwei description: 八字 + 紫微斗数 AI 排盘与综合分析。当用户提供生辰(阳历/农历日期、时辰、性别)询问八字、紫微、命理、命盘、流年大运相关问题时使用。基于 mingpan(Apache-2.0)+ iztro(MIT)两个独立开源排盘库 + enrichBazi 补全层精准排盘(杜绝 LLM 自行排盘出错),支持按需独立分析八字 / 独立分析紫微 / 两盘交叉印证。 --- # 八字 + 紫微斗数综合分析 Skill ## 何时触发 用户场景: - 提供出生时间("我是 2000-01-01 中午 12:00 男")并希望分析 - 询问"帮我看八字 / 看紫微 / 算命 / 看命盘 / 看流年大运" - 提供命盘文本(文墨天机、紫微斗数排盘软件导出格式)希望深度解读 - 询问特定大运/流年的吉凶 **不触发**:单纯的星座 / 塔罗 / 周公解梦 / 风水 / 姓名学。 ## 必需输入 ``` 公历或农历日期 (YYYY-MM-DD) 出生时刻 (HH:MM, 24 小时制) 性别 (男/女) ``` 若用户没给时辰,**必须主动询问**,不要默认子时。时辰对四柱日柱和紫微命宫影响极大。 > 不需要出生地。排盘直接使用钟表时间,不做真太阳时经度校正。 --- ## 执行流程 ### Step 0 — 决策门(开场必做,无例外) ⭐ **这一步不能跳,不能凭用户措辞自行判断意图后直接执行**。哪怕用户说的是"生成一个XXX男命的报告"、"给我看看XXX的命盘"这种听起来已经在指定具体产出物的话,也必须先问完下面的问题、等用户明确回复后,才能进入 Step 1。 > ❌ 错误示范:用户说"生成一个1990年男命",Agent 直接默认走综合印证+海报模式并开始排盘。 > ✅ 正确做法:不管用户怎么问,先回问题1(要哪种分析),用户选了3再回问题2(要哪种呈现形态),拿到明确答复后再动手。 **问题 1:要看哪种命理?** > "我可以做三种分析: > 1. **八字独立分析**(事业 / 财运 / 婚恋 / 子女 / 六亲 / 健康,按八字格局推演 — 长文输出) > 2. **紫微独立分析**(十二宫 + 大限 + 生年四化 + 流年 — 长文输出) > 3. **八字 + 紫微综合印证**(两盘交叉对账 — 提供长文 / 可视化海报 / 两种都要)" **如果用户选 3,再追问问题 2:呈现形态** > "综合印证可以这样输出: > A. **📜 长文深度版**(Markdown 散文,沉浸阅读) > B. **🎴 结构化海报版**(单文件 HTML,可截图分享)