bazi-skill
A skill for BaZi charts and related systems: true solar time, compatibility, date selection and a report citing the classics
- 75 ★ on the repository
- Last commit
- Apache-2.0
Minimal access
Why this level
- The skill asks for personal birth data, which remains in the agent session history
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/bazi-skillDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The skill asks for personal birth data, which remains in the agent session history
This is third-party code. Review the repository files before installing.
What it does
bazi-skill is a skill for Codex and Claude Code that runs Chinese metaphysics analysis on a strict scheme. Code computes the chart and the AI writes the interpretation over the ready facts: four pillars, true solar time, major and annual cycles. Zi Wei Dou Shu, Western astrology, NaYin, branch relations, Qi Men Dun Jia and Liu Yao can be added, but their data is used only if code computed it or the user confirmed it. Before analysis the skill checks data completeness: gender, birth date and time, calendar type, place with longitude and time zone. If something is missing it asks up to three questions and guesses nothing. Scenarios include pair compatibility, selection of favorable dates and times, JSON for a K-line style fortune chart and a professional report in Markdown or HTML. Interpretations are backed by classic text cards in `references/classics/` and the `validate_citations.py` script checks the references. PDF export is not supported as of the README.
Who it is for. People who practice BaZi and Chinese metaphysics and want a reproducible chart calculation and a sourced report in place of free guessing by a model.
Good fit when
- You need a BaZi chart from date, time and place of birth with a true solar time correction
- You want to compare two people by charts for a family or work decision
- You need dates and hours for an event within a given range
- You need structured JSON or a Markdown report with references to classic texts from the calculation
Not a fit when
- You need a forecast as scientific fact: the author himself says this applies the most scientific method to the least scientific subject
- There is no birth data: the skill will not guess and stops to ask questions
- You need a PDF report: PDF export is not implemented yet
Example request
Build a BaZi chart: born 12 March 1990 at 07:30 in Novosibirsk, male, using true solar timeLimitations
Interpretations remain a reading of a tradition and not measured fact, and decisions about life, health or money should not rest on them. For Qi Men and Liu Yao the skill does not build the plate or hexagram itself: a computed plate or a confirmed hexagram is required. Detailed birth data is personal, so enter it in a private session. The README and references are written mostly in Chinese. A script checks the classic references, but the full text corpus `references/classics/corpus/` is empty and holds only a placeholder.
How to disable. Delete the `bazi-skill` folder from `${CODEX_HOME:-$HOME/.codex}/skills/` or from the project `.claude/skills/`, and the skill stops triggering in new sessions.
FAQ
What does code compute and what does the AI write?
Code computes the chart, true solar time and cycles, and the AI only writes the interpretation over those facts. Zi Wei, astrology, Qi Men and Liu Yao data is used only if code computed it or the user confirmed it.
How do I install it in Codex?
Clone the repository into `${CODEX_HOME:-$HOME/.codex}/skills/bazi-skill` and open a new session. The skill triggers on an ordinary request for a BaZi reading, compatibility or date selection.
How do I install it in Claude Code?
From the project root clone the repository with `git clone https://github.com/xuemian168/bazi-skill.git .claude/skills/bazi-skill`. It is invoked with `/bazi-skill`.
What data will the skill ask for?
Gender, birth date and time, calendar type, place with longitude and time zone, and the true solar time method. It asks for missing items up to three questions at a time.
Is there a web version?
Yes, the author points to the dockon.de web app. It uses the same calculations but is not part of this repository.
Discussion
No questions or reviews yet.
Related
SkillsA skill that computes Bazi and Zi Wei Dou Shu charts by algorithm, then the model reads the result and builds an HTML poster.
A skill that casts a Bazi chart with a built-in engine and reads it stepwise, flagging uncertainty and asking you to test claims.
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.
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
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| bazi-skill (this card) | no | 75 | ||
| YueYuan Bazi | no | 290 | a skill with a built-in chart engine and confidence marks on conclusions | |
| OpenFate Bazi MCP: Bazi chart calculation | no | not required | 162 | an MCP server that computes the chart and true solar time |
README in short
The README, in Chinese, explains that the skill consists of code-computed facts, an evidence packet, several school roles and result validation. Installation in Codex and Claude Code, updating, install verification and the skill workflow diagram follow.
README badge
Original SKILL.md
---
name: bazi-skill
description: Specialized workflow for BaZi 八字, Four Pillars 四柱, optional Zi Wei Dou Shu 紫微斗数 evidence, optional Western astrology / zodiac / 星座 evidence, optional NaYin 纳音, branch-relation 刑冲合害, Qi Men Dun Jia 奇门遁甲, Liu Yao 六爻 evidence, K-line style fortune JSON, true solar time 真太阳时, compatibility/synastry 合盘合婚, auspicious date/hour selection 择日择时, professional report writing, structured reports, 命理研报, and multi-school master/orchestrator workflows 多流派大师/主理规划师/主理官综合. Use when the user asks to build, debug, validate, or improve a host project that computes chart facts with code and asks AI only to interpret confirmed facts.
---
# bazi-skill
Use this skill for project-aware BaZi, optional Zi Wei Dou Shu evidence, optional Western astrology evidence, optional common-school evidence, and K-line style fortune workflows. Preserve the source-of-truth split: local libraries calculate charts; AI writes structured interpretation against a confirmed chart.
## Workflow
1. Classify the task:
- Code change in a host project: read the repository docs and the touched modules before editing. Start with `CLAUDE.md` if present, then the relevant `components/CLAUDE.md`, `services/CLAUDE.md`, `types/CLAUDE.md`, or `constants/CLAUDE.md` if present.
- Skill or workflow architecture change, including requests to reference `ai-berkshire`, a multi-agent research/team pattern, multi-school masters, 大师会诊, 主理规划师, or 主理官综合: update this skill or related skill docs first; do not change frontend/backend application code unless the user explicitly asks for implementation.
- Analysis JSON generation, repair, or validation: read `references/project-contracts.md`, then run `scripts/validate_analysis_result.py` on any candidate JSON.
- BaZi rules, prompt wording, scoring logic, or domain explanation: read `references/bazi-domain-reference.md`, then `references/analysis-methods.md` when the task needs interpretation or ranking.
- 五行生克、十神、阴阳/大小(如小水、大火)、纳音、藏干、旺相休囚死、刑冲合害,或"今天/某天对我的命盘怎样": once the pillars are known, run `scripts/ganzhi_facts.py` and put its output into the evidence packet. Never derive these from memory or by reasoning over a table in context; quote the script output instead.
- 盲派象法, 象法体系, concrete imagery, 宫位象, 十神象, or requests to make 象法 more complete/source-bounded: read `references/xiangfa-system/source-map.md`, then `references/xiangfa-system/coverage-map.md`, then only the required slice files.
- True solar time, strict apparent solar time, timezone, longitude correction, equation of time, or boundary-hour issues: read `references/true-solar-time.md`; if implementing, also read `references/project-contracts.md`.
- Zi Wei chart logic, palace display, or pattern wording: read `references/ziwei-reference.md`.
- Western astrology, zodiac signs, star signs, 星座, 西洋占星, natal chart, ascendant, moon sign, aspects, transits, or astrology synastry: read `references/western-astrology.md`.
- NaYin 纳音, branch relations 刑冲合害, Qi Men 奇门遁甲, Liu Yao 六爻, Mei Hua 梅花易数, Da Liu Ren 大六壬, modern astrology, traditional astrology, or other school extensions: read `references/common-schools.md`; then load only the matching prompt/reference files.
- Compatibility or synastry analysis, 合盘, 合婚, 伴侣匹配, relationship fit, or partnership matching: read `references/compatibility-analysis.md`, plus `references/analysis-methods.md`; if the task is also app implementation, read `references/project-contracts.md`.
- Auspicious date/hour selection, 吉日吉时, 择日, or 择时: read `references/auspicious-timing.md` and `references/analysis-methods.md`; if the task is also app implementation, read `references/project-contracts.md`.
- Professional report, 命理研报, structured report, Markdown report, or HTML report workflow: read `references/report-generation.md` and `references/project-contracts.md`; if using an `AnalysisResult`, validate the JSON before composing the report.
- 古籍条文、典籍引用、条文出处、引用核对,或需要为判断补依据: read
`references/classics/index.md`, then only the topic card files your school needs;
verify with `scripts/validate_citations.py`; locate raw source text with
`scripts/search_classics.py --corpus`. Never read `references/classics/corpus/`
end to end.
2. Apply an information-completeness gate before analysis, JSON generation, report rendering, or multi-agent work:
- If required user information is missing, ask follow-up questions before proceeding. Do not guess birth facts, chart facts, event constraints, relationship counterpart data, or report scope.
- Ask only the missing essentials, preferably 1-3 concise questions at a time.
- For normal BaZi calculation, required essentials are: gender, birth date, birth time, calendar type (solar/lunar if ambiguous), birthplace plus longitude/timezone basis, and whether true solar time should use the current legacy method or strict apparent solar time when that distinction matters. City-level birthplace is acceptable by default only when it resolves to a longitude; for boundary-hour or professional requests, prefer district/township, map point, hospital, or manual longitude. For Zi Wei, first verify that the current repo actually contains a tracked implementation and contract; otherwise treat Zi Wei as unavailable or planned. For Western astrology, first verify a tracked ephemeris/service or require a user-confirmed astrology chart; otherwise treat it as unavailable or planned.
- For professional-mode chart input, required essentials are: four pillars and gender. Birth year, startAge, direction, and daYun can use documented defaults only when the user accepts approximate/professional-mode behavior.
- For compatibility/synastry, require both people’s chart inputs or confirmed charts plus the relationship goal/context.
- For auspicious timing, require event type, candidate date range, location/timezone, and any hard constraints before ranking dates/hours.
- For Qi Men or Liu Yao, require a computed/user-confirmed plate or hexagram plus the exact event/question; do not cast or derive the plate/hexagram in AI text.
- For professional reports, require the source `BaZiResult`, `AnalysisResult`, or report-spec JSON and the desired output format/scope before rendering.
- Optional missing details may be handled with explicit assumptions only when the final output remains contract-valid and the user request is not asking for precision.
## Multi-School Masters + Orchestrator Pattern
Use this pattern when the user asks for an `ai-berkshire`-style team workflow, multi-agent analysis, 多流派大师, 大师会诊, 主理规划师, 主理官综合, deep review, report generation, or a complex task where different mainstream schools should be compared. For role details, read `references/agent-roles.md`; for executable school prompts, read `references/school-prompts/index.md` and only the selected role prompt files.