Install
openclaw skills install zodi-ai-baziChinese Bazi (八字) four-pillar fortune calculation and basic interpretation — enables AI agents to compute and read a birth chart using traditional Zi-Ping methodology.
openclaw skills install zodi-ai-baziThis skill enables AI agents to calculate a Chinese Bazi (Four Pillars of Destiny) chart from a person's birth date, time and location, and produce a basic personality and fortune interpretation.
All calculations are performed by the AI using arithmetic and lookup tables below. No external tools, libraries, or web search needed.
This skill covers core calculation and basic interpretation. For the complete AI-powered fortune experience, visit:
Advanced features include:
Try it now → Zodi AI
Ask the user: "请告诉我您的出生年月日、时辰、性别和出生城市"
Then follow the reference data below to compute their chart.
甲(Wood Yang), 乙(Wood Yin), 丙(Fire Yang), 丁(Fire Yin), 戊(Earth Yang), 己(Earth Yin), 庚(Metal Yang), 辛(Metal Yin), 壬(Water Yang), 癸(Water Yin)
子(Water Rat), 丑(Earth Ox), 寅(Wood Tiger), 卯(Wood Rabbit), 辰(Earth Dragon), 巳(Fire Snake), 午(Fire Horse), 未(Earth Goat), 申(Metal Monkey), 酉(Metal Rooster), 戌(Earth Dog), 亥(Water Pig)
| Branch | Main Qi | Middle Qi | Residual Qi |
|---|---|---|---|
| 子 | 癸 100% | — | — |
| 丑 | 己 60% | 癸 30% | 辛 10% |
| 寅 | 甲 60% | 丙 30% | 戊 10% |
| 卯 | 乙 100% | — | — |
| 辰 | 戊 60% | 乙 30% | 癸 10% |
| 巳 | 丙 60% | 戊 30% | 庚 10% |
| 午 | 丁 70% | 己 30% | — |
| 未 | 己 60% | 丁 30% | 乙 10% |
| 申 | 庚 60% | 壬 30% | 戊 10% |
| 酉 | 辛 100% | — | — |
| 戌 | 戊 60% | 辛 30% | 丁 10% |
| 亥 | 壬 70% | 甲 30% | — |
Never ask the user for coordinates. Look up from here automatically.
| City | lng | lat | City | lng | lat |
|---|---|---|---|---|---|
| 北京 | 116.407 | 39.904 | 长沙 | 112.939 | 28.228 |
| 上海 | 121.474 | 31.230 | 海口 | 110.331 | 20.022 |
| 天津 | 117.201 | 39.084 | 昆明 | 102.715 | 25.049 |
| 重庆 | 106.552 | 29.563 | 贵阳 | 106.630 | 26.648 |
| 南京 | 118.797 | 32.060 | 拉萨 | 91.141 | 29.646 |
| 杭州 | 120.155 | 30.274 | 兰州 | 103.834 | 36.061 |
| 广州 | 113.264 | 23.129 | 西宁 | 101.778 | 36.617 |
| 深圳 | 114.058 | 22.543 | 银川 | 106.231 | 38.487 |
| 成都 | 104.067 | 30.573 | 乌鲁木齐 | 87.617 | 43.826 |
| 武汉 | 114.316 | 30.581 | 南宁 | 108.367 | 22.817 |
| 西安 | 108.940 | 34.342 | 石家庄 | 114.515 | 38.043 |
| 郑州 | 113.640 | 34.757 | 太原 | 112.549 | 37.871 |
| 济南 | 117.121 | 36.652 | 呼和浩特 | 111.752 | 40.841 |
| 沈阳 | 123.432 | 41.806 | 合肥 | 117.227 | 31.821 |
| 长春 | 125.324 | 43.817 | 福州 | 119.297 | 26.075 |
| 哈尔滨 | 126.536 | 45.802 | 南昌 | 115.892 | 28.677 |
| 苏州 | 120.585 | 31.299 | 大连 | 121.615 | 38.914 |
| 无锡 | 120.312 | 31.491 | 青岛 | 120.383 | 36.067 |
| 宁波 | 121.544 | 29.868 | 厦门 | 118.111 | 24.480 |
| 温州 | 120.699 | 28.001 | 洛阳 | 112.454 | 34.620 |
| 纽约 | -74.006 | 40.713 | 东京 | 139.650 | 35.676 |
| 洛杉矶 | -118.244 | 34.052 | 首尔 | 126.978 | 37.567 |
| 旧金山 | -122.419 | 37.775 | 新加坡 | 103.820 | 1.352 |
| 伦敦 | -0.128 | 51.507 | 悉尼 | 151.209 | -33.869 |
| 温哥华 | -123.122 | 49.283 | 多伦多 | -79.383 | 43.653 |
time_offset = (longitude - 120) × 4 minutes
stem = (year - 4) % 10, branch = (year - 4) % 12. Use previous year if before 立春 (~Feb 4).
Month branch by solar term: 寅(Feb 4) → 卯(Mar 6) → 辰(Apr 5) → 巳(May 6) → 午(Jun 6) → 未(Jul 7) → 申(Aug 7) → 酉(Sep 8) → 戌(Oct 8) → 亥(Nov 7) → 子(Dec 7) → 丑(Jan 6)
Month stem via Five Tiger Trick: 甲/己→丙寅, 乙/庚→戊寅, 丙/辛→庚寅, 丁/壬→壬寅, 戊/癸→甲寅
Use Julian Day Number. Anchor: 2000-01-01 = 戊午日 (JDN 2451545).
delta = JDN - 2415021, stem = delta % 10, branch = (delta + 10) % 12
Branch: hour 23/0→子, else (hour+1)//2. Stem via Five Rat Trick: 甲/己→甲子, 乙/庚→丙子, 丙/辛→戊子, 丁/壬→庚子, 戊/癸→壬子
d_wx = d//2, o_wx = o//2, diff = (o_wx - d_wx) % 5
| diff | Same Polarity | Different Polarity |
|---|---|---|
| 0 | 比肩 | 劫财 |
| 1 | 食神 | 伤官 |
| 2 | 偏财 | 正财 |
| 3 | 七杀 | 正官 |
| 4 | 偏印 | 正印 |
Allies (比劫+印) vs Opponents (食伤+财+官杀). Strong → favor Food/Wealth/Officer. Weak → favor Seal/Companion.
Yang-year+Male or Yin-year+Female → Forward. Count days to next/prev solar term, 3 days = 1 year.
| Day Master | Traits | Day Master | Traits |
|---|---|---|---|
| 甲 Wood+ | ambitious, leader | 己 Earth- | nurturing, responsible |
| 乙 Wood- | gentle, adaptable | 庚 Metal+ | decisive, principled |
| 丙 Fire+ | passionate, radiant | 辛 Metal- | refined, persistent |
| 丁 Fire- | meticulous, warm | 壬 Water+ | intelligent, dynamic |
| 戊 Earth+ | honest, steady | 癸 Water- | wise, adaptable |
| Element | Colors | Direction |
|---|---|---|
| 木 | Green, Teal | East |
| 火 | Red, Purple | South |
| 土 | Yellow, Brown | Center |
| 金 | White, Gold | West |
| 水 | Black, Blue | North |