Loading...
Loading...
Claude Code skill for 四柱八字 (BaZi) Chinese astrology chart reading and destiny analysis using nine classical texts
npx skill4agent add aradotso/trending-skills bazi-skill-chinese-astrologySkill by ara.so — Daily 2026 Skills collection.
# Install to current git project (run from repo root)
mkdir -p .claude/skills
git clone https://github.com/jinchenma94/bazi-skill .claude/skills/bazi
# Install globally (available in all projects)
git clone https://github.com/jinchenma94/bazi-skill ~/.claude/skills/bazi.claude/skills/bazi/SKILL.md~/.claude/skills/bazi/SKILL.mdbazi-skill/
├── SKILL.md # Skill entry point (this file)
├── references/
│ ├── wuxing-tables.md # Five elements, heavenly stems, earthly branches, ten gods
│ ├── shichen-table.md # Time period conversion table, daily time calculation
│ ├── dayun-rules.md # Major cycle forward/reverse rules, starting age calculation
│ └── classical-texts.md # Core rules from nine classical texts
├── LICENSE
└── README.md算八字 看八字 批八字 排八字
四柱 命盘 算命 排盘 bazi1. 姓名 (Name) — optional, for personalization
2. 性别 (Gender) — 男/女, affects 大运 direction
3. 出生日期 (Birth date) — ask whether 阳历 (solar) or 农历 (lunar)
4. 出生时辰 (Birth hour) — see shichen-table.md for conversion
5. 出生地点 (Birthplace) — province/city for timezone adjustmentreferences/wuxing-tables.mdYear stem index = (year - 4) mod 10 → maps to 天干
Year branch index = (year - 4) mod 12 → maps to 地支Month branch is fixed by solar term (节气), not calendar month.
Month stem is derived from year stem using the 五虎遁年起月法 table.Use pre-calculated 万年历 (perpetual calendar) lookup.
Day stem/branch cycle repeats every 60 days (六十甲子).Convert clock time → 时辰 (see shichen-table.md)
Hour stem derived from day stem using 五鼠遁日起时法 table.Example: 日柱 = 甲子
Day Master = 甲 (Wood, Yang)references/dayun-rules.mdMale + Yang year stem → Forward (顺排)
Male + Yin year stem → Reverse (逆排)
Female + Yang year stem → Reverse (逆排)
Female + Yin year stem → Forward (顺排)
Starting age = days to next/previous 节气 ÷ 3 (round to nearest integer)
Each 大运 lasts 10 years.references/wuxing-tables.md| Relationship | Same element, same polarity | Same element, opposite polarity |
|---|---|---|
| Self | 比肩 | 劫财 |
| Element I produce | 食神 | 伤官 |
| Element that produces me | 正印 | 偏印 |
| Element I control | 正财 | 偏财 |
| Element that controls me | 正官 | 七杀 |
Count Wood/Fire/Earth/Metal/Water across all 8 characters (stems + branches).
Note hidden stems (藏干) in branches — include these in element count.
Identify excess and deficiency.references/classical-texts.md普通格局 (Common patterns): 正官格, 七杀格, 正印格, 偏印格,
食神格, 伤官格, 正财格, 偏财格
特殊格局 (Special patterns): 从格, 化格, 专旺格, etc.
Month branch hidden stem often determines the primary pattern.## 八字命盘 | BaZi Chart
**姓名**: [Name] **性别**: [Gender] **出生**: [Date Time]
| 柱 | 天干 | 地支 |
|-----|------|------|
| 年柱 | X | X |
| 月柱 | X | X |
| 日柱 | X | X |
| 时柱 | X | X |
**日主**: X(X行,X)
---
## 大运排列
起运年龄: X岁(约 XXXX 年起)
| 序 | 大运 | 年份 | 十神 |
|----|------|------|------|
| 1 | XX | XXXX–XXXX | XX |
...
---
## 命理分析
### 日主强弱
[Assessment of day master strength based on seasonal support, roots, and helpers]
### 五行分析
[Element count and balance assessment]
### 格局判定
[Pattern name and explanation, citing classical text]
### 十神解读
[Key ten god relationships and their implications]
### 大运流年
[Current and upcoming major/annual cycle analysis]
### 综合建议
**事业**: [Career guidance]
**感情**: [Relationship guidance]
**健康**: [Health guidance]
**择吉**: [Auspicious timing suggestions]
---
*参考典籍: 《穷通宝典》《三命通会》《滴天髓》《渊海子平》《千里命稿》*
*免责声明: 仅供传统文化学习与娱乐参考,不构成任何决策依据。*甲(Wood+) 乙(Wood-) 丙(Fire+) 丁(Fire-) 戊(Earth+)
己(Earth-) 庚(Metal+) 辛(Metal-) 壬(Water+) 癸(Water-)子(Water+/Rat) 丑(Earth-/Ox) 寅(Wood+/Tiger) 卯(Wood-/Rabbit)
辰(Earth+/Dragon) 巳(Fire-/Snake) 午(Fire+/Horse) 未(Earth-/Goat)
申(Metal+/Monkey) 酉(Metal-/Rooster) 戌(Earth+/Dog) 亥(Water-/Pig)Year stem 甲/己 → January stem starts at 丙
Year stem 乙/庚 → January stem starts at 戊
Year stem 丙/辛 → January stem starts at 庚
Year stem 丁/壬 → January stem starts at 壬
Year stem 戊/癸 → January stem starts at 甲Day stem 甲/己 → 子时 stem = 甲
Day stem 乙/庚 → 子时 stem = 丙
Day stem 丙/辛 → 子时 stem = 戊
Day stem 丁/壬 → 子时 stem = 庚
Day stem 戊/癸 → 子时 stem = 壬| 典籍 | Primary Use |
|---|---|
| 《穷通宝典》 | Day master seasonal adjustment (调候) |
| 《三命通会》 | Pattern and spirit star (格局神煞) analysis |
| 《滴天髓》 | Five element strength and flow (五行旺衰) |
| 《渊海子平》 | Ten gods and six relations (十神六亲) |
| 《千里命稿》 | Case study verification (命例实证) |
| 《协纪辨方书》 | Auspicious date selection (择日神煞) |
| 《果老星宗》 | Star and fate combined reading (星命合参) |
| 《子平真诠》 | Use god and pattern (用神格局) |
| 《神峰通考》 | Correcting common errors (命理辨误) |
references/classical-texts.md✓ Is the birth season supportive? (得令)
✓ Does the day branch support the day master? (得地)
✓ Do other stems help the day master? (得助)
Strong (身强) if 2+ conditions met; Weak (身弱) if 0–1 conditions met.User: 帮我算八字
Claude: 好的,我来为您排八字!请问您的性别是?
User: 女
Claude: 好的。请问您的出生日期是阳历还是农历?
User: 阳历,1990年3月15日
Claude: 明白了。请问您出生的时辰或具体时间?
User: 早上8点半
Claude: 早上8点半是辰时(07:00–09:00)。请问出生地点?
User: 上海
Claude: [Proceeds to calculate pillars, 大运, and full analysis]